Core/Auras: Properly fix SPELL_AURA_DAMAGE_SHIELD

This commit is contained in:
tobmaps
2011-05-13 19:43:32 +07:00
parent 7fac55db66
commit 2d6912cd2e
4 changed files with 30 additions and 4 deletions
+10
View File
@@ -1456,6 +1456,16 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
uint32 damage = (*dmgShieldItr)->GetAmount();
int32 bonus = 0;
bonus += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, GetSpellSchoolMask(i_spellProto));
if (Unit * caster = (*dmgShieldItr)->GetCaster())
{
bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, GetSpellSchoolMask(i_spellProto));
bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, GetCreatureTypeMask());
}
if (bonus)
AddPctN(damage, bonus);
// No Unit::CalcAbsorbResist here - opcode doesn't send that data - this damage is probably not affected by that
pVictim->DealDamageMods(this, damage, NULL);