mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8617] Update resilience affect for 3.2.x
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
f5db4fc163
commit
ddb67f69ca
5 changed files with 39 additions and 18 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue