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

Private Member Functions

 PrepareSpellScript (spell_the_lich_king_necrotic_plague_jump)
 
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 bool Validate (SpellInfo const *)
 
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
 
- 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::AddMissingStack ( )
inlineprivate
1947 {
1948 if (GetHitAura() && !_hadJumpingAura)
1949 {
1950 uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, GetHitUnit());
1953 if (_hadInitialAura)
1954 if (Aura* a = GetHitUnit()->GetAura(spellId))
1955 a->Remove(AURA_REMOVE_BY_DEFAULT);
1956 }
1957 }
std::uint32_t uint32
Definition Define.h:107
@ EFFECT_1
Definition SharedDefines.h:32
@ 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:130
Definition SpellAuras.h:87
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool periodicReset=false)
Definition SpellAuras.cpp:1021
Aura * GetHitAura()
Definition SpellScript.cpp:554
Unit * GetHitUnit()
Definition SpellScript.cpp:448
SpellValue const * GetSpellValue()
Definition SpellScript.cpp:657
bool _hadInitialAura
Definition boss_the_lich_king.cpp:1968
bool _hadJumpingAura
Definition boss_the_lich_king.cpp:1967

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::CheckAura ( SpellMissInfo  missInfo)
inlineprivate
1933 {
1934 if (missInfo != SPELL_MISS_NONE)
1935 {
1936 return;
1937 }
1938
1939 if (GetHitUnit()->HasAura(GetSpellInfo()->Id))
1940 _hadJumpingAura = true;
1941 else if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, GetHitUnit()))
1942 if (GetHitUnit()->HasAura(spellId))
1943 _hadInitialAura = true;
1944 }
@ 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::FilterTargets ( std::list< WorldObject * > &  targets)
inlineprivate
1924 {
1926 if (targets.size() <= 1)
1927 return;
1928
1929 targets.resize(1);
1930 }
Definition Object.h:701
Unit * GetCaster()
Definition SpellScript.cpp:401

References SpellScript::GetCaster().

Referenced by Register().

◆ Load()

bool spell_the_lich_king_necrotic_plague_jump::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

1917 {
1918 _hadJumpingAura = false;
1919 _hadInitialAura = false;
1920 return true;
1921 }

References _hadInitialAura, and _hadJumpingAura.

◆ PrepareSpellScript()

spell_the_lich_king_necrotic_plague_jump::PrepareSpellScript ( spell_the_lich_king_necrotic_plague_jump  )
private

◆ Register()

void spell_the_lich_king_necrotic_plague_jump::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1960 {
1964 }
@ EFFECT_0
Definition SharedDefines.h:31
@ TARGET_UNIT_SRC_AREA_ENTRY
Definition SharedDefines.h:1416
#define BeforeSpellHitFn(F)
Definition SpellScript.h:342
#define SpellObjectAreaTargetSelectFn(F, I, N)
Definition SpellScript.h:354
#define SpellHitFn(F)
Definition SpellScript.h:349
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:1932
void FilterTargets(std::list< WorldObject * > &targets)
Definition boss_the_lich_king.cpp:1923
void AddMissingStack()
Definition boss_the_lich_king.cpp:1946

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::_hadInitialAura
private

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

◆ _hadJumpingAura

bool spell_the_lich_king_necrotic_plague_jump::_hadJumpingAura
private

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


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