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

Public Member Functions

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

at_frozen_throne_teleport::at_frozen_throne_teleport ( )
inline
81 : AreaTriggerScript("at_frozen_throne_teleport") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

84  {
85  if (player->IsInCombat())
86  {
87  if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(FROZEN_THRONE_TELEPORT))
89  return true;
90  }
91 
92  if (InstanceScript* instance = player->GetInstanceScript())
93  if (instance->GetBossState(DATA_PROFESSOR_PUTRICIDE) == DONE &&
94  instance->GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == DONE &&
95  instance->GetBossState(DATA_SINDRAGOSA) == DONE &&
96  instance->GetBossState(DATA_THE_LICH_KING) != IN_PROGRESS)
97  player->CastSpell(player, FROZEN_THRONE_TELEPORT, true);
98 
99  return true;
100  }
Definition: icecrown_citadel.h:81
Definition: icecrown_citadel.h:86
Definition: SpellInfo.h:326
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, OpcodeServer opcode=SMSG_CAST_FAILED, uint32 *misc=nullptr)
Definition: Spell.cpp:3732
Definition: SharedDefines.h:1268
Definition: inflate.h:49
Definition: icecrown_citadel.h:87
Definition: InstanceScript.h:59
#define sSpellMgr
Definition: SpellMgr.h:756
Definition: icecrown_citadel.h:68
Definition: icecrown_citadel.h:83
Definition: InstanceScript.h:141

+ Here is the call graph for this function:


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