From a25903b075a567b9c6eef47874b42433a5312150 Mon Sep 17 00:00:00 2001 From: glbwsk Date: Fri, 13 Oct 2017 14:39:44 +0200 Subject: [PATCH] fixed autoequiping rings by npc - now checks if right hand is free --- .gitignore | 1 + apps/openmw/mwworld/inventorystore.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index 9fbb82dbac..e9e518c7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ Makefile makefile build* prebuilt +cmake-build-debug/ ##windows build process /deps diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index 77141f2692..7c3271cc20 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -315,6 +315,14 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor) } else if (iter.getType() == ContainerStore::Type_Clothing) { + if (*iter2 == MWWorld::InventoryStore::Slot_LeftRing) + { + if (slots_.at(MWWorld::InventoryStore::Slot_RightRing) == end()) + { + continue; + } + } + if (old.getTypeName() == typeid(ESM::Clothing).name()) { // check value