Core/Spells: Fix priest talent "Divine Touch"

This commit is contained in:
Vincent-Michael
2013-06-28 22:50:22 +02:00
parent 23fcda3481
commit a7ba30fe4d
2 changed files with 17 additions and 8 deletions

View File

@@ -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);
}
}
}