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

Private Member Functions

 PrepareAuraScript (spell_pal_seal_of_vengeance_aura)
 
bool Validate (SpellInfo const *) override
 
bool Load () override
 
bool CheckProc (ProcEventInfo &eventInfo)
 
void HandleApplyDoT (AuraEffect const *aurEff, ProcEventInfo &eventInfo)
 
void HandleSeal (AuraEffect const *aurEff, ProcEventInfo &eventInfo)
 
void Register () override
 

Private Attributes

bool _isVengeance = true
 

Additional Inherited Members

- Public Member Functions inherited from AuraScript
 AuraScript ()
 
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Aura *aura)
 
void _PrepareScriptCall (AuraScriptHookType hookType, AuraApplication const *aurApp=nullptr)
 
void _FinishScriptCall ()
 
bool _IsDefaultActionPrevented ()
 
void PreventDefaultAction ()
 
SpellInfo const * GetSpellInfo () const
 
uint32 GetId () const
 
ObjectGuid GetCasterGUID () const
 
Unit * GetCaster () const
 
WorldObject * GetOwner () const
 
Unit * GetUnitOwner () const
 
DynamicObject * GetDynobjOwner () const
 
void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
Aura * GetAura () const
 
AuraObjectType GetType () const
 
int32 GetDuration () const
 
void SetDuration (int32 duration, bool withMods=false)
 
void RefreshDuration ()
 
time_t GetApplyTime () const
 
int32 GetMaxDuration () const
 
void SetMaxDuration (int32 duration)
 
int32 CalcMaxDuration () const
 
bool IsExpired () const
 
bool IsPermanent () const
 
uint8 GetCharges () const
 
void SetCharges (uint8 charges)
 
uint8 CalcMaxCharges () const
 
bool ModCharges (int8 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool DropCharge (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
uint8 GetStackAmount () const
 
void SetStackAmount (uint8 num)
 
bool ModStackAmount (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool IsPassive () const
 
bool IsDeathPersistent () const
 
bool HasEffect (uint8 effIndex) const
 
AuraEffect * GetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
Unit * GetTarget () const
 
AuraApplication const * GetTargetApplication () const
 
- 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 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 AuraScript
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
 
HookList< AuraDispelHandler > OnDispel
 
HookList< AuraDispelHandler > AfterDispel
 
HookList< EffectApplyHandler > OnEffectApply
 
HookList< EffectApplyHandler > AfterEffectApply
 
HookList< EffectApplyHandler > OnEffectRemove
 
HookList< EffectApplyHandler > AfterEffectRemove
 
HookList< EffectPeriodicHandler > OnEffectPeriodic
 
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
 
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
 
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
 
HookList< EffectAbsorbHandler > OnEffectAbsorb
 
HookList< EffectAbsorbHandler > AfterEffectAbsorb
 
HookList< EffectManaShieldHandler > OnEffectManaShield
 
HookList< EffectManaShieldHandler > AfterEffectManaShield
 
HookList< EffectSplitHandler > OnEffectSplit
 
HookList< CheckProcHandler > DoCheckProc
 
HookList< CheckEffectProcHandler > DoCheckEffectProc
 
HookList< AfterCheckProcHandler > DoAfterCheckProc
 
HookList< AuraProcHandler > DoPrepareProc
 
HookList< AuraProcHandler > OnProc
 
HookList< AuraProcHandler > AfterProc
 
HookList< EffectProcHandler > OnEffectProc
 
HookList< EffectProcHandler > AfterEffectProc
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ CheckProc()

bool spell_pal_seal_of_vengeance_aura::CheckProc ( ProcEventInfo &  eventInfo)
inlineprivate
1932 {
1933 SpellInfo const* procSpell = eventInfo.GetSpellInfo();
1934 if (procSpell &&
1936 {
1937 // Block re-proc from seal damage effects
1938 if ((procSpell->SpellFamilyFlags[1] & 0x800) &&
1939 !(procSpell->SpellFamilyFlags[0] & 0x800000))
1940 return false;
1941
1942 // Judgements only trigger seal procs with JotJ
1943 if (procSpell->SpellFamilyFlags[0] & 0x800000)
1944 return HasJudgementsOfTheJust(eventInfo.GetActor());
1945 }
1946
1947 return true;
1948 }
@ SPELLFAMILY_PALADIN
Definition SharedDefines.h:3794
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:301
Unit * GetActor()
Definition Unit.h:462
Definition SpellInfo.h:340
flag96 SpellFamilyFlags
Definition SpellInfo.h:412
uint32 SpellFamilyName
Definition SpellInfo.h:411
static bool HasJudgementsOfTheJust(Unit const *caster)
Definition spell_paladin.cpp:171

References ProcEventInfo::GetActor(), ProcEventInfo::GetSpellInfo(), HasJudgementsOfTheJust(), SPELLFAMILY_PALADIN, SpellInfo::SpellFamilyFlags, and SpellInfo::SpellFamilyName.

Referenced by Register().

◆ HandleApplyDoT()

void spell_pal_seal_of_vengeance_aura::HandleApplyDoT ( AuraEffect const *  aurEff,
ProcEventInfo &  eventInfo 
)
inlineprivate
1951 {
1953
1954 if (!(eventInfo.GetTypeMask() & PROC_FLAG_DONE_MELEE_AUTO_ATTACK))
1955 {
1956 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1957 if (!spellInfo || spellInfo->SpellIconID != PALADIN_ICON_HAMMER_OF_THE_RIGHTEOUS)
1958 return;
1959 }
1960
1962 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), dotSpell, true, nullptr, aurEff);
1963 }
std::uint32_t uint32
Definition Define.h:107
@ PROC_FLAG_DONE_MELEE_AUTO_ATTACK
Definition SpellMgr.h:113
void PreventDefaultAction()
Definition SpellScript.cpp:1005
Unit * GetActionTarget() const
Definition Unit.h:463
uint32 GetTypeMask() const
Definition Unit.h:465
uint32 SpellIconID
Definition SpellInfo.h:404
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1372
bool _isVengeance
Definition spell_paladin.cpp:1999
@ SPELL_PALADIN_HOLY_VENGEANCE
Definition spell_paladin.cpp:102
@ SPELL_PALADIN_BLOOD_CORRUPTION
Definition spell_paladin.cpp:103
@ PALADIN_ICON_HAMMER_OF_THE_RIGHTEOUS
Definition spell_paladin.cpp:115

References _isVengeance, Unit::CastSpell(), ProcEventInfo::GetActionTarget(), ProcEventInfo::GetActor(), ProcEventInfo::GetSpellInfo(), ProcEventInfo::GetTypeMask(), PALADIN_ICON_HAMMER_OF_THE_RIGHTEOUS, AuraScript::PreventDefaultAction(), PROC_FLAG_DONE_MELEE_AUTO_ATTACK, SPELL_PALADIN_BLOOD_CORRUPTION, SPELL_PALADIN_HOLY_VENGEANCE, and SpellInfo::SpellIconID.

Referenced by Register().

◆ HandleSeal()

void spell_pal_seal_of_vengeance_aura::HandleSeal ( AuraEffect const *  aurEff,
ProcEventInfo &  eventInfo 
)
inlineprivate
1966 {
1968
1969 Unit* caster = eventInfo.GetActor();
1970 Unit* target = eventInfo.GetActionTarget();
1971
1972 AuraEffect const* sealDot = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PALADIN, 0x00000000, 0x00000800, 0x00000000, caster->GetGUID());
1973 if (!sealDot)
1974 return;
1975
1976 uint8 stacks = sealDot->GetBase()->GetStackAmount();
1977 uint8 maxStacks = sealDot->GetSpellInfo()->StackAmount;
1978
1980
1981 // Scale weapon damage % by stacks (6.6% per stack, up to 33% at 5 stacks)
1982 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(damageSpell);
1983 int32 amount = spellInfo->Effects[EFFECT_0].CalcValue();
1984 amount = (amount * stacks) / maxStacks;
1985
1986 caster->CastCustomSpell(damageSpell, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
1987 }
std::int32_t int32
Definition Define.h:103
std::uint8_t uint8
Definition Define.h:109
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELL_AURA_PERIODIC_DAMAGE
Definition SpellAuraDefines.h:66
@ SPELLVALUE_BASE_POINT0
Definition SpellDefines.h:121
#define sSpellMgr
Definition SpellMgr.h:847
Definition SpellAuraEffects.h:39
SpellInfo const * GetSpellInfo() const
Definition SpellAuraEffects.h:54
Aura * GetBase() const
Definition SpellAuraEffects.h:49
uint8 GetStackAmount() const
Definition SpellAuras.h:149
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:120
uint32 StackAmount
Definition SpellInfo.h:395
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
Definition SpellInfo.h:417
Definition Unit.h:667
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1429
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:5537
@ SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT
Definition spell_paladin.cpp:104
@ SPELL_PALADIN_SEAL_OF_CORRUPTION_EFFECT
Definition spell_paladin.cpp:105

References _isVengeance, Unit::CastCustomSpell(), EFFECT_0, SpellInfo::Effects, ProcEventInfo::GetActionTarget(), ProcEventInfo::GetActor(), Unit::GetAuraEffect(), AuraEffect::GetBase(), Object::GetGUID(), AuraEffect::GetSpellInfo(), Aura::GetStackAmount(), AuraScript::PreventDefaultAction(), SPELL_AURA_PERIODIC_DAMAGE, SPELL_PALADIN_SEAL_OF_CORRUPTION_EFFECT, SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT, SPELLFAMILY_PALADIN, SPELLVALUE_BASE_POINT0, sSpellMgr, and SpellInfo::StackAmount.

Referenced by Register().

◆ Load()

bool spell_pal_seal_of_vengeance_aura::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

1925 {
1926 // Seal of Vengeance = 31801, Seal of Corruption = 53736
1927 _isVengeance = GetSpellInfo()->Id == 31801;
1928 return true;
1929 }
SpellInfo const * GetSpellInfo() const
Definition SpellScript.cpp:1025
uint32 Id
Definition SpellInfo.h:344

References _isVengeance, AuraScript::GetSpellInfo(), and SpellInfo::Id.

◆ PrepareAuraScript()

spell_pal_seal_of_vengeance_aura::PrepareAuraScript ( spell_pal_seal_of_vengeance_aura  )
private

◆ Register()

void spell_pal_seal_of_vengeance_aura::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1990 {
1992 // HandleSeal reads stacks BEFORE HandleApplyDoT increments them,
1993 // so the attacking hit does not benefit from its own stack application.
1996 }
@ SPELL_AURA_DUMMY
Definition SpellAuraDefines.h:67
#define AuraEffectProcFn(F, I, N)
Definition SpellScript.h:868
#define AuraCheckProcFn(F)
Definition SpellScript.h:831
HookList< CheckProcHandler > DoCheckProc
Definition SpellScript.h:830
HookList< EffectProcHandler > OnEffectProc
Definition SpellScript.h:863
void HandleApplyDoT(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_paladin.cpp:1950
void HandleSeal(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_paladin.cpp:1965
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_paladin.cpp:1931

References AuraCheckProcFn, AuraEffectProcFn, CheckProc(), AuraScript::DoCheckProc, EFFECT_0, HandleApplyDoT(), HandleSeal(), AuraScript::OnEffectProc, and SPELL_AURA_DUMMY.

◆ Validate()

bool spell_pal_seal_of_vengeance_aura::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Member Data Documentation

◆ _isVengeance

bool spell_pal_seal_of_vengeance_aura::_isVengeance = true
private

Referenced by HandleApplyDoT(), HandleSeal(), and Load().


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