TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AreaTrigger_at_legion_teleporter Class Reference

Public Member Functions

 AreaTrigger_at_legion_teleporter ()
 
bool OnTrigger (Player *player, AreaTriggerEntry const *, bool) override
 
- Public Member Functions inherited from ScriptObject
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 ()
 

Constructor & Destructor Documentation

AreaTrigger_at_legion_teleporter::AreaTrigger_at_legion_teleporter ( )
inline
82 : AreaTriggerScript("at_legion_teleporter") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

bool AreaTrigger_at_legion_teleporter::OnTrigger ( Player player,
AreaTriggerEntry const ,
bool   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

85  {
86  if (player->IsAlive() && !player->IsInCombat())
87  {
88  if (player->GetTeam() == ALLIANCE && player->GetQuestRewardStatus(QUEST_GAINING_ACCESS_A))
89  {
90  player->CastSpell(player, SPELL_TELE_A_TO, false);
91  return true;
92  }
93 
94  if (player->GetTeam() == HORDE && player->GetQuestRewardStatus(QUEST_GAINING_ACCESS_H))
95  {
96  player->CastSpell(player, SPELL_TELE_H_TO, false);
97  return true;
98  }
99 
100  return false;
101  }
102  return false;
103  }
Definition: areatrigger_scripts.cpp:76
Definition: areatrigger_scripts.cpp:72
Definition: SharedDefines.h:1000
Definition: areatrigger_scripts.cpp:75
Definition: SharedDefines.h:999
Definition: areatrigger_scripts.cpp:73

The documentation for this class was generated from the following file: