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
 
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

◆ AreaTrigger_at_legion_teleporter()

AreaTrigger_at_legion_teleporter::AreaTrigger_at_legion_teleporter ( )
inline
108 : AreaTriggerScript("at_legion_teleporter")
109 {
110 }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

113 {
114 if (player->IsAlive() && !player->IsInCombat())
115 {
117 {
118 player->CastSpell(player, SPELL_TELE_A_TO, false);
119 return true;
120 }
121
123 {
124 player->CastSpell(player, SPELL_TELE_H_TO, false);
125 return true;
126 }
127
128 return false;
129 }
130 return false;
131 }
@ SPELL_TELE_H_TO
Definition: areatrigger_scripts.cpp:100
@ SPELL_TELE_A_TO
Definition: areatrigger_scripts.cpp:97
@ QUEST_GAINING_ACCESS_A
Definition: areatrigger_scripts.cpp:98
@ QUEST_GAINING_ACCESS_H
Definition: areatrigger_scripts.cpp:101
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
@ TEAM_HORDE
Definition: SharedDefines.h:761
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1409
TeamId GetTeamId(bool original=false) const
Definition: Player.h:2088
bool IsAlive() const
Definition: Unit.h:1204
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:1168
bool IsInCombat() const
Definition: Unit.h:820

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.