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 void Register ()=0
 
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 Register ()
 

Private Attributes

float _chance = 0.f
 
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
 
virtual bool _Validate (SpellInfo const *entry)
 
- 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:863
void ResetProcChance()
Definition: Unit.h:876

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:875
float _chance
Definition: spell_mage.cpp:1025

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
1022{ return _spell; }
Spell const * _spell
Definition: spell_mage.cpp:1026

References _spell.

◆ HandleAfterEffectProc()

void spell_mage_fingers_of_frost_proc_aura::HandleAfterEffectProc ( AuraEffect const *  ,
ProcEventInfo eventInfo 
)
inlineprivate
1001 {
1002 if (eventInfo.GetSpellPhaseMask() == PROC_SPELL_PHASE_HIT)
1003 {
1004 _chance = 100.f;
1005 }
1006 else if (eventInfo.GetSpellPhaseMask() == PROC_SPELL_PHASE_FINISH)
1007 {
1008 _chance = 0.f;
1009 _spell = nullptr;
1010 }
1011 }
@ PROC_SPELL_PHASE_FINISH
Definition: SpellMgr.h:245
@ PROC_SPELL_PHASE_HIT
Definition: SpellMgr.h:244

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

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
983 if (!_spell || _spell->GetDelayMoment() <= 0)
984 {
986 }
987 }
988 else
989 {
990 if (eventInfo.GetSpellPhaseMask() == PROC_SPELL_PHASE_FINISH || ((_spell && _spell->GetDelayMoment() > 0) || !eventInfo.GetDamageInfo()))
991 {
993 }
994
995 _chance = 0.f;
996 _spell = nullptr;
997 }
998 }
Spell const * GetProcSpell() const
Definition: Unit.h:867
DamageInfo * GetDamageInfo() const
Definition: Unit.h:868
uint64 GetDelayMoment() const
Definition: Spell.h:563
void PreventDefaultAction()
Definition: SpellScript.cpp:985

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

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.

1014 {
1019 }
@ 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
@ EFFECT_0
Definition: SharedDefines.h:30
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:1000
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.

Member Data Documentation

◆ _chance

float spell_mage_fingers_of_frost_proc_aura::_chance = 0.f
private

◆ _spell

Spell const* spell_mage_fingers_of_frost_proc_aura::_spell = nullptr
private