Core/Unit: fix mess-up with CalcArmorReducedDamage parameter order

This commit is contained in:
ariel- authored and Ovahlord committed 2022-09-12 09:15:06 +02:00
1 parent 29fddba8fd
commit 5d8fc591ed
2 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -1705,7 +1705,7 @@ static float GetArmorReduction(float armor, uint8 attackerLevel)
// Spells with melee and magic school mask, decide whether resistance or armor absorb is higher
if (spellInfo && spellInfo->HasAttribute(SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC))
{
uint32 damageAfterArmor = Unit::CalcArmorReducedDamage(attacker, victim, damage, spellInfo, BASE_ATTACK);
uint32 damageAfterArmor = Unit::CalcArmorReducedDamage(attacker, victim, damage, spellInfo, spellInfo->GetAttackType());
float armorReduction = damage - damageAfterArmor;
// pick the lower one, the weakest resistance counts