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

Public Member Functions

 AreaTrigger_at_sunwell_eredar_twins ()
 
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

◆ AreaTrigger_at_sunwell_eredar_twins()

AreaTrigger_at_sunwell_eredar_twins::AreaTrigger_at_sunwell_eredar_twins ( )
inline
479: AreaTriggerScript("at_sunwell_eredar_twins") {}
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

482 {
483 if (InstanceScript* instance = player->GetInstanceScript())
484 if (instance->GetBossState(DATA_EREDAR_TWINS_INTRO) != DONE)
485 {
486 instance->SetBossState(DATA_EREDAR_TWINS_INTRO, DONE);
487 if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_LADY_SACROLASH)))
488 creature->AI()->Talk(YELL_INTRO_SAC);
489 if (Creature* creature = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_GRAND_WARLOCK_ALYTHESS)))
490 creature->AI()->Talk(YELL_INTRO_ALY);
491 }
492
493 return true;
494 }
@ DONE
Definition: InstanceScript.h:60
@ NPC_LADY_SACROLASH
Definition: sunwell_plateau.h:60
@ NPC_GRAND_WARLOCK_ALYTHESS
Definition: sunwell_plateau.h:59
@ DATA_EREDAR_TWINS_INTRO
Definition: sunwell_plateau.h:34
@ YELL_INTRO_ALY
Definition: boss_eredar_twins.cpp:37
@ YELL_INTRO_SAC
Definition: boss_eredar_twins.cpp:29
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Definition: Creature.h:46
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Definition: InstanceScript.h:142

References DATA_EREDAR_TWINS_INTRO, DONE, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), NPC_GRAND_WARLOCK_ALYTHESS, NPC_LADY_SACROLASH, YELL_INTRO_ALY, and YELL_INTRO_SAC.