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

Public Member Functions

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

◆ AreaTrigger_at_sholazar_waygate()

AreaTrigger_at_sholazar_waygate::AreaTrigger_at_sholazar_waygate ( )
inline
268: AreaTriggerScript("at_sholazar_waygate") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

271 {
272 if (!player->isDead() && (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) != QUEST_STATUS_NONE ||
274 {
275 switch (trigger->entry)
276 {
277 case AT_SHOLAZAR:
278 player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, true);
279 break;
280
281 case AT_UNGORO:
282 player->CastSpell(player, SPELL_UNGORO_TO_SHOLAZAR_TELEPORT, true);
283 break;
284 }
285 }
286
287 return false;
288 }
@ QUEST_STATUS_REWARDED
Definition: QuestDef.h:106
@ QUEST_STATUS_NONE
Definition: QuestDef.h:100
@ QUEST_MEETING_A_GREAT_ONE
Definition: areatrigger_scripts.cpp:262
@ QUEST_THE_MAKERS_OVERLOOK
Definition: areatrigger_scripts.cpp:260
@ SPELL_UNGORO_TO_SHOLAZAR_TELEPORT
Definition: areatrigger_scripts.cpp:255
@ QUEST_THE_MAKERS_PERCH
Definition: areatrigger_scripts.cpp:261
@ AT_UNGORO
Definition: areatrigger_scripts.cpp:258
@ SPELL_SHOLAZAR_TO_UNGORO_TELEPORT
Definition: areatrigger_scripts.cpp:254
@ AT_SHOLAZAR
Definition: areatrigger_scripts.cpp:257
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1416
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169
bool isDead() const
Definition: Unit.h:1824

References AT_SHOLAZAR, AT_UNGORO, Unit::CastSpell(), AreaTrigger::entry, Player::GetQuestStatus(), Unit::isDead(), QUEST_MEETING_A_GREAT_ONE, QUEST_STATUS_NONE, QUEST_STATUS_REWARDED, QUEST_THE_MAKERS_OVERLOOK, QUEST_THE_MAKERS_PERCH, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, and SPELL_UNGORO_TO_SHOLAZAR_TELEPORT.