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 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
 
- 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
748 {
749 if (Unit* caster = GetOriginalCaster())
750 {
751 int32 heal = GetEffectValue();
752 if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_PRIEST_T9_HEALING_2P, EFFECT_0))
753 {
754 AddPct(heal, aurEff->GetAmount());
755 }
756
757 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_TWIN_DISCIPLINE_R1, EFFECT_0))
758 {
759 AddPct(heal, aurEff->GetAmount());
760 }
761 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_SPIRITUAL_HEALING_R1, EFFECT_0))
762 {
763 AddPct(heal, aurEff->GetAmount());
764 }
765 if (AuraEffect* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_DIVINE_PROVIDENCE_R1, EFFECT_0))
766 {
767 AddPct(heal, aurEff->GetAmount());
768 }
769
770 SetEffectValue(heal);
771 }
772 }
std::int32_t int32
Definition Define.h:103
@ EFFECT_0
Definition SharedDefines.h:31
T AddPct(T &base, U pct)
Definition Util.h:67
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
Definition Unit.h:636
@ SPELL_PRIEST_TWIN_DISCIPLINE_R1
Definition spell_priest.cpp:57
@ SPELL_PRIEST_DIVINE_PROVIDENCE_R1
Definition spell_priest.cpp:59
@ SPELL_PRIEST_T9_HEALING_2P
Definition spell_priest.cpp:49
@ SPELL_PRIEST_SPIRITUAL_HEALING_R1
Definition spell_priest.cpp:58

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.

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

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

◆ Validate()

bool spell_pri_prayer_of_mending_heal::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

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