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

Public Member Functions

Spell const * GetProcSpell () const
 
- 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
 
UnitGetCaster () const
 
WorldObjectGetOwner () const
 
UnitGetUnitOwner () const
 
DynamicObjectGetDynobjOwner () const
 
void Remove (uint32 removeMode=0)
 
AuraGetAura () 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
 
AuraEffectGetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
UnitGetTarget () 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 bool Validate (SpellInfo const *)
 
virtual bool Load ()
 
virtual void Unload ()
 

Private Member Functions

 PrepareAuraScript (spell_mage_fingers_of_frost_proc_aura)
 
bool CheckProc (ProcEventInfo &eventInfo)
 
bool AfterCheckProc (ProcEventInfo &eventInfo, bool isTriggeredAtSpellProcEvent)
 
void HandleOnEffectProc (AuraEffect const *, ProcEventInfo &eventInfo)
 
void HandleAfterEffectProc (AuraEffect const *, ProcEventInfo &eventInfo)
 
void ResetProcState ()
 
void Register ()
 

Private Attributes

float _chance = 0.f
 
std::optional< uint64_procSpellDelayMoment = std::nullopt
 
Spell const * _spell = nullptr
 

Additional Inherited Members

- 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< CheckAreaTargetHandlerDoCheckAreaTarget
 
HookList< AuraDispelHandlerOnDispel
 
HookList< AuraDispelHandlerAfterDispel
 
HookList< EffectApplyHandlerOnEffectApply
 
HookList< EffectApplyHandlerAfterEffectApply
 
HookList< EffectApplyHandlerOnEffectRemove
 
HookList< EffectApplyHandlerAfterEffectRemove
 
HookList< EffectPeriodicHandlerOnEffectPeriodic
 
HookList< EffectUpdatePeriodicHandlerOnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandlerDoEffectCalcAmount
 
HookList< EffectCalcPeriodicHandlerDoEffectCalcPeriodic
 
HookList< EffectCalcSpellModHandlerDoEffectCalcSpellMod
 
HookList< EffectAbsorbHandlerOnEffectAbsorb
 
HookList< EffectAbsorbHandlerAfterEffectAbsorb
 
HookList< EffectManaShieldHandlerOnEffectManaShield
 
HookList< EffectManaShieldHandlerAfterEffectManaShield
 
HookList< EffectSplitHandlerOnEffectSplit
 
HookList< CheckProcHandlerDoCheckProc
 
HookList< AfterCheckProcHandlerDoAfterCheckProc
 
HookList< AuraProcHandlerDoPrepareProc
 
HookList< AuraProcHandlerOnProc
 
HookList< AuraProcHandlerAfterProc
 
HookList< EffectProcHandlerOnEffectProc
 
HookList< EffectProcHandlerAfterEffectProc
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ AfterCheckProc()

bool spell_mage_fingers_of_frost_proc_aura::AfterCheckProc ( ProcEventInfo eventInfo,
bool  isTriggeredAtSpellProcEvent 
)
inlineprivate
967 {
968 if (eventInfo.GetSpellPhaseMask() != PROC_SPELL_PHASE_CAST)
969 {
970 eventInfo.ResetProcChance();
971 }
972
973 return isTriggeredAtSpellProcEvent;
974 }
@ PROC_SPELL_PHASE_CAST
Definition SpellMgr.h:243
uint32 GetSpellPhaseMask() const
Definition Unit.h:444
void ResetProcChance()
Definition Unit.h:457

References ProcEventInfo::GetSpellPhaseMask(), PROC_SPELL_PHASE_CAST, and ProcEventInfo::ResetProcChance().

Referenced by Register().

◆ CheckProc()

bool spell_mage_fingers_of_frost_proc_aura::CheckProc ( ProcEventInfo eventInfo)
inlineprivate
957 {
958 if (eventInfo.GetSpellPhaseMask() != PROC_SPELL_PHASE_CAST)
959 {
960 eventInfo.SetProcChance(_chance);
961 }
962
963 return true;
964 }
void SetProcChance(float chance)
Definition Unit.h:456
float _chance
Definition spell_mage.cpp:1030

References _chance, ProcEventInfo::GetSpellPhaseMask(), PROC_SPELL_PHASE_CAST, and ProcEventInfo::SetProcChance().

Referenced by Register().

◆ GetProcSpell()

Spell const * spell_mage_fingers_of_frost_proc_aura::GetProcSpell ( ) const
inline
1027{ return _spell; }
Spell const * _spell
Definition spell_mage.cpp:1034

References _spell.

◆ HandleAfterEffectProc()

void spell_mage_fingers_of_frost_proc_aura::HandleAfterEffectProc ( AuraEffect const *  ,
ProcEventInfo eventInfo 
)
inlineprivate
1000 {
1001 switch (eventInfo.GetSpellPhaseMask())
1002 {
1003 case PROC_SPELL_PHASE_HIT: _chance = 100.f; break;
1005 default: break;
1006 }
1007 }
@ PROC_SPELL_PHASE_FINISH
Definition SpellMgr.h:245
@ PROC_SPELL_PHASE_HIT
Definition SpellMgr.h:244
void ResetProcState()
Definition spell_mage.cpp:1009

References _chance, ProcEventInfo::GetSpellPhaseMask(), PROC_SPELL_PHASE_FINISH, PROC_SPELL_PHASE_HIT, and ResetProcState().

Referenced by Register().

◆ HandleOnEffectProc()

void spell_mage_fingers_of_frost_proc_aura::HandleOnEffectProc ( AuraEffect const *  ,
ProcEventInfo eventInfo 
)
inlineprivate
977 {
978 if (eventInfo.GetSpellPhaseMask() == PROC_SPELL_PHASE_CAST)
979 {
980 _chance = 100.f;
981 _spell = eventInfo.GetProcSpell();
982 _procSpellDelayMoment = std::nullopt;
983
984 if (!_spell || _spell->GetDelayMoment() <= 0)
986
987 if (_spell)
989 }
990 else
991 {
992 if (eventInfo.GetSpellPhaseMask() == PROC_SPELL_PHASE_FINISH || (_procSpellDelayMoment.value_or(0) > 0 || !eventInfo.GetDamageInfo()))
994
996 }
997 }
void PreventDefaultAction()
Definition SpellScript.cpp:985
Spell const * GetProcSpell() const
Definition Unit.h:448
DamageInfo * GetDamageInfo() const
Definition Unit.h:449
uint64 GetDelayMoment() const
Definition Spell.h:568
std::optional< uint64 > _procSpellDelayMoment
Definition spell_mage.cpp:1031

References _chance, _procSpellDelayMoment, _spell, ProcEventInfo::GetDamageInfo(), Spell::GetDelayMoment(), ProcEventInfo::GetProcSpell(), ProcEventInfo::GetSpellPhaseMask(), AuraScript::PreventDefaultAction(), PROC_SPELL_PHASE_CAST, PROC_SPELL_PHASE_FINISH, and ResetProcState().

Referenced by Register().

◆ PrepareAuraScript()

spell_mage_fingers_of_frost_proc_aura::PrepareAuraScript ( spell_mage_fingers_of_frost_proc_aura  )
private

References PrepareAuraScript().

Referenced by PrepareAuraScript().

◆ Register()

void spell_mage_fingers_of_frost_proc_aura::Register ( )
inlineprivatevirtual

Implements _SpellScript.

1017 {
1022 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELL_AURA_PROC_TRIGGER_SPELL
Definition SpellAuraDefines.h:105
#define AuraEffectProcFn(F, I, N)
Definition SpellScript.h:847
#define AuraCheckProcFn(F)
Definition SpellScript.h:818
#define AuraAfterCheckProcFn(F)
Definition SpellScript.h:823
HookList< EffectProcHandler > AfterEffectProc
Definition SpellScript.h:846
HookList< AfterCheckProcHandler > DoAfterCheckProc
Definition SpellScript.h:822
HookList< CheckProcHandler > DoCheckProc
Definition SpellScript.h:817
HookList< EffectProcHandler > OnEffectProc
Definition SpellScript.h:842
void HandleOnEffectProc(AuraEffect const *, ProcEventInfo &eventInfo)
Definition spell_mage.cpp:976
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_mage.cpp:956
void HandleAfterEffectProc(AuraEffect const *, ProcEventInfo &eventInfo)
Definition spell_mage.cpp:999
bool AfterCheckProc(ProcEventInfo &eventInfo, bool isTriggeredAtSpellProcEvent)
Definition spell_mage.cpp:966

References AfterCheckProc(), AuraScript::AfterEffectProc, AuraAfterCheckProcFn, AuraCheckProcFn, AuraEffectProcFn, CheckProc(), AuraScript::DoAfterCheckProc, AuraScript::DoCheckProc, EFFECT_0, HandleAfterEffectProc(), HandleOnEffectProc(), AuraScript::OnEffectProc, and SPELL_AURA_PROC_TRIGGER_SPELL.

◆ ResetProcState()

void spell_mage_fingers_of_frost_proc_aura::ResetProcState ( )
inlineprivate
1010 {
1011 _chance = 0.f;
1012 _spell = nullptr;
1013 _procSpellDelayMoment = std::nullopt;
1014 }

References _chance, _procSpellDelayMoment, and _spell.

Referenced by HandleAfterEffectProc(), and HandleOnEffectProc().

Member Data Documentation

◆ _chance

float spell_mage_fingers_of_frost_proc_aura::_chance = 0.f
private

◆ _procSpellDelayMoment

std::optional<uint64> spell_mage_fingers_of_frost_proc_aura::_procSpellDelayMoment = std::nullopt
private

◆ _spell

Spell const* spell_mage_fingers_of_frost_proc_aura::_spell = nullptr
private

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