AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
at_ancient_leaf Class Reference
Inheritance diagram for at_ancient_leaf:
AreaTriggerScript ScriptObject

Public Member Functions

 at_ancient_leaf ()
 
bool OnTrigger (Player *player, AreaTrigger const *) override
 
- Public Member Functions inherited from AreaTriggerScript
bool IsDatabaseBound () const override
 
virtual bool OnTrigger (Player *, AreaTrigger const *)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ at_ancient_leaf()

at_ancient_leaf::at_ancient_leaf ( )
inline
121: AreaTriggerScript("at_ancient_leaf") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

bool at_ancient_leaf::OnTrigger ( Player player,
AreaTrigger const *   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

124 {
125 if (player->IsGameMaster() || !player->IsAlive())
126 return false;
127
128 // Handle Call Ancients event start - The area trigger summons 3 ancients
130 {
131 // If ancients are already spawned, skip the rest
133 return true;
134
136 }
137 return false;
138 }
@ QUEST_STATUS_REWARDED
Definition: QuestDef.h:106
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:101
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
Definition: ScriptedCreature.cpp:817
@ CREATURE_GROUP_ANCIENTS
Definition: zone_felwood.cpp:115
@ NPC_VARTRUS
Definition: zone_felwood.cpp:112
@ QUEST_ANCIENT_LEAF
Definition: zone_felwood.cpp:111
@ NPC_STOMA
Definition: zone_felwood.cpp:113
@ NPC_HASTAT
Definition: zone_felwood.cpp:114
Map * GetMap() const
Definition: Object.h:531
bool IsGameMaster() const
Definition: Player.h:1158
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424
bool IsAlive() const
Definition: Unit.h:1204
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition: Object.cpp:2278

References CREATURE_GROUP_ANCIENTS, GetClosestCreatureWithEntry(), WorldObject::GetMap(), Player::GetQuestStatus(), Unit::IsAlive(), Player::IsGameMaster(), NPC_HASTAT, NPC_STOMA, NPC_VARTRUS, QUEST_ANCIENT_LEAF, QUEST_STATUS_COMPLETE, QUEST_STATUS_REWARDED, and Map::SummonCreatureGroup().