From 6c4ca38d56a46746dcba6fcd7e54c74a8723926b Mon Sep 17 00:00:00 2001 From: H0zen Date: Sat, 20 Feb 2016 02:21:27 +0200 Subject: [PATCH] Correct spell damage taken on melee attacks. - spell damage taken should be affected by auras id 14 (SPELL_AURA_MOD_DAMAGE_TAKEN) - fixes issue https://www.getmangos.eu/issue.php?issueid=605 --- src/game/Object/Unit.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index 28782e86..0bf808c0 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -1754,12 +1754,9 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) alreadyDone.insert(*i); uint32 damage = (*i)->GetModifier()->m_amount; SpellEntry const* i_spellProto = (*i)->GetSpellProto(); - // Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist? - // uint32 absorb; - // uint32 resist; - // CalcAbsorbResist(pVictim, SpellSchools(spellProto->School), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist); - // damage-=absorb + resist; + //apply bonus damage from existing auras with id = 14 (SPELL_AURA_MOD_DAMAGE_TAKEN) + damage += SpellBaseDamageBonusTaken(GetSpellSchoolMask(i_spellProto)); pVictim->DealDamageMods(this, damage, NULL); WorldPacket data(SMSG_SPELLDAMAGESHIELD, (8 + 8 + 4 + 4));