From d76fb2d26601bf6d082762b68b157860d41fec0a Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 14 Aug 2015 13:38:39 +0200 Subject: [PATCH] Apply disintegrate only to weapons and armor (Fixes #2853) --- apps/openmw/mwmechanics/spellcasting.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index eacd674ede..b98bf9f96f 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -941,7 +941,8 @@ namespace MWMechanics MWWorld::InventoryStore& inv = ptr.getClass().getInventoryStore(ptr); MWWorld::ContainerStoreIterator item = inv.getSlot(slot); - if (item != inv.end()) + + if (item != inv.end() && (item.getType() == MWWorld::ContainerStore::Type_Armor || item.getType() == MWWorld::ContainerStore::Type_Weapon)) { if (!item->getClass().hasItemHealth(*item)) return false;