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

Public Member Functions

 at_zulgurub_bridge_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_bridge_speech()

at_zulgurub_bridge_speech::at_zulgurub_bridge_speech ( )
inline
251: OnlyOnceAreaTriggerScript("at_zulgurub_bridge_speech") {}
Definition: AreaTriggerScript.h:36

Member Function Documentation

◆ _OnTrigger()

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

Implements OnlyOnceAreaTriggerScript.

254 {
255 if (InstanceScript* instance = player->GetInstanceScript())
256 {
257 // Instance map's enormous, Hakkar's GRID is not loaded by the time players enter.
258 // Without this, the creature never says anything, because it doesn't load in time.
259 player->GetMap()->LoadGrid(-11783.99f, -1655.27f);
260
261 if (Creature* hakkar = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_HAKKAR)))
262 {
263 if (hakkar->GetAI())
264 {
265 hakkar->AI()->Talk(SAY_PROTECT_ALTAR);
266 }
267 }
268 }
269
270 return false;
271 }
@ SAY_PROTECT_ALTAR
Definition: boss_hakkar.cpp:37
@ 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:531
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
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_PROTECT_ALTAR.