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

Public Member Functions

 at_thaddius_entrance ()
 
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_thaddius_entrance()

at_thaddius_entrance::at_thaddius_entrance ( )
inline
734: AreaTriggerScript("at_thaddius_entrance") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

737 {
738 InstanceScript* instance = player->GetInstanceScript();
739 if (!instance || instance->GetData(DATA_HAD_THADDIUS_GREET) || instance->GetBossState(BOSS_THADDIUS) == DONE)
740 return true;
741
742 if (Creature* thaddius = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_THADDIUS_BOSS)))
743 {
744 thaddius->AI()->Talk(SAY_GREET);
745 }
746 instance->SetData(DATA_HAD_THADDIUS_GREET, 1);
747
748 return true;
749 }
@ DONE
Definition: InstanceScript.h:60
@ DATA_HAD_THADDIUS_GREET
Definition: naxxramas.h:76
@ DATA_THADDIUS_BOSS
Definition: naxxramas.h:56
@ BOSS_THADDIUS
Definition: naxxramas.h:38
@ SAY_GREET
Definition: boss_thaddius.cpp:43
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
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:95
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References BOSS_THADDIUS, DATA_HAD_THADDIUS_GREET, DATA_THADDIUS_BOSS, DONE, InstanceScript::GetBossState(), ObjectAccessor::GetCreature(), ZoneScript::GetData(), InstanceScript::GetGuidData(), WorldObject::GetInstanceScript(), SAY_GREET, and ZoneScript::SetData().