Core/Spells: Prevent apply spell power coefficients at bonus given by some "taken" damage mods

Closes #1991
This commit is contained in:
tobmaps
2011-08-20 03:06:15 +07:00
parent f94bd733e3
commit e1e91bacbe
3 changed files with 23 additions and 25 deletions
+6 -5
View File
@@ -10855,16 +10855,16 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
coeff = DotFactor;
}
float coeff2 = CalculateLevelPenalty(spellProto) * stack;
if (spellProto->SpellFamilyName) // TODO: fix this
TakenTotal+= int32(TakenAdvertisedBenefit * coeff * coeff2);
float factorMod = CalculateLevelPenalty(spellProto) * stack;
// level penalty still applied on Taken bonus - is it blizzlike?
TakenTotal+= int32(TakenAdvertisedBenefit * factorMod);
if (Player* modOwner = GetSpellModOwner())
{
coeff *= 100.0f;
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_BONUS_MULTIPLIER, coeff);
coeff /= 100.0f;
}
DoneTotal += int32(DoneAdvertisedBenefit * coeff * coeff2);
DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);
}
// Some spells don't benefit from done mods
@@ -11414,7 +11414,8 @@ uint32 Unit::SpellHealingBonus(Unit* victim, SpellInfo const* spellProto, uint32
}
factorMod *= CalculateLevelPenalty(spellProto) * stack;
TakenTotal += int32(TakenAdvertisedBenefit * coeff * factorMod);
// level penalty still applied on Taken bonus - is it blizzlike?
TakenTotal += int32(TakenAdvertisedBenefit * factorMod);
if (Player* modOwner = GetSpellModOwner())
{
coeff *= 100.0f;