mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 08:45:34 +00:00
parent
bef0b1f1d6
commit
bc60421615
1 changed files with 8 additions and 2 deletions
|
@ -291,9 +291,15 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
||||||
{
|
{
|
||||||
if (old.getTypeName() == typeid(ESM::Armor).name())
|
if (old.getTypeName() == typeid(ESM::Armor).name())
|
||||||
{
|
{
|
||||||
if (old.getClass().getEffectiveArmorRating(old, actor) >= test.getClass().getEffectiveArmorRating(test, actor))
|
if (old.get<ESM::Armor>()->mBase->mData.mType < test.get<ESM::Armor>()->mBase->mData.mType)
|
||||||
// old armor had better armor rating
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (old.get<ESM::Armor>()->mBase->mData.mType == test.get<ESM::Armor>()->mBase->mData.mType)
|
||||||
|
{
|
||||||
|
if (old.getClass().getEffectiveArmorRating(old, actor) >= test.getClass().getEffectiveArmorRating(test, actor))
|
||||||
|
// old armor had better armor rating
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// suitable armor should replace already equipped clothing
|
// suitable armor should replace already equipped clothing
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue