AzeorthCore 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
 

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 ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ at_sindragosa_lair()

at_sindragosa_lair::at_sindragosa_lair ( )
inline
1721: AreaTriggerScript("at_sindragosa_lair") { }
Definition: ScriptMgr.h:800

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

1724 {
1725 if (InstanceScript* instance = player->GetInstanceScript())
1726 {
1727 if (!instance->GetData(DATA_SPINESTALKER))
1728 if (Creature* spinestalker = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SPINESTALKER)))
1729 spinestalker->AI()->DoAction(ACTION_START_FROSTWYRM);
1730
1731 if (!instance->GetData(DATA_RIMEFANG))
1732 if (Creature* rimefang = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_RIMEFANG)))
1733 rimefang->AI()->DoAction(ACTION_START_FROSTWYRM);
1734
1735 if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && !instance->GetGuidData(DATA_SINDRAGOSA) && instance->GetBossState(DATA_SINDRAGOSA) != DONE)
1736 {
1737 if (instance->GetData(DATA_HAS_LIMITED_ATTEMPTS) && !instance->GetData(DATA_HEROIC_ATTEMPTS))
1738 return true;
1739
1741 if (Creature* sindragosa = player->GetMap()->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos))
1742 sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM);
1743 }
1744 }
1745
1746 return true;
1747 }
@ DONE
Definition: InstanceScript.h:59
@ NPC_SINDRAGOSA
Definition: pit_of_saron.h:70
Position const SindragosaSpawnPos
Definition: boss_sindragosa.cpp:166
@ ACTION_START_FROSTWYRM
Definition: icecrown_citadel.h:530
@ DATA_HEROIC_ATTEMPTS
Definition: icecrown_citadel.h:125
@ DATA_SINDRAGOSA_FROSTWYRMS
Definition: icecrown_citadel.h:119
@ DATA_HAS_LIMITED_ATTEMPTS
Definition: icecrown_citadel.h:143
@ DATA_RIMEFANG
Definition: icecrown_citadel.h:121
@ DATA_SINDRAGOSA
Definition: icecrown_citadel.h:102
@ DATA_SPINESTALKER
Definition: icecrown_citadel.h:120
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
Definition: Creature.h:46
Map * GetMap() const
Definition: Object.h:517
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1194
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: InstanceScript.h:140
void LoadGrid(float x, float y)
Definition: Map.cpp:494
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0)
Definition: Object.cpp:2117

References ACTION_START_FROSTWYRM, DATA_HAS_LIMITED_ATTEMPTS, DATA_HEROIC_ATTEMPTS, DATA_RIMEFANG, DATA_SINDRAGOSA, DATA_SINDRAGOSA_FROSTWYRMS, DATA_SPINESTALKER, DONE, ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), Map::LoadGrid(), NPC_SINDRAGOSA, SindragosaSpawnPos, and Map::SummonCreature().