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

Public Member Functions

 AreaTrigger_at_legion_teleporter ()
 
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

◆ AreaTrigger_at_legion_teleporter()

AreaTrigger_at_legion_teleporter::AreaTrigger_at_legion_teleporter ( )
inline
110 : AreaTriggerScript("at_legion_teleporter")
111 {
112 }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

115 {
116 if (player->IsAlive() && !player->IsInCombat())
117 {
119 {
120 player->CastSpell(player, SPELL_TELE_A_TO, false);
121 return true;
122 }
123
125 {
126 player->CastSpell(player, SPELL_TELE_H_TO, false);
127 return true;
128 }
129
130 return false;
131 }
132 return false;
133 }
@ SPELL_TELE_H_TO
Definition: areatrigger_scripts.cpp:102
@ SPELL_TELE_A_TO
Definition: areatrigger_scripts.cpp:99
@ QUEST_GAINING_ACCESS_A
Definition: areatrigger_scripts.cpp:100
@ QUEST_GAINING_ACCESS_H
Definition: areatrigger_scripts.cpp:103
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
@ TEAM_HORDE
Definition: SharedDefines.h:761
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1401
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2072
bool IsAlive() const
Definition: Unit.h:1822
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 IsInCombat() const
Definition: Unit.h:1702

References Unit::CastSpell(), Player::GetQuestRewardStatus(), Player::GetTeamId(), Unit::IsAlive(), Unit::IsInCombat(), QUEST_GAINING_ACCESS_A, QUEST_GAINING_ACCESS_H, SPELL_TELE_A_TO, SPELL_TELE_H_TO, TEAM_ALLIANCE, and TEAM_HORDE.