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
 
Unit * GetCaster ()
 
GameObject * GetGObjCaster ()
 
Unit * GetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObject * GetExplTargetWorldObject ()
 
Unit * GetExplTargetUnit ()
 
GameObject * GetExplTargetGObj ()
 
Item * GetExplTargetItem ()
 
Unit * GetHitUnit ()
 
Creature * GetHitCreature ()
 
Player * GetHitPlayer ()
 
Item * GetHitItem ()
 
GameObject * GetHitGObj ()
 
WorldLocation * GetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
Spell * GetSpell ()
 
Aura * GetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
Item * GetCastItem ()
 
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< CastHandler > BeforeCast
 
HookList< CastHandler > OnCast
 
HookList< CastHandler > AfterCast
 
HookList< CheckCastHandler > OnCheckCast
 
HookList< EffectHandler > OnEffectLaunch
 
HookList< EffectHandler > OnEffectLaunchTarget
 
HookList< EffectHandler > OnEffectHit
 
HookList< EffectHandler > OnEffectHitTarget
 
HookList< BeforeHitHandler > BeforeHit
 
HookList< HitHandler > OnHit
 
HookList< HitHandler > AfterHit
 
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
 
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
 
- 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
1944 {
1945 if (GetHitAura() && !_hadJumpingAura)
1946 {
1947 uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, GetHitUnit());
1950 if (_hadInitialAura)
1951 if (Aura* a = GetHitUnit()->GetAura(spellId))
1952 a->Remove(AURA_REMOVE_BY_DEFAULT);
1953 }
1954 }
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:847
@ SPELL_NECROTIC_PLAGUE
Definition boss_the_lich_king.cpp:130
Definition SpellAuras.h:88
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool periodicReset=false)
Definition SpellAuras.cpp:1056
Aura * GetHitAura()
Definition SpellScript.cpp:559
Unit * GetHitUnit()
Definition SpellScript.cpp:453
SpellValue const * GetSpellValue()
Definition SpellScript.cpp:662
bool _hadInitialAura
Definition boss_the_lich_king.cpp:1965
bool _hadJumpingAura
Definition boss_the_lich_king.cpp:1964

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
1930 {
1931 if (missInfo != SPELL_MISS_NONE)
1932 {
1933 return;
1934 }
1935
1936 if (GetHitUnit()->HasAura(GetSpellInfo()->Id))
1937 _hadJumpingAura = true;
1938 else if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_NECROTIC_PLAGUE, GetHitUnit()))
1939 if (GetHitUnit()->HasAura(spellId))
1940 _hadInitialAura = true;
1941 }
@ SPELL_MISS_NONE
Definition SharedDefines.h:1523
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:416

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
1921 {
1923 if (targets.size() <= 1)
1924 return;
1925
1926 targets.resize(1);
1927 }
Definition Object.h:860
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.

1914 {
1915 _hadJumpingAura = false;
1916 _hadInitialAura = false;
1917 return true;
1918 }

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.

1957 {
1961 }
@ EFFECT_0
Definition SharedDefines.h:31
@ TARGET_UNIT_SRC_AREA_ENTRY
Definition SharedDefines.h:1420
#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:1929
void FilterTargets(std::list< WorldObject * > &targets)
Definition boss_the_lich_king.cpp:1920
void AddMissingStack()
Definition boss_the_lich_king.cpp:1943

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: