[9803] Fix typo in taken damage/healing bonus calculations and fix damage of 64085

This commit is contained in:
Laise 2010-04-29 13:14:22 +03:00
parent dbf19ba5e3
commit a69018efec
6 changed files with 16 additions and 11 deletions

View file

@ -4246,10 +4246,9 @@ void Unit::RemoveSingleAuraDueToSpellByDispel(uint32 spellId, uint64 casterGUID,
{
if(Unit* caster = dot->GetCaster())
{
int32 bp0 = dot->GetModifier()->m_amount;
uint32 bonusDamage = caster->SpellDamageBonusDone(this, spellEntry, bp0, DOT);
bonusDamage = SpellDamageBonusTaken(caster, spellEntry, bonusDamage, DOT);
bp0 = 8 * bonusDamage;
// use clean value for initial damage
int32 bp0 = dot->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1);
bp0 *= 8;
// Remove spell auras from stack
RemoveSingleSpellAurasByCasterSpell(spellId, casterGUID, AURA_REMOVE_BY_DISPEL);
@ -9286,7 +9285,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
// Taken fixed damage bonus auras
int32 TakenAdvertisedBenefit = SpellBaseDamageBonusTaken(GetSpellSchoolMask(spellProto));
float LvlPenalty = CalculateLevelPenalty(spellProto);
float LvlPenalty = pCaster->CalculateLevelPenalty(spellProto);
// Check for table values
if (SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id))
@ -9818,7 +9817,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
// Taken fixed damage bonus auras
int32 TakenAdvertisedBenefit = SpellBaseHealingBonusTaken(GetSpellSchoolMask(spellProto));
float LvlPenalty = CalculateLevelPenalty(spellProto);
float LvlPenalty = pCaster->CalculateLevelPenalty(spellProto);
// Check for table values
SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id);
@ -10365,7 +10364,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp
// scaling of non weapon based spells
if (!isWeaponDamageBasedSpell)
{
float LvlPenalty = CalculateLevelPenalty(spellProto);
float LvlPenalty = pCaster->CalculateLevelPenalty(spellProto);
// Check for table values
if (SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id))