Core/Misc: Fixed armor mitigation after 5675902485

* Also fixes gcc build with -Werror enabled
This commit is contained in:
joschiwald
2017-07-30 13:11:43 +02:00
parent 5675902485
commit 6f8b60101f
4 changed files with 94 additions and 88 deletions
+1 -1
View File
@@ -1603,7 +1603,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* attacker, Unit* victim, const uint32 d
if (G3D::fuzzyLe(armor, 0.0f))
return damage;
uint8 attackerLevel = attacker->getLevel();
uint8 attackerLevel = attacker->GetLevelForTarget(victim);
if (attackerLevel > sArmorMitigationByLvlGameTable.GetTableRowCount())
attackerLevel = sArmorMitigationByLvlGameTable.GetTableRowCount();