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

Public Member Functions

 at_faerlina_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_faerlina_entrance::at_faerlina_entrance ( )
inline
262 : AreaTriggerScript("at_faerlina_entrance") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

265  {
266  InstanceScript* instance = player->GetInstanceScript();
267  if (!instance || instance->GetData(DATA_HAD_FAERLINA_GREET) || instance->GetBossState(BOSS_FAERLINA) != NOT_STARTED)
268  return true;
269 
270  if (Creature* faerlina = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_FAERLINA)))
271  faerlina->AI()->Talk(SAY_GREET);
272  instance->SetData(DATA_HAD_FAERLINA_GREET, 1u);
273 
274  return true;
275  }
Definition: boss_faerlina.cpp:27
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: Creature.h:467
Definition: naxxramas.h:68
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: naxxramas.h:28
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
Definition: InstanceScript.h:58
Definition: naxxramas.h:50
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

+ Here is the call graph for this function:


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