Core/Scripts: fix some spells double dipping from done/taken bonuses

Closes #21007

(cherry picked from commit ab3307fc23)
This commit is contained in:
ariel-
2018-01-17 13:01:18 -03:00
committed by Shauren
parent 3bc3b3eeeb
commit bb7869b31f

View File

@@ -852,12 +852,8 @@ public:
void OnRemoveEffect(Unit* target, AuraEffect const* aurEff, uint32 stack)
{
int32 healAmount = aurEff->GetAmount();
if (Unit* caster = GetCaster())
{
healAmount = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), healAmount, HEAL, aurEff->GetSpellEffectInfo(), stack);
healAmount = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, aurEff->GetSpellEffectInfo(), stack);
// restore mana
std::vector<SpellPowerCost> costs = GetSpellInfo()->CalcPowerCost(caster, GetSpellInfo()->GetSchoolMask());
auto m = std::find_if(costs.begin(), costs.end(), [](SpellPowerCost const& cost) { return cost.Power == POWER_MANA; });
@@ -870,10 +866,7 @@ public:
}
}
CastSpellExtraArgs args(aurEff);
args.OriginalCaster = GetCasterGUID();
args.AddSpellBP0(healAmount);
target->CastSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, args);
target->CastSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, { aurEff, GetCasterGUID() });
}
void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)