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

Public Member Functions

 spell_the_lich_king_restore_soul_SpellScript ()
 
- Public Member Functions inherited from SpellScript
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Spell *spell)
 
void _InitHit ()
 
bool _IsEffectPrevented (SpellEffIndex effIndex)
 
bool _IsDefaultEffectPrevented (SpellEffIndex effIndex)
 
void _PrepareScriptCall (SpellScriptHookType hookType)
 
void _FinishScriptCall ()
 
bool IsInCheckCastHook () const
 
bool IsInTargetHook () const
 
bool IsInHitPhase () const
 
bool IsInEffectHook () const
 
UnitGetCaster ()
 
UnitGetOriginalCaster ()
 
SpellInfo constGetSpellInfo ()
 
SpellValue constGetSpellValue ()
 
SpellEffectInfo constGetEffectInfo (SpellEffIndex) const
 
WorldLocation constGetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObjectGetExplTargetWorldObject ()
 
UnitGetExplTargetUnit ()
 
GameObjectGetExplTargetGObj ()
 
ItemGetExplTargetItem ()
 
UnitGetHitUnit ()
 
CreatureGetHitCreature ()
 
PlayerGetHitPlayer ()
 
ItemGetHitItem ()
 
GameObjectGetHitGObj ()
 
WorldLocationGetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
SpellGetSpell ()
 
AuraGetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
SpellEffectInfo constGetEffectInfo () const
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo constGetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void SetCustomCastResultMessage (SpellCustomErrors result)
 
- Public Member Functions inherited from _SpellScript
 _SpellScript ()
 
virtual ~_SpellScript ()
 
virtual void _Register ()
 
virtual void _Unload ()
 
virtual void _Init (std::string const *scriptname, uint32 spellId)
 
std::string const_GetScriptName () const
 
virtual bool Validate (SpellInfo const *)
 
virtual void Unload ()
 

Private Member Functions

 PrepareSpellScript (spell_the_lich_king_restore_soul_SpellScript)
 
bool Load () override
 
void HandleScript (SpellEffIndex)
 
void RemoveAura ()
 
void Register () override
 

Private Attributes

InstanceScript_instance
 

Additional Inherited Members

- Public Attributes inherited from SpellScript
HookList< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< EffectHandlerOnEffectSuccessfulDispel
 
HookList< HitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList
< ObjectAreaTargetSelectHandler
OnObjectAreaTargetSelect
 
HookList
< ObjectTargetSelectHandler
OnObjectTargetSelect
 
HookList
< DestinationTargetSelectHandler
OnDestinationTargetSelect
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string constm_scriptName
 
uint32 m_scriptSpellId
 

Constructor & Destructor Documentation

spell_the_lich_king_restore_soul::spell_the_lich_king_restore_soul_SpellScript::spell_the_lich_king_restore_soul_SpellScript ( )
inline
2896  {
2897  _instance = nullptr;
2898  }
InstanceScript * _instance
Definition: boss_the_lich_king.cpp:2936

Member Function Documentation

void spell_the_lich_king_restore_soul::spell_the_lich_king_restore_soul_SpellScript::HandleScript ( SpellEffIndex  )
inlineprivate
2908  {
2910  lichKing->AI()->DoAction(ACTION_TELEPORT_BACK);
2911  if (Creature* spawner = GetCaster()->FindNearestCreature(NPC_WORLD_TRIGGER_INFINITE_AOI, 50.0f))
2912  spawner->RemoveAllAuras();
2913 
2914  std::list<Creature*> spirits;
2916  for (std::list<Creature*>::iterator itr = spirits.begin(); itr != spirits.end(); ++itr)
2917  {
2918  (*itr)->m_Events.KillAllEvents(true);
2919  (*itr)->SetReactState(REACT_PASSIVE);
2920  (*itr)->AI()->EnterEvadeMode();
2921  }
2922  }
Definition: boss_the_lich_king.cpp:330
Definition: Unit.h:1129
Definition: icecrown_citadel.h:87
Definition: Creature.h:467
Definition: icecrown_citadel.h:314
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition: Object.cpp:2483
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: icecrown_citadel.h:317
InstanceScript * _instance
Definition: boss_the_lich_king.cpp:2936
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Unit * GetCaster()
Definition: SpellScript.cpp:394

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool spell_the_lich_king_restore_soul::spell_the_lich_king_restore_soul_SpellScript::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

2902  {
2904  return _instance != NULL;
2905  }
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
arena_t NULL
Definition: jemalloc_internal.h:624
InstanceScript * _instance
Definition: boss_the_lich_king.cpp:2936
Unit * GetCaster()
Definition: SpellScript.cpp:394

+ Here is the call graph for this function:

spell_the_lich_king_restore_soul::spell_the_lich_king_restore_soul_SpellScript::PrepareSpellScript ( spell_the_lich_king_restore_soul_SpellScript  )
private
void spell_the_lich_king_restore_soul::spell_the_lich_king_restore_soul_SpellScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2931  {
2934  }
void HandleScript(SpellEffIndex)
Definition: boss_the_lich_king.cpp:2907
Definition: SharedDefines.h:28
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:294
Definition: SharedDefines.h:1016
#define SpellHitFn(F)
Definition: SpellScript.h:306
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:297
HookList< HitHandler > BeforeHit
Definition: SpellScript.h:300

+ Here is the call graph for this function:

void spell_the_lich_king_restore_soul::spell_the_lich_king_restore_soul_SpellScript::RemoveAura ( )
inlineprivate
2925  {
2926  if (Unit* target = GetHitUnit())
2927  target->RemoveAurasDueToSpell(target->GetMap()->IsHeroic() ? SPELL_HARVEST_SOULS_TELEPORT : SPELL_HARVEST_SOUL_TELEPORT);
2928  }
Definition: boss_the_lich_king.cpp:135
Unit * GetHitUnit()
Definition: SpellScript.cpp:441
Definition: Unit.h:1305
Definition: boss_the_lich_king.cpp:136

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

InstanceScript* spell_the_lich_king_restore_soul::spell_the_lich_king_restore_soul_SpellScript::_instance
private

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