[8617] Update resilience affect for 3.2.x

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Lutik 2009-10-10 14:49:31 +04:00 committed by VladimirMangos
parent f5db4fc163
commit ddb67f69ca
5 changed files with 39 additions and 18 deletions

View file

@ -1120,6 +1120,9 @@ void Unit::CalculateSpellDamage(SpellNonMeleeDamage *damageInfo, int32 damage, S
break;
}
if (GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER)
damage -= ((Player*)pVictim)->GetSpellDamageReduction(damage);
// Calculate absorb resist
if(damage > 0)
{
@ -1408,6 +1411,14 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
break;
}
if (GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER)
{
if (attackType != RANGED_ATTACK)
damage-=((Player*)pVictim)->GetMeleeDamageReduction(damage);
else
damage-=((Player*)pVictim)->GetRangedDamageReduction(damage);
}
// Calculate absorb resist
if(int32(damageInfo->damage) > 0)
{