AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript Class Reference
Inheritance diagram for spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript:
SpellScript _SpellScript

Private Member Functions

 PrepareSpellScript (spell_the_lich_king_necrotic_plague_SpellScript)
 
bool Load () override
 
void FilterTargets (std::list< WorldObject * > &targets)
 
void CheckAura (SpellMissInfo missInfo)
 
void AddMissingStack ()
 
void Register () override
 

Private Attributes

bool _hadJumpingAura
 
bool _hadInitialAura
 

Additional Inherited Members

- 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 const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
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)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo const * GetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void Cancel ()
 
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 void Register ()=0
 
virtual bool Validate (SpellInfo const *)
 
virtual bool Load ()
 
virtual void Unload ()
 
- Static Public Member Functions inherited from _SpellScript
static bool ValidateSpellInfo (std::initializer_list< uint32 > spellIds)
 
template<class T >
static bool ValidateSpellInfo (T const &spellIds)
 
- Public Attributes inherited from SpellScript
HookList< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< BeforeHitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList< ObjectAreaTargetSelectHandlerOnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandlerOnObjectTargetSelect
 
HookList< DestinationTargetSelectHandlerOnDestinationTargetSelect
 
virtual bool _Validate (SpellInfo const *entry)
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ AddMissingStack()

void spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::AddMissingStack ( )
inlineprivate
2012 {
2013 if (GetHitAura() && !_hadJumpingAura)
2014 {
2015 uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, GetHitUnit());
2018 if (_hadInitialAura)
2019 if (Aura* a = GetHitUnit()->GetAura(spellId))
2020 a->Remove(AURA_REMOVE_BY_DEFAULT);
2021 }
2022 }
std::uint32_t uint32
Definition: Define.h:108
@ AURA_REMOVE_BY_DEFAULT
Definition: SpellAuraDefines.h:392
@ AURA_REMOVE_BY_ENEMY_SPELL
Definition: SpellAuraDefines.h:394
#define sSpellMgr
Definition: SpellMgr.h:825
@ SPELL_NECROTIC_PLAGUE
Definition: boss_the_lich_king.cpp:129
@ EFFECT_1
Definition: SharedDefines.h:32
Definition: SpellAuras.h:87
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool periodicReset=false)
Definition: SpellAuras.cpp:1035
Aura * GetHitAura()
Definition: SpellScript.cpp:554
Unit * GetHitUnit()
Definition: SpellScript.cpp:448
SpellValue const * GetSpellValue()
Definition: SpellScript.cpp:657

References _hadInitialAura, _hadJumpingAura, AURA_REMOVE_BY_DEFAULT, AURA_REMOVE_BY_ENEMY_SPELL, EFFECT_1, SpellScript::GetHitAura(), SpellScript::GetHitUnit(), SpellScript::GetSpellValue(), Aura::ModStackAmount(), SPELL_NECROTIC_PLAGUE, and sSpellMgr.

Referenced by Register().

◆ CheckAura()

void spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::CheckAura ( SpellMissInfo  missInfo)
inlineprivate
1998 {
1999 if (missInfo != SPELL_MISS_NONE)
2000 {
2001 return;
2002 }
2003
2004 if (GetHitUnit()->HasAura(GetSpellInfo()->Id))
2005 _hadJumpingAura = true;
2006 else if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, GetHitUnit()))
2007 if (GetHitUnit()->HasAura(spellId))
2008 _hadInitialAura = true;
2009 }
@ SPELL_MISS_NONE
Definition: SharedDefines.h:1519
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:411

References _hadInitialAura, _hadJumpingAura, SpellScript::GetHitUnit(), SpellScript::GetSpellInfo(), SPELL_MISS_NONE, SPELL_NECROTIC_PLAGUE, and sSpellMgr.

Referenced by Register().

◆ FilterTargets()

void spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::FilterTargets ( std::list< WorldObject * > &  targets)
inlineprivate
1989 {
1991 if (targets.size() <= 1)
1992 return;
1993
1994 targets.resize(1);
1995 }
Definition: Object.h:682
Unit * GetCaster()
Definition: SpellScript.cpp:401

References SpellScript::GetCaster().

Referenced by Register().

◆ Load()

bool spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

1982 {
1983 _hadJumpingAura = false;
1984 _hadInitialAura = false;
1985 return true;
1986 }

References _hadInitialAura, and _hadJumpingAura.

◆ PrepareSpellScript()

spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::PrepareSpellScript ( spell_the_lich_king_necrotic_plague_SpellScript  )
private

◆ Register()

void spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2025 {
2029 }
#define BeforeSpellHitFn(F)
Definition: SpellScript.h:342
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition: SpellScript.h:354
#define SpellHitFn(F)
Definition: SpellScript.h:349
@ EFFECT_0
Definition: SharedDefines.h:31
@ TARGET_UNIT_SRC_AREA_ENTRY
Definition: SharedDefines.h:1416
HookList< HitHandler > OnHit
Definition: SpellScript.h:345
HookList< BeforeHitHandler > BeforeHit
Definition: SpellScript.h:341
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:353
void CheckAura(SpellMissInfo missInfo)
Definition: boss_the_lich_king.cpp:1997
void FilterTargets(std::list< WorldObject * > &targets)
Definition: boss_the_lich_king.cpp:1988

References AddMissingStack(), SpellScript::BeforeHit, BeforeSpellHitFn, CheckAura(), EFFECT_0, FilterTargets(), SpellScript::OnHit, SpellScript::OnObjectAreaTargetSelect, SpellHitFn, SpellObjectAreaTargetSelectFn, and TARGET_UNIT_SRC_AREA_ENTRY.

Member Data Documentation

◆ _hadInitialAura

bool spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::_hadInitialAura
private

Referenced by AddMissingStack(), CheckAura(), and Load().

◆ _hadJumpingAura

bool spell_the_lich_king_necrotic_plague_jump::spell_the_lich_king_necrotic_plague_SpellScript::_hadJumpingAura
private

Referenced by AddMissingStack(), CheckAura(), and Load().