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
746 {
747 if (Unit* caster = GetOriginalCaster())
748 {
749 int32 heal = GetEffectValue();
750 if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_PRIEST_T9_HEALING_2P, EFFECT_0))
751 {
752 AddPct(heal, aurEff->GetAmount());
753 }
754
755 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_TWIN_DISCIPLINE_R1, EFFECT_0))
756 {
757 AddPct(heal, aurEff->GetAmount());
758 }
759 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_SPIRITUAL_HEALING_R1, EFFECT_0))
760 {
761 AddPct(heal, aurEff->GetAmount());
762 }
763 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_DIVINE_PROVIDENCE_R1, EFFECT_0))
764 {
765 AddPct(heal, aurEff->GetAmount());
766 }
767
768 SetEffectValue(heal);
769 }
770 }
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:55
@ SPELL_PRIEST_DIVINE_PROVIDENCE_R1
Definition: spell_priest.cpp:57
@ SPELL_PRIEST_T9_HEALING_2P
Definition: spell_priest.cpp:49
@ SPELL_PRIEST_SPIRITUAL_HEALING_R1
Definition: spell_priest.cpp:56
@ EFFECT_0
Definition: SharedDefines.h:31
Definition: Unit.h:1302
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.

773 {
775 }
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
@ SPELL_EFFECT_HEAL
Definition: SharedDefines.h:788
HookList< EffectHandler > OnEffectLaunchTarget
Definition: SpellScript.h:334
void HandleHeal(SpellEffIndex)
Definition: spell_priest.cpp:745

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

◆ Validate()

bool spell_pri_prayer_of_mending_heal::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual