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

Public Member Functions

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

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

1584  {
1585  if (InstanceScript* instance = player->GetInstanceScript())
1586  {
1587  if (!instance->GetData(DATA_SPINESTALKER))
1588  if (Creature* spinestalker = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SPINESTALKER)))
1589  spinestalker->AI()->DoAction(ACTION_START_FROSTWYRM);
1590 
1591  if (!instance->GetData(DATA_RIMEFANG))
1592  if (Creature* rimefang = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_RIMEFANG)))
1593  rimefang->AI()->DoAction(ACTION_START_FROSTWYRM);
1594 
1595  if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && !instance->GetGuidData(DATA_SINDRAGOSA) && instance->GetBossState(DATA_SINDRAGOSA) != DONE)
1596  {
1597  if (player->GetMap()->IsHeroic() && !instance->GetData(DATA_HEROIC_ATTEMPTS))
1598  return true;
1599 
1600  player->GetMap()->LoadGrid(SindragosaSpawnPos.GetPositionX(), SindragosaSpawnPos.GetPositionY());
1601  if (Creature* sindragosa = player->GetMap()->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos))
1602  sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM);
1603  }
1604  }
1605 
1606  return true;
1607  }
Definition: icecrown_citadel.h:490
Definition: icecrown_citadel.h:86
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=NULL, uint32 duration=0, Unit *summoner=NULL, uint32 spellId=0, uint32 vehId=0)
Definition: Object.cpp:2219
Map * GetMap() const
Definition: Object.h:543
Definition: icecrown_citadel.h:106
Definition: pit_of_saron.h:34
Definition: inflate.h:49
Definition: Creature.h:467
float GetPositionY() const
Definition: Position.h:105
Definition: icecrown_citadel.h:100
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: icecrown_citadel.h:101
Definition: InstanceScript.h:141
Position const SindragosaSpawnPos
Definition: boss_sindragosa.cpp:159
Definition: icecrown_citadel.h:292
float GetPositionX() const
Definition: Position.h:104

+ Here is the call graph for this function:


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