AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
at_sindragosa_lair Class Reference
Inheritance diagram for at_sindragosa_lair:
AreaTriggerScript ScriptObject

Public Member Functions

 at_sindragosa_lair ()
 
bool OnTrigger (Player *player, AreaTrigger const *) override
 
- Public Member Functions inherited from AreaTriggerScript
bool IsDatabaseBound () const override
 
virtual bool OnTrigger (Player *, AreaTrigger const *)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ at_sindragosa_lair()

at_sindragosa_lair::at_sindragosa_lair ( )
inline
1523: AreaTriggerScript("at_sindragosa_lair") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

bool at_sindragosa_lair::OnTrigger ( Player player,
AreaTrigger const *   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

1526 {
1527 if (InstanceScript* instance = player->GetInstanceScript())
1528 {
1529 if (!instance->GetData(DATA_SPINESTALKER))
1530 if (Creature* spinestalker = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SPINESTALKER)))
1531 spinestalker->AI()->DoAction(ACTION_START_FROSTWYRM);
1532
1533 if (!instance->GetData(DATA_RIMEFANG))
1534 if (Creature* rimefang = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_RIMEFANG)))
1535 rimefang->AI()->DoAction(ACTION_START_FROSTWYRM);
1536
1537 if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && instance->GetBossState(DATA_SINDRAGOSA) != IN_PROGRESS)
1538 {
1540 if (Creature* sindragosa = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SINDRAGOSA)))
1541 sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM);
1542 }
1543 }
1544
1545 return true;
1546 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ ACTION_START_FROSTWYRM
Definition: icecrown_citadel.h:540
Position const SindragosaSpawnPos
Definition: instance_icecrown_citadel.cpp:157
@ DATA_SINDRAGOSA_FROSTWYRMS
Definition: icecrown_citadel.h:120
@ DATA_RIMEFANG
Definition: icecrown_citadel.h:122
@ DATA_SINDRAGOSA
Definition: icecrown_citadel.h:103
@ DATA_SPINESTALKER
Definition: icecrown_citadel.h:121
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Definition: Creature.h:46
Map * GetMap() const
Definition: Object.h:531
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: InstanceScript.h:142
void LoadGrid(float x, float y)
Definition: Map.cpp:492

References ACTION_START_FROSTWYRM, DATA_RIMEFANG, DATA_SINDRAGOSA, DATA_SINDRAGOSA_FROSTWYRMS, DATA_SPINESTALKER, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), IN_PROGRESS, Map::LoadGrid(), and SindragosaSpawnPos.