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

Private Member Functions

 PrepareAuraScript (spell_warl_nether_protection)
 
bool Validate (SpellInfo const *) override
 
bool CheckProc (ProcEventInfo &eventInfo)
 
void HandleProc (AuraEffect const *aurEff, ProcEventInfo &eventInfo)
 
void Register () override
 

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 bool Load ()
 
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_warl_nether_protection::CheckProc ( ProcEventInfo &  eventInfo)
inlineprivate
1738 {
1739 if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
1740 {
1741 switch (GetFirstSchoolInMask(damageInfo->GetSchoolMask()))
1742 {
1743 case SPELL_SCHOOL_HOLY:
1744 case SPELL_SCHOOL_FIRE:
1746 case SPELL_SCHOOL_FROST:
1749 return true;
1750 default:
1751 break;
1752 }
1753 }
1754
1755 return false;
1756 }
@ SPELL_SCHOOL_SHADOW
Definition SharedDefines.h:276
@ SPELL_SCHOOL_NATURE
Definition SharedDefines.h:274
@ SPELL_SCHOOL_FROST
Definition SharedDefines.h:275
@ SPELL_SCHOOL_ARCANE
Definition SharedDefines.h:277
@ SPELL_SCHOOL_FIRE
Definition SharedDefines.h:273
@ SPELL_SCHOOL_HOLY
Definition SharedDefines.h:272
SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
Definition SharedDefines.h:306
Definition Unit.h:339
DamageInfo * GetDamageInfo() const
Definition Unit.h:472

References ProcEventInfo::GetDamageInfo(), GetFirstSchoolInMask(), SPELL_SCHOOL_ARCANE, SPELL_SCHOOL_FIRE, SPELL_SCHOOL_FROST, SPELL_SCHOOL_HOLY, SPELL_SCHOOL_NATURE, and SPELL_SCHOOL_SHADOW.

Referenced by Register().

◆ HandleProc()

void spell_warl_nether_protection::HandleProc ( AuraEffect const *  aurEff,
ProcEventInfo &  eventInfo 
)
inlineprivate
1759 {
1761 uint32 triggerspell = 0;
1762
1763 switch (GetFirstSchoolInMask(eventInfo.GetDamageInfo()->GetSchoolMask()))
1764 {
1765 case SPELL_SCHOOL_HOLY:
1767 break;
1768 case SPELL_SCHOOL_FIRE:
1770 break;
1773 break;
1774 case SPELL_SCHOOL_FROST:
1776 break;
1779 break;
1782 break;
1783 default:
1784 return;
1785 }
1786
1787 if (Unit* target = eventInfo.GetActionTarget())
1788 target->CastSpell(target, triggerspell, aurEff);
1789 }
std::uint32_t uint32
Definition Define.h:107
void PreventDefaultAction()
Definition SpellScript.cpp:1005
SpellSchoolMask GetSchoolMask() const
Definition Unit.h:372
Unit * GetActionTarget() const
Definition Unit.h:463
Definition Unit.h:667
@ SPELL_WARLOCK_NETHER_PROTECTION_FIRE
Definition spell_warlock.cpp:88
@ SPELL_WARLOCK_NETHER_PROTECTION_ARCANE
Definition spell_warlock.cpp:90
@ SPELL_WARLOCK_NETHER_PROTECTION_FROST
Definition spell_warlock.cpp:89
@ SPELL_WARLOCK_NETHER_PROTECTION_NATURE
Definition spell_warlock.cpp:92
@ SPELL_WARLOCK_NETHER_PROTECTION_HOLY
Definition spell_warlock.cpp:87
@ SPELL_WARLOCK_NETHER_PROTECTION_SHADOW
Definition spell_warlock.cpp:91

References ProcEventInfo::GetActionTarget(), ProcEventInfo::GetDamageInfo(), GetFirstSchoolInMask(), DamageInfo::GetSchoolMask(), AuraScript::PreventDefaultAction(), SPELL_SCHOOL_ARCANE, SPELL_SCHOOL_FIRE, SPELL_SCHOOL_FROST, SPELL_SCHOOL_HOLY, SPELL_SCHOOL_NATURE, SPELL_SCHOOL_SHADOW, SPELL_WARLOCK_NETHER_PROTECTION_ARCANE, SPELL_WARLOCK_NETHER_PROTECTION_FIRE, SPELL_WARLOCK_NETHER_PROTECTION_FROST, SPELL_WARLOCK_NETHER_PROTECTION_HOLY, SPELL_WARLOCK_NETHER_PROTECTION_NATURE, and SPELL_WARLOCK_NETHER_PROTECTION_SHADOW.

Referenced by Register().

◆ PrepareAuraScript()

spell_warl_nether_protection::PrepareAuraScript ( spell_warl_nether_protection  )
private

◆ Register()

void spell_warl_nether_protection::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1792 {
1795 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELL_AURA_PROC_TRIGGER_SPELL
Definition SpellAuraDefines.h:105
#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 HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_warlock.cpp:1758
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_warlock.cpp:1737

References AuraCheckProcFn, AuraEffectProcFn, CheckProc(), AuraScript::DoCheckProc, EFFECT_0, HandleProc(), AuraScript::OnEffectProc, and SPELL_AURA_PROC_TRIGGER_SPELL.

◆ Validate()


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