From 8c2cc0f42fa6b6e7717962a87a1d2c584460ca0b Mon Sep 17 00:00:00 2001 From: rexelion Date: Sat, 4 Nov 2017 00:44:16 +0000 Subject: [PATCH] break invisibility first --- apps/openmw/mwgui/inventorywindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 063bc5c016..e1301edd43 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -653,13 +653,13 @@ namespace MWGui if (object.getClass().getName(object) == "") // objects without name presented to user can never be picked up return; - if (!object.getRefData().activate()) - return; - int count = object.getRefData().getCount(); MWWorld::Ptr player = MWMechanics::getPlayer(); MWBase::Environment::get().getWorld()->breakInvisibility(player); + + if (!object.getRefData().activate()) + return; MWBase::Environment::get().getMechanicsManager()->itemTaken(player, object, MWWorld::Ptr(), count);