mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 11:45:34 +00:00
Apply disintegrate only to weapons and armor (Fixes #2853)
This commit is contained in:
parent
e8c9d3ea2a
commit
d76fb2d266
1 changed files with 2 additions and 1 deletions
|
@ -941,7 +941,8 @@ namespace MWMechanics
|
||||||
MWWorld::InventoryStore& inv = ptr.getClass().getInventoryStore(ptr);
|
MWWorld::InventoryStore& inv = ptr.getClass().getInventoryStore(ptr);
|
||||||
MWWorld::ContainerStoreIterator item =
|
MWWorld::ContainerStoreIterator item =
|
||||||
inv.getSlot(slot);
|
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))
|
if (!item->getClass().hasItemHealth(*item))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue