Merge pull request #1581

0.6.1-openmw-updates^2
scrawl 7 years ago
commit b12cd1f5b2
No known key found for this signature in database
GPG Key ID: 2E6CC3676024C402

@ -1129,6 +1129,15 @@ namespace MWClass
else
{
ratings[i] = it->getClass().getEffectiveArmorRating(*it, ptr);
// Take in account armor condition
const bool hasHealth = it->getClass().hasItemHealth(*it);
if (hasHealth)
{
int armorHealth = it->getClass().getItemHealth(*it);
int armorMaxHealth = it->getClass().getItemMaxHealth(*it);
ratings[i] *= (float(armorHealth) / armorMaxHealth);
}
}
}

Loading…
Cancel
Save