From 58d3758f4c8913ffd734b2d963a22bccd55b879a Mon Sep 17 00:00:00 2001 From: faq Date: Mon, 24 Sep 2012 18:33:54 +0300 Subject: Core/Spell: Correcting previos PR. splitamount is already calculated in core and removing not in. variable --- src/server/scripts/Spells/spell_paladin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index ad0ed6a7e20..e2f449e38a1 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -623,7 +623,7 @@ class spell_pal_divine_sacrifice : public SpellScriptLoader { PrepareAuraScript(spell_pal_divine_sacrifice_AuraScript); - uint32 splitPct, groupSize, minHpPct; + uint32 groupSize, minHpPct; int32 remainingAmount; Unit* caster; @@ -639,15 +639,13 @@ class spell_pal_divine_sacrifice : public SpellScriptLoader groupSize = 1; remainingAmount = (caster->CountPctFromMaxHealth(GetSpellInfo()->Effects[EFFECT_2].CalcValue(caster)) * groupSize); - splitPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(caster); minHpPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(caster); return true; } - void Split(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & splitAmount) + void Split(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & splitAmount) { - splitAmount = CalculatePctN(dmgInfo.GetDamage(), splitPct); remainingAmount -= splitAmount; // break when absorbed everything it could, or if the casters hp drops below 20% -- cgit v1.2.3