Merge pull request #1581

pull/1584/head
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