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

Public Member Functions

 at_icc_spire_frostwyrm ()
 
bool _OnTrigger (Player *player, AreaTrigger const *areaTrigger) override
 
- Public Member Functions inherited from OnlyOnceAreaTriggerScript
bool OnTrigger (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 OnlyOnceAreaTriggerScript
virtual bool _OnTrigger (Player *, AreaTrigger const *)=0
 
void ResetAreaTriggerDone (InstanceScript *, uint32)
 
void ResetAreaTriggerDone (Player const *, AreaTrigger const *)
 
- 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_icc_spire_frostwyrm()

at_icc_spire_frostwyrm::at_icc_spire_frostwyrm ( )
inline
3626: OnlyOnceAreaTriggerScript("at_icc_spire_frostwyrm") { }
Definition: AreaTriggerScript.h:36

Member Function Documentation

◆ _OnTrigger()

bool at_icc_spire_frostwyrm::_OnTrigger ( Player player,
AreaTrigger const *  areaTrigger 
)
inlineoverridevirtual

Implements OnlyOnceAreaTriggerScript.

3629 {
3631 {
3633 const Position posHordeWyrm = { -375.538879f, 2120.774658f, 242.256775f, 3.714352f };
3634 const Position posAllianceWyrm = { -361.154358f, 2305.821289f, 244.771713f, 2.704335f };
3635
3636 bool hordeSide = areaTrigger->entry == HORDE_AREATRIGGER || areaTrigger->entry == HORDE_AREATRIGGER + 1;
3637
3638 if (Creature* frostwyrm = player->SummonCreature(NPC_SPIRE_FROSTWYRM, hordeSide ? posHordeWyrm : posAllianceWyrm))
3639 {
3640 frostwyrm->AI()->DoAction(areaTrigger->entry);
3641 }
3642 }
3643
3644 return true;
3645 }
@ DONE
Definition: InstanceScript.h:60
@ HORDE_AREATRIGGER
Definition: icecrown_citadel.cpp:2926
@ NPC_SPIRE_FROSTWYRM
Definition: icecrown_citadel.h:376
@ DATA_SPIRE_FROSTWYRM
Definition: icecrown_citadel.h:155
Definition: Creature.h:46
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Definition: Position.h:28
uint32 GetPersistentData(uint32 index) const
Definition: InstanceScript.h:240
void StorePersistentData(uint32 index, uint32 data)
Definition: InstanceScript.cpp:388

References DATA_SPIRE_FROSTWYRM, DONE, AreaTrigger::entry, WorldObject::GetInstanceScript(), InstanceScript::GetPersistentData(), HORDE_AREATRIGGER, NPC_SPIRE_FROSTWYRM, InstanceScript::StorePersistentData(), and WorldObject::SummonCreature().