From d9fe3aac994f97ae9b69bfb97ad1eb86fdf3a4e8 Mon Sep 17 00:00:00 2001 From: Rhiyo Date: Thu, 19 Oct 2017 22:46:08 +1030 Subject: [PATCH] fixed new clothing replacing old clothing of same value Found on the bug http://bugs.openmw.org/issues/4165. In original Morrowind, new clothing of the same value wouldn't replace old clothing. Tested with common and expensive clothing by selling to merchants and using the AddItem console command in original Morrowind. In OpenMW, before this change, new clothing of the same value would replace old clothing, tested with the same methods used above. --- apps/openmw/mwworld/inventorystore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index 50ee97d1c..3d3c8e4ef 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -340,7 +340,7 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor) if (old.getTypeName() == typeid(ESM::Clothing).name()) { // check value - if (old.getClass().getValue (old) > test.getClass().getValue (test)) + if (old.getClass().getValue (old) >= test.getClass().getValue (test)) // old clothing was more valuable continue; }