From 00e46addc29de75c53ce81df1f3822fb6e999f9a Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 28 Nov 2012 02:48:21 +0100 Subject: [PATCH] GetArmorType fix --- apps/openmw/mwscript/containerextensions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwscript/containerextensions.cpp b/apps/openmw/mwscript/containerextensions.cpp index 530051b09..df2568fa4 100644 --- a/apps/openmw/mwscript/containerextensions.cpp +++ b/apps/openmw/mwscript/containerextensions.cpp @@ -212,7 +212,7 @@ namespace MWScript MWWorld::InventoryStore& invStore = MWWorld::Class::get(ptr).getInventoryStore (ptr); MWWorld::ContainerStoreIterator it = invStore.getSlot (slot); - if (it == invStore.end()) + if (it == invStore.end() || it->getTypeName () != typeid(ESM::Armor).name()) { runtime.push(-1); return;