diff options
-rw-r--r-- | sql/updates/world/2013_06_28_02_world_spell_script_names_434.sql | 3 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 22 |
2 files changed, 17 insertions, 8 deletions
diff --git a/sql/updates/world/2013_06_28_02_world_spell_script_names_434.sql b/sql/updates/world/2013_06_28_02_world_spell_script_names_434.sql new file mode 100644 index 00000000000..b1547f873e7 --- /dev/null +++ b/sql/updates/world/2013_06_28_02_world_spell_script_names_434.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`="spell_pri_renew"; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(139, "spell_pri_renew"); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index c1364c4e699..0a7eda8dddc 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -30,7 +30,7 @@ enum PriestSpells { SPELL_PRIEST_DIVINE_AEGIS = 47753, - SPELL_PRIEST_EMPOWERED_RENEW = 63544, + SPELL_PRIEST_DIVINE_TOUCH = 63544, SPELL_PRIEST_GLYPH_OF_LIGHTWELL = 55673, SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL = 56161, SPELL_PRIEST_GLYPH_OF_SHADOW = 107906, @@ -55,7 +55,7 @@ enum PriestSpells enum PriestSpellIcons { PRIEST_ICON_ID_BORROWED_TIME = 2899, - PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT = 3021, + PRIEST_ICON_ID_DIVINE_TOUCH_TALENT = 3021, PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874, }; @@ -647,6 +647,13 @@ class spell_pri_renew : public SpellScriptLoader { PrepareAuraScript(spell_pri_renew_AuraScript); + bool Validate(SpellInfo const* /*spellInfo*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_DIVINE_TOUCH)) + return false; + return true; + } + bool Load() { return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER; @@ -656,14 +663,13 @@ class spell_pri_renew : public SpellScriptLoader { if (Unit* caster = GetCaster()) { - // Empowered Renew - if (AuraEffect const* empoweredRenewAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT, EFFECT_1)) + // Divine Touch + if (AuraEffect const* empoweredRenewAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_DIVINE_TOUCH_TALENT, EFFECT_0)) { - uint32 heal = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), GetEffect(EFFECT_0)->GetAmount(), DOT); + uint32 heal = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), aurEff->GetAmount(), DOT); heal = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT); - - int32 basepoints0 = empoweredRenewAurEff->GetAmount() * GetEffect(EFFECT_0)->GetTotalTicks() * int32(heal) / 100; - caster->CastCustomSpell(GetTarget(), SPELL_PRIEST_EMPOWERED_RENEW, &basepoints0, NULL, NULL, true, NULL, aurEff); + int32 basepoints0 = CalculatePct(int32(heal) * aurEff->GetTotalTicks(), empoweredRenewAurEff->GetAmount()); + caster->CastCustomSpell(GetTarget(), SPELL_PRIEST_DIVINE_TOUCH, &basepoints0, NULL, NULL, true, NULL, aurEff); } } } |