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

Public Member Functions

 at_malfurion_stormrage ()
 
bool OnTrigger (Player *player, const AreaTrigger *) 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_malfurion_stormrage()

at_malfurion_stormrage::at_malfurion_stormrage ( )
inline
219: AreaTriggerScript("at_malfurion_stormrage") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

bool at_malfurion_stormrage::OnTrigger ( Player player,
const AreaTrigger  
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

222 {
223 if (player->GetInstanceScript() && !player->FindNearestCreature(NPC_MALFURION_STORMRAGE, 15.0f) &&
225 player->SummonCreature(NPC_MALFURION_STORMRAGE, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
226 return false;
227 }
@ QUEST_STATUS_REWARDED
Definition: QuestDef.h:106
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: Object.h:45
@ NPC_MALFURION_STORMRAGE
Definition: sunken_temple.h:53
@ QUEST_ERANIKUS_TYRANT_OF_DREAMS
Definition: instance_sunken_temple.cpp:212
@ QUEST_THE_CHARGE_OF_DRAGONFLIGHTS
Definition: instance_sunken_temple.cpp:213
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
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424

References WorldObject::FindNearestCreature(), WorldObject::GetInstanceScript(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Player::GetQuestStatus(), NPC_MALFURION_STORMRAGE, QUEST_ERANIKUS_TYRANT_OF_DREAMS, QUEST_STATUS_REWARDED, QUEST_THE_CHARGE_OF_DRAGONFLIGHTS, WorldObject::SummonCreature(), and TEMPSUMMON_TIMED_OR_DEAD_DESPAWN.