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

Public Member Functions

 at_zulgurub_bloodfire_pit_speech ()
 
bool _OnTrigger (Player *player, const AreaTrigger *) override
 
- Public Member Functions inherited from OnlyOnceAreaTriggerScript
bool OnTrigger (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 OnlyOnceAreaTriggerScript
virtual bool _OnTrigger (Player *, AreaTrigger const *)=0
 
void ResetAreaTriggerDone (InstanceScript *, uint32)
 
void ResetAreaTriggerDone (Player const *, AreaTrigger const *)
 
- 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_zulgurub_bloodfire_pit_speech()

at_zulgurub_bloodfire_pit_speech::at_zulgurub_bloodfire_pit_speech ( )
inline
303: OnlyOnceAreaTriggerScript("at_zulgurub_bloodfire_pit_speech") {}
Definition: AreaTriggerScript.h:36

Member Function Documentation

◆ _OnTrigger()

bool at_zulgurub_bloodfire_pit_speech::_OnTrigger ( Player player,
const AreaTrigger  
)
inlineoverridevirtual

Implements OnlyOnceAreaTriggerScript.

306 {
307 if (InstanceScript* instance = player->GetInstanceScript())
308 {
309 // Instance map's enormous, Hakkar's GRID is not loaded by the time players enter.
310 // Without this, the creature never says anything, because it doesn't load in time.
311 player->GetMap()->LoadGrid(-11783.99f, -1655.27f);
312
313 if (Creature* hakkar = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_HAKKAR)))
314 {
315 if (hakkar->GetAI())
316 {
317 hakkar->AI()->Talk(SAY_PLEDGE_ALLEGIANCE, player);
318 }
319 }
320 }
321
322 return false;
323 }
@ SAY_PLEDGE_ALLEGIANCE
Definition: boss_hakkar.cpp:39
@ DATA_HAKKAR
Definition: zulgurub.h:36
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:210
Definition: Creature.h:43
Map * GetMap() const
Definition: Object.h:536
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
Definition: InstanceScript.h:142
void LoadGrid(float x, float y)
Definition: Map.cpp:495

References DATA_HAKKAR, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), WorldObject::GetMap(), Map::LoadGrid(), and SAY_PLEDGE_ALLEGIANCE.