1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-05-02 06:41:23 +00:00

Do not replace an equpped ring of the same value

This commit is contained in:
Andrei Kortunov 2017-10-20 23:05:12 +04:00
parent 9be27193a3
commit e64f14b7ce

View file

@ -330,12 +330,10 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
Ptr rightRing = *slots_.at(Slot_RightRing); Ptr rightRing = *slots_.at(Slot_RightRing);
// we want to swap cheaper ring only if both are equipped // we want to swap cheaper ring only if both are equipped
if (rightRing.getClass().getValue(rightRing) < old.getClass().getValue(old)) if (old.getClass().getValue (old) >= rightRing.getClass().getValue (rightRing))
{
continue; continue;
} }
} }
}
if (old.getTypeName() == typeid(ESM::Clothing).name()) if (old.getTypeName() == typeid(ESM::Clothing).name())
{ {