[9854] Fix negative amounts for spell base damage/healing and fix heal effects to correctly benefit from heal increasing/reducing auras

This commit is contained in:
Laise 2010-05-09 20:30:32 +03:00
parent 7915d60765
commit 4c3d2805bd
8 changed files with 45 additions and 34 deletions

View file

@ -6282,8 +6282,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{
triggered_spell_id = 25742;
float ap = GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY) +
pVictim->SpellBaseDamageBonusTaken(SPELL_SCHOOL_MASK_HOLY);
int32 holy = SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY);
if (holy < 0)
holy = 0;
basepoints[0] = GetAttackTime(BASE_ATTACK) * int32(ap*0.022f + 0.044f * holy) / 1000;
break;
}
@ -9307,7 +9308,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
TakenTotal+= int32(TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty);
}
float tmpDamage = (pdamage + TakenTotal * int32(stack)) * TakenTotalMod;
float tmpDamage = (int32(pdamage) + TakenTotal * int32(stack)) * TakenTotalMod;
return tmpDamage > 0 ? uint32(tmpDamage) : 0;
}