mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-06 00:40:04 +00:00
commit
e4741db069
@ -290,11 +290,17 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
|||||||
if (iter.getType() == ContainerStore::Type_Armor)
|
if (iter.getType() == ContainerStore::Type_Armor)
|
||||||
{
|
{
|
||||||
if (old.getTypeName() == typeid(ESM::Armor).name())
|
if (old.getTypeName() == typeid(ESM::Armor).name())
|
||||||
|
{
|
||||||
|
if (old.get<ESM::Armor>()->mBase->mData.mType < test.get<ESM::Armor>()->mBase->mData.mType)
|
||||||
|
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))
|
if (old.getClass().getEffectiveArmorRating(old, actor) >= test.getClass().getEffectiveArmorRating(test, actor))
|
||||||
// old armor had better armor rating
|
// old armor had better armor rating
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// suitable armor should replace already equipped clothing
|
// suitable armor should replace already equipped clothing
|
||||||
}
|
}
|
||||||
else if (iter.getType() == ContainerStore::Type_Clothing)
|
else if (iter.getType() == ContainerStore::Type_Clothing)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user