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
 
GameObject * GetGObjCaster () 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< 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
1934 {
1935 SpellInfo const* procSpell = eventInfo.GetSpellInfo();
1936 if (procSpell &&
1938 {
1939 // Block re-proc from seal damage effects
1940 if ((procSpell->SpellFamilyFlags[1] & 0x800) &&
1941 !(procSpell->SpellFamilyFlags[0] & 0x800000))
1942 return false;
1943
1944 // Judgements only trigger seal procs with JotJ
1945 if (procSpell->SpellFamilyFlags[0] & 0x800000)
1946 return HasJudgementsOfTheJust(eventInfo.GetActor());
1947 }
1948
1949 return true;
1950 }
@ SPELLFAMILY_PALADIN
Definition SharedDefines.h:3794
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:301
Unit * GetActor()
Definition Unit.h:468
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:172

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
1953 {
1955
1956 if (!(eventInfo.GetTypeMask() & PROC_FLAG_DONE_MELEE_AUTO_ATTACK))
1957 {
1958 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1959 if (!spellInfo || spellInfo->SpellIconID != PALADIN_ICON_HAMMER_OF_THE_RIGHTEOUS)
1960 return;
1961 }
1962
1964 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), dotSpell, true, nullptr, aurEff);
1965 }
std::uint32_t uint32
Definition Define.h:107
@ PROC_FLAG_DONE_MELEE_AUTO_ATTACK
Definition SpellMgr.h:113
void PreventDefaultAction()
Definition SpellScript.cpp:991
Unit * GetActionTarget() const
Definition Unit.h:469
uint32 GetTypeMask() const
Definition Unit.h:471
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:1378
bool _isVengeance
Definition spell_paladin.cpp:2001
@ SPELL_PALADIN_HOLY_VENGEANCE
Definition spell_paladin.cpp:103
@ SPELL_PALADIN_BLOOD_CORRUPTION
Definition spell_paladin.cpp:104
@ PALADIN_ICON_HAMMER_OF_THE_RIGHTEOUS
Definition spell_paladin.cpp:116

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
1968 {
1970
1971 Unit* caster = eventInfo.GetActor();
1972 Unit* target = eventInfo.GetActionTarget();
1973
1974 AuraEffect const* sealDot = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PALADIN, 0x00000000, 0x00000800, 0x00000000, caster->GetGUID());
1975 if (!sealDot)
1976 return;
1977
1978 uint8 stacks = sealDot->GetBase()->GetStackAmount();
1979 uint8 maxStacks = sealDot->GetSpellInfo()->StackAmount;
1980
1982
1983 // Scale weapon damage % by stacks (6.6% per stack, up to 33% at 5 stacks)
1984 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(damageSpell);
1985 int32 amount = spellInfo->Effects[EFFECT_0].CalcValue();
1986 amount = (amount * stacks) / maxStacks;
1987
1988 caster->CastCustomSpell(damageSpell, SPELLVALUE_BASE_POINT0, amount, target, true, nullptr, aurEff);
1989 }
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:851
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:150
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:670
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:1435
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:5571
@ SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT
Definition spell_paladin.cpp:105
@ SPELL_PALADIN_SEAL_OF_CORRUPTION_EFFECT
Definition spell_paladin.cpp:106

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.

1927 {
1928 // Seal of Vengeance = 31801, Seal of Corruption = 53736
1929 _isVengeance = GetSpellInfo()->Id == 31801;
1930 return true;
1931 }
SpellInfo const * GetSpellInfo() const
Definition SpellScript.cpp:1011
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.

1992 {
1994 // HandleSeal reads stacks BEFORE HandleApplyDoT increments them,
1995 // so the attacking hit does not benefit from its own stack application.
1998 }
@ SPELL_AURA_DUMMY
Definition SpellAuraDefines.h:67
#define AuraEffectProcFn(F, I, N)
Definition SpellScript.h:851
#define AuraCheckProcFn(F)
Definition SpellScript.h:820
HookList< CheckProcHandler > DoCheckProc
Definition SpellScript.h:819
HookList< EffectProcHandler > OnEffectProc
Definition SpellScript.h:846
void HandleApplyDoT(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_paladin.cpp:1952
void HandleSeal(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_paladin.cpp:1967
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_paladin.cpp:1933

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: