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

Public Member Functions

 at_tyrannus_event_starter ()
 
bool OnTrigger (Player *player, const AreaTriggerEntry *, 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_tyrannus_event_starter::at_tyrannus_event_starter ( )
inline
546 : AreaTriggerScript("at_tyrannus_event_starter") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

549  {
550  InstanceScript* instance = player->GetInstanceScript();
551  if (player->IsGameMaster() || !instance)
552  return false;
553 
554  if (instance->GetBossState(DATA_TYRANNUS) != IN_PROGRESS && instance->GetBossState(DATA_TYRANNUS) != DONE)
555  if (Creature* tyrannus = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_TYRANNUS)))
556  {
557  tyrannus->AI()->DoAction(ACTION_START_INTRO);
558  return true;
559  }
560 
561  return false;
562  }
Definition: boss_scourgelord_tyrannus.cpp:102
Definition: inflate.h:49
Definition: Creature.h:467
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: InstanceScript.h:59
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: pit_of_saron.h:31
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: