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

Public Member Functions

 at_hor_waves_restarter ()
 
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_hor_waves_restarter::at_hor_waves_restarter ( )
inline
2030 : AreaTriggerScript("at_hor_waves_restarter") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

2033  {
2034  if (player->IsGameMaster())
2035  return true;
2036 
2037  InstanceScript* _instance = player->GetInstanceScript();
2038 
2039  if (_instance->GetData(DATA_WAVE_COUNT))
2040  return true;
2041 
2042  if (_instance->GetData(DATA_INTRO_EVENT) == DONE && _instance->GetBossState(DATA_MARWYN) != DONE)
2043  {
2044  _instance->ProcessEvent(0, EVENT_SPAWN_WAVES);
2045 
2046  if (Creature* falric = ObjectAccessor::GetCreature(*player, _instance->GetGuidData(DATA_FALRIC)))
2047  {
2048  falric->CastSpell(falric, SPELL_BOSS_SPAWN_AURA, true);
2049  falric->SetVisible(true);
2050  }
2051  if (Creature* marwyn = ObjectAccessor::GetCreature(*player, _instance->GetGuidData(DATA_MARWYN)))
2052  {
2053  marwyn->CastSpell(marwyn, SPELL_BOSS_SPAWN_AURA, true);
2054  marwyn->SetVisible(true);
2055  }
2056  }
2057  return true;
2058  }
Definition: halls_of_reflection.cpp:215
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: halls_of_reflection.h:38
Definition: inflate.h:49
Definition: Creature.h:467
Definition: halls_of_reflection.h:136
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: halls_of_reflection.h:42
Definition: halls_of_reflection.h:35
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: halls_of_reflection.h:34
Definition: InstanceScript.h:141
virtual void ProcessEvent(WorldObject *, uint32)
Definition: ZoneScript.h:54
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: