TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
at_anubrekhan_entrance Class Reference

Public Member Functions

 at_anubrekhan_entrance ()
 
bool OnTrigger (Player *player, AreaTriggerEntry const *, bool) override
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 

Constructor & Destructor Documentation

at_anubrekhan_entrance::at_anubrekhan_entrance ( )
inline
243 : AreaTriggerScript("at_anubrekhan_entrance") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

bool at_anubrekhan_entrance::OnTrigger ( Player player,
AreaTriggerEntry const ,
bool   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

246  {
247  InstanceScript* instance = player->GetInstanceScript();
248  if (!instance || instance->GetData(DATA_HAD_ANUBREKHAN_GREET) || instance->GetBossState(BOSS_ANUBREKHAN) != NOT_STARTED)
249  return true;
250 
251  if (Creature* anub = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_ANUBREKHAN)))
252  anub->AI()->Talk(SAY_GREET);
253  instance->SetData(DATA_HAD_ANUBREKHAN_GREET, 1u);
254 
255  return true;
256  }
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: boss_anubrekhan.cpp:26
Definition: Creature.h:467
Definition: naxxramas.h:49
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
Definition: InstanceScript.h:58
Definition: naxxramas.h:67
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: InstanceScript.h:141
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: naxxramas.h:27

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: