TrinityCore
Loading...
Searching...
No Matches
zone_felwood.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Felwood
20SD%Complete: 95
21SDComment: Quest support: 7632
22SDCategory: Felwood
23EndScriptData */
24
25/* ContentData
26at_ancient_leaf
27EndContentData */
28
29#include "ScriptMgr.h"
30#include "Map.h"
31#include "Player.h"
32#include "ScriptedCreature.h"
33#include "ScriptedGossip.h"
34
35/*######
36## at_ancient_leaf
37######*/
38
47
49{
50 public:
51 at_ancient_leaf() : AreaTriggerScript("at_ancient_leaf") { }
52
53 bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) override
54 {
55 if (player->IsGameMaster() || !player->IsAlive())
56 return false;
57
58 // Handle Call Ancients event start - The area trigger summons 3 ancients
60 {
61 // If ancients are already spawned, skip the rest
63 return true;
64
66 }
67 return false;
68 }
69};
70
72{
73 new at_ancient_leaf();
74}
@ QUEST_STATUS_REWARDED
Definition QuestDef.h:110
@ QUEST_STATUS_COMPLETE
Definition QuestDef.h:105
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition Object.cpp:1959
bool IsGameMaster() const
Definition Player.h:998
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15642
bool IsAlive() const
Definition Unit.h:1234
Map * GetMap() const
Definition Object.h:449
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
void AddSC_felwood()
AncientMisc
@ CREATURE_GROUP_ANCIENTS
@ NPC_VARTRUS
@ QUEST_ANCIENT_LEAF
@ NPC_STOMA
@ NPC_HASTAT