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

Private Member Functions

 PrepareSpellScript (spell_pal_immunities)
 
bool Validate (SpellInfo const *) override
 
SpellCastResult CheckCast ()
 
void TriggerDebuffs ()
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from SpellScript
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Spell *spell)
 
void _InitHit ()
 
bool _IsEffectPrevented (SpellEffIndex effIndex)
 
bool _IsDefaultEffectPrevented (SpellEffIndex effIndex)
 
void _PrepareScriptCall (SpellScriptHookType hookType)
 
void _FinishScriptCall ()
 
bool IsInCheckCastHook () const
 
bool IsInTargetHook () const
 
bool IsInHitPhase () const
 
bool IsInEffectHook () const
 
Unit * GetCaster ()
 
GameObject * GetGObjCaster ()
 
Unit * GetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObject * GetExplTargetWorldObject ()
 
Unit * GetExplTargetUnit ()
 
GameObject * GetExplTargetGObj ()
 
Item * GetExplTargetItem ()
 
Unit * GetHitUnit ()
 
Creature * GetHitCreature ()
 
Player * GetHitPlayer ()
 
Item * GetHitItem ()
 
GameObject * GetHitGObj ()
 
WorldLocation * GetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
Spell * GetSpell ()
 
Aura * GetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
Item * GetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo const * GetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void Cancel ()
 
void SetCustomCastResultMessage (SpellCustomErrors result)
 
- 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 SpellScript
HookList< CastHandler > BeforeCast
 
HookList< CastHandler > OnCast
 
HookList< CastHandler > AfterCast
 
HookList< CheckCastHandler > OnCheckCast
 
HookList< EffectHandler > OnEffectLaunch
 
HookList< EffectHandler > OnEffectLaunchTarget
 
HookList< EffectHandler > OnEffectHit
 
HookList< EffectHandler > OnEffectHitTarget
 
HookList< BeforeHitHandler > BeforeHit
 
HookList< HitHandler > OnHit
 
HookList< HitHandler > AfterHit
 
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
 
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ CheckCast()

SpellCastResult spell_pal_immunities::CheckCast ( )
inlineprivate
2063 {
2064 Unit* caster = GetCaster();
2065
2066 // for HoP
2067 Unit* target = GetExplTargetUnit();
2068 if (!target)
2069 target = caster;
2070
2071 // "Cannot be used within $61987d. of using Avenging Wrath."
2074
2075 return SPELL_CAST_OK;
2076 }
@ SPELL_FAILED_TARGET_AURASTATE
Definition SharedDefines.h:1048
@ SPELL_CAST_OK
Definition SharedDefines.h:1126
Unit * GetExplTargetUnit()
Definition SpellScript.cpp:438
Unit * GetCaster()
Definition SpellScript.cpp:401
Definition Unit.h:667
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5764
@ SPELL_PALADIN_AVENGING_WRATH_MARKER
Definition spell_paladin.cpp:54
@ SPELL_PALADIN_FORBEARANCE
Definition spell_paladin.cpp:53

References SpellScript::GetCaster(), SpellScript::GetExplTargetUnit(), Unit::HasAura(), SPELL_CAST_OK, SPELL_FAILED_TARGET_AURASTATE, SPELL_PALADIN_AVENGING_WRATH_MARKER, and SPELL_PALADIN_FORBEARANCE.

Referenced by Register().

◆ PrepareSpellScript()

spell_pal_immunities::PrepareSpellScript ( spell_pal_immunities  )
private

◆ Register()

void spell_pal_immunities::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2090 {
2093 }
#define SpellCheckCastFn(F)
Definition SpellScript.h:329
#define SpellHitFn(F)
Definition SpellScript.h:349
HookList< CheckCastHandler > OnCheckCast
Definition SpellScript.h:328
HookList< HitHandler > AfterHit
Definition SpellScript.h:347
void TriggerDebuffs()
Definition spell_paladin.cpp:2078
SpellCastResult CheckCast()
Definition spell_paladin.cpp:2062

References SpellScript::AfterHit, CheckCast(), SpellScript::OnCheckCast, SpellCheckCastFn, SpellHitFn, and TriggerDebuffs().

◆ TriggerDebuffs()

void spell_pal_immunities::TriggerDebuffs ( )
inlineprivate
2079 {
2080 if (Unit* target = GetHitUnit())
2081 {
2082 // Blizz seems to just apply aura without bothering to cast
2086 }
2087 }
Unit * GetHitUnit()
Definition SpellScript.cpp:453
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:14751
@ SPELL_PALADIN_IMMUNE_SHIELD_MARKER
Definition spell_paladin.cpp:55

References Unit::AddAura(), SpellScript::GetCaster(), SpellScript::GetHitUnit(), SPELL_PALADIN_AVENGING_WRATH_MARKER, SPELL_PALADIN_FORBEARANCE, and SPELL_PALADIN_IMMUNE_SHIELD_MARKER.

Referenced by Register().

◆ Validate()

bool spell_pal_immunities::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

2053 {
2054 return ValidateSpellInfo(
2055 {
2059 });
2060 }
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition SpellScript.h:125

References SPELL_PALADIN_AVENGING_WRATH_MARKER, SPELL_PALADIN_FORBEARANCE, SPELL_PALADIN_IMMUNE_SHIELD_MARKER, and _SpellScript::ValidateSpellInfo().


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