From 10a0136b4aa561f1bba7bc42a24643523d364ce2 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 17 Sep 2017 17:04:30 +0400 Subject: [PATCH] Cycle only through weapons which can be equipped by player (bug #4104) --- apps/openmw/mwgui/inventorywindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 6a2d3ff83..6eb0c554e 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -717,7 +717,9 @@ namespace MWGui lastId = item.getCellRef().getRefId(); - if (item.getClass().getTypeName() == typeid(ESM::Weapon).name() && isRightHandWeapon(item)) + if (item.getClass().getTypeName() == typeid(ESM::Weapon).name() && + isRightHandWeapon(item) && + item.getClass().canBeEquipped(item, player).first) { found = true; break;