aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2012-06-14 19:25:50 +0200
committerQAston <qaston@gmail.com>2012-06-14 19:25:50 +0200
commitaae45460edf522eb60316ca93a406e41749c5aa8 (patch)
treefe7ed77ab4c9868f3c1ef3fe162066c28c32a9ca /src/server/scripts/Spells
parent968c5b9fd5fe07adda50f420d116564eec5f8d6b (diff)
parent62c64920f17dc08834098c383a8a8ba7044e4c8d (diff)
Merge Pull Request #6744 'EmpoweredRenew'
Core/Spells: Fix Empowered Renew calculation Closes #6744
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index a20534effaf..dbc3a91012b 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -35,6 +35,8 @@ enum PriestSpells
PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED = 33619,
PRIEST_SPELL_REFLECTIVE_SHIELD_R1 = 33201,
PRIEST_SPELL_VAMPIRIC_TOUCH_DISPEL = 64085,
+ PRIEST_SPELL_EMPOWERED_RENEW = 63544,
+ PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT = 3021,
};
// Guardian Spirit
@@ -375,6 +377,48 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
}
};
+class spell_priest_renew : public SpellScriptLoader
+{
+ public:
+ spell_priest_renew() : SpellScriptLoader("spell_priest_renew") { }
+
+ class spell_priest_renew_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_priest_renew_AuraScript);
+
+ bool Load()
+ {
+ return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleApplyEffect(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ {
+ // Empowered Renew
+ if (AuraEffect const* empoweredRenewAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT, EFFECT_1))
+ {
+ uint32 heal = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), GetEffect(EFFECT_0)->GetAmount(), DOT);
+ heal = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT);
+
+ int32 basepoints0 = empoweredRenewAurEff->GetAmount() * GetEffect(EFFECT_0)->GetTotalTicks() * int32(heal) / 100;
+ caster->CastCustomSpell(GetTarget(), PRIEST_SPELL_EMPOWERED_RENEW, &basepoints0, NULL, NULL, true, NULL, aurEff);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_priest_renew_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_priest_renew_AuraScript();
+ }
+};
+
void AddSC_priest_spell_scripts()
{
new spell_pri_guardian_spirit();
@@ -385,4 +429,5 @@ void AddSC_priest_spell_scripts()
new spell_pri_mind_sear();
new spell_pri_prayer_of_mending_heal();
new spell_pri_vampiric_touch();
+ new spell_priest_renew();
}