diff options
5 files changed, 52 insertions, 14 deletions
diff --git a/sql/updates/world/2012_06_14_05_world_spelldifficulty_dbc.sql b/sql/updates/world/2012_06_14_05_world_spelldifficulty_dbc.sql index 198a2bf839d..1f218027f91 100644 --- a/sql/updates/world/2012_06_14_05_world_spelldifficulty_dbc.sql +++ b/sql/updates/world/2012_06_14_05_world_spelldifficulty_dbc.sql @@ -1,4 +1,4 @@ -SET @DIFF := xxxx; -- set by TDB team +SET @DIFF := 3268; -- set by TDB team DELETE FROM `spelldifficulty_dbc` WHERE `id` BETWEEN @DIFF+0 AND @DIFF+2; INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`,`spellid2`,`spellid3`) VALUES (@DIFF+0,50811,61547,0,0), diff --git a/sql/updates/world/2012_06_14_07_world_spell_bonus_data.sql b/sql/updates/world/2012_06_14_07_world_spell_bonus_data.sql new file mode 100644 index 00000000000..aa9c1b732c4 --- /dev/null +++ b/sql/updates/world/2012_06_14_07_world_spell_bonus_data.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_bonus_data` WHERE `entry`=63544; +INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`ap_dot_bonus`,`comments`) VALUES +(63544,0,0,0,0,'Priest - Empowered Renew'); diff --git a/sql/updates/world/2012_06_14_08_world_spell_script_names.sql b/sql/updates/world/2012_06_14_08_world_spell_script_names.sql new file mode 100644 index 00000000000..a9faa529143 --- /dev/null +++ b/sql/updates/world/2012_06_14_08_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=-139; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(-139,'spell_priest_renew'); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 4dda1c731a7..9456a219274 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1221,19 +1221,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b caster->CastCustomSpell(caster, 75999, &heal, NULL, NULL, true, NULL, GetEffect(0)); } } - // Renew - else if (GetSpellInfo()->SpellFamilyFlags[0] & 0x00000040 && GetEffect(0)) - { - // Empowered Renew - if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 3021, 1)) - { - uint32 damage = caster->SpellHealingBonusDone(target, GetSpellInfo(), GetEffect(0)->GetAmount(), HEAL); - damage = target->SpellHealingBonusTaken(caster, GetSpellInfo(), damage, HEAL); - - int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * int32(damage) / 100; - caster->CastCustomSpell(target, 63544, &basepoints0, NULL, NULL, true, NULL, GetEffect(0)); - } - } // Power Word: Shield else if (m_spellInfo->SpellFamilyFlags[0] & 0x1 && m_spellInfo->SpellFamilyFlags[2] & 0x400 && GetEffect(0)) { 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(); } |