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

Private Member Functions

 PrepareSpellScript (spell_pri_prayer_of_mending_heal)
 
bool Validate (SpellInfo const *) override
 
void HandleHeal (SpellEffIndex)
 
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
 
UnitGetCaster ()
 
UnitGetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObjectGetExplTargetWorldObject ()
 
UnitGetExplTargetUnit ()
 
GameObjectGetExplTargetGObj ()
 
ItemGetExplTargetItem ()
 
UnitGetHitUnit ()
 
CreatureGetHitCreature ()
 
PlayerGetHitPlayer ()
 
ItemGetHitItem ()
 
GameObjectGetHitGObj ()
 
WorldLocationGetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
SpellGetSpell ()
 
AuraGetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
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 void Register ()=0
 
virtual bool Validate (SpellInfo 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< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< BeforeHitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList< ObjectAreaTargetSelectHandlerOnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandlerOnObjectTargetSelect
 
HookList< DestinationTargetSelectHandlerOnDestinationTargetSelect
 
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

◆ HandleHeal()

void spell_pri_prayer_of_mending_heal::HandleHeal ( SpellEffIndex  )
inlineprivate
745 {
746 if (Unit* caster = GetOriginalCaster())
747 {
748 int32 heal = GetEffectValue();
749 if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_PRIEST_T9_HEALING_2P, EFFECT_0))
750 {
751 AddPct(heal, aurEff->GetAmount());
752 }
753
754 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_TWIN_DISCIPLINE_R1, EFFECT_0))
755 {
756 AddPct(heal, aurEff->GetAmount());
757 }
758 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_SPIRITUAL_HEALING_R1, EFFECT_0))
759 {
760 AddPct(heal, aurEff->GetAmount());
761 }
762 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_DIVINE_PROVIDENCE_R1, EFFECT_0))
763 {
764 AddPct(heal, aurEff->GetAmount());
765 }
766
767 SetEffectValue(heal);
768 }
769 }
std::int32_t int32
Definition: Define.h:104
T AddPct(T &base, U pct)
Definition: Util.h:67
@ SPELL_PRIEST_TWIN_DISCIPLINE_R1
Definition: spell_priest.cpp:54
@ SPELL_PRIEST_DIVINE_PROVIDENCE_R1
Definition: spell_priest.cpp:56
@ SPELL_PRIEST_T9_HEALING_2P
Definition: spell_priest.cpp:49
@ SPELL_PRIEST_SPIRITUAL_HEALING_R1
Definition: spell_priest.cpp:55
@ EFFECT_0
Definition: SharedDefines.h:30
Definition: Unit.h:1290
Definition: SpellAuraEffects.h:39
void SetEffectValue(int32 value)
Definition: SpellScript.cpp:610
int32 GetEffectValue() const
Definition: SpellScript.cpp:600
Unit * GetOriginalCaster()
Definition: SpellScript.cpp:406

References AddPct(), EFFECT_0, SpellScript::GetEffectValue(), SpellScript::GetOriginalCaster(), SpellScript::SetEffectValue(), SPELL_PRIEST_DIVINE_PROVIDENCE_R1, SPELL_PRIEST_SPIRITUAL_HEALING_R1, SPELL_PRIEST_T9_HEALING_2P, and SPELL_PRIEST_TWIN_DISCIPLINE_R1.

Referenced by Register().

◆ PrepareSpellScript()

spell_pri_prayer_of_mending_heal::PrepareSpellScript ( spell_pri_prayer_of_mending_heal  )
private

◆ Register()

void spell_pri_prayer_of_mending_heal::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

772 {
774 }
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
@ SPELL_EFFECT_HEAL
Definition: SharedDefines.h:760
HookList< EffectHandler > OnEffectLaunchTarget
Definition: SpellScript.h:334
void HandleHeal(SpellEffIndex)
Definition: spell_priest.cpp:744

References EFFECT_0, HandleHeal(), SpellScript::OnEffectLaunchTarget, SPELL_EFFECT_HEAL, and SpellEffectFn.

◆ Validate()

bool spell_pri_prayer_of_mending_heal::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual