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

Public Member Functions

 at_twin_emperors ()
 
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_twin_emperors()

at_twin_emperors::at_twin_emperors ( )
inline
410: OnlyOnceAreaTriggerScript("at_twin_emperors") { }
Definition: AreaTriggerScript.h:36

Member Function Documentation

◆ _OnTrigger()

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

Implements OnlyOnceAreaTriggerScript.

413 {
414 if (InstanceScript* instance = player->GetInstanceScript())
415 {
416 if (instance->GetBossState(DATA_TWIN_EMPERORS) != DONE)
417 {
418 if (Creature* mastersEye = instance->GetCreature(DATA_MASTERS_EYE))
419 {
420 mastersEye->AI()->Talk(EMOTE_MASTERS_EYE_AT, player);
421 mastersEye->DespawnOrUnsummon(11000);
422 mastersEye->m_Events.AddEventAtOffset([mastersEye, player]()
423 {
424 mastersEye->SetFacingToObject(player);
425 }, 3s);
426 }
427
428 if (Creature* veklor = instance->GetCreature(DATA_VEKLOR))
429 veklor->AI()->DoAction(ACTION_START_INTRO);
430
431 if (Creature* veknilash = instance->GetCreature(DATA_VEKNILASH))
432 veknilash->AI()->DoAction(ACTION_START_INTRO);
433 }
434 }
435 return false;
436 }
@ DONE
Definition: InstanceScript.h:60
@ ACTION_START_INTRO
Definition: boss_twinemperors.cpp:51
@ EMOTE_MASTERS_EYE_AT
Definition: boss_twinemperors.cpp:65
@ DATA_VEKNILASH
Definition: temple_of_ahnqiraj.h:46
@ DATA_MASTERS_EYE
Definition: temple_of_ahnqiraj.h:48
@ DATA_TWIN_EMPERORS
Definition: temple_of_ahnqiraj.h:34
@ DATA_VEKLOR
Definition: temple_of_ahnqiraj.h:45
Definition: Creature.h:46
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Definition: InstanceScript.h:142

References ACTION_START_INTRO, DATA_MASTERS_EYE, DATA_TWIN_EMPERORS, DATA_VEKLOR, DATA_VEKNILASH, DONE, EMOTE_MASTERS_EYE_AT, and WorldObject::GetInstanceScript().