Merge branch '4.3.4' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
commit
3276a786cc
7 files changed
+21
-27
No files matched your search
@@ -1018,7 +1018,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
||||
damage -= damageInfo->blocked;
|
||||
}
|
||||
|
||||
ApplyResilience(victim, &damage, crit);
|
||||
ApplyResilience(victim, &damage);
|
||||
break;
|
||||
}
|
||||
// Magical Attacks
|
||||
@@ -1032,7 +1032,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
||||
damage = SpellCriticalDamageBonus(spellInfo, damage, victim);
|
||||
}
|
||||
|
||||
ApplyResilience(victim, &damage, crit);
|
||||
ApplyResilience(victim, &damage);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1244,7 +1244,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
damageInfo->HitInfo |= HITINFO_AFFECTS_VICTIM;
|
||||
|
||||
int32 resilienceReduction = damageInfo->damage;
|
||||
ApplyResilience(victim, &resilienceReduction, damageInfo->hitOutCome == MELEE_HIT_CRIT);
|
||||
ApplyResilience(victim, &resilienceReduction);
|
||||
resilienceReduction = damageInfo->damage - resilienceReduction;
|
||||
damageInfo->damage -= resilienceReduction;
|
||||
damageInfo->cleanDamage += resilienceReduction;
|
||||
@@ -14435,7 +14435,7 @@ void Unit::SendPlaySpellVisualKit(uint32 id, uint32 unkParam)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::ApplyResilience(Unit const* victim, int32* damage, bool isCrit) const
|
||||
void Unit::ApplyResilience(Unit const* victim, int32* damage) const
|
||||
{
|
||||
// player mounted on multi-passenger mount is also classified as vehicle
|
||||
if (IsVehicle() || (victim->IsVehicle() && victim->GetTypeId() != TYPEID_PLAYER))
|
||||
@@ -14454,8 +14454,6 @@ void Unit::ApplyResilience(Unit const* victim, int32* damage, bool isCrit) const
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (isCrit)
|
||||
*damage -= target->GetCritDamageReduction(*damage);
|
||||
*damage -= target->GetDamageReduction(*damage);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user