diff --git a/apps/openmw/mwgui/inventoryitemmodel.cpp b/apps/openmw/mwgui/inventoryitemmodel.cpp index 8273b92a6..f45881770 100644 --- a/apps/openmw/mwgui/inventoryitemmodel.cpp +++ b/apps/openmw/mwgui/inventoryitemmodel.cpp @@ -62,7 +62,7 @@ void InventoryItemModel::removeItem (const ItemStack& item, size_t count) MWWorld::Ptr InventoryItemModel::moveItem(const ItemStack &item, size_t count, ItemModel *otherModel) { // Can't move conjured items: This is a general fix that also takes care of issues with taking conjured items via the 'Take All' button. - if (item.mBase.getCellRef().getRefId().size() > 6 && item.mBase.getCellRef().getRefId().substr(0,6) == "bound_") + if (item.mFlags & ItemStack::Flag_Bound) return MWWorld::Ptr(); bool setNewOwner = false; diff --git a/apps/openmw/mwgui/pickpocketitemmodel.cpp b/apps/openmw/mwgui/pickpocketitemmodel.cpp index fbe199e0e..f6882ada6 100644 --- a/apps/openmw/mwgui/pickpocketitemmodel.cpp +++ b/apps/openmw/mwgui/pickpocketitemmodel.cpp @@ -45,11 +45,8 @@ namespace MWGui const ItemStack& item = mSourceModel->getItem(i); // Bound items may not be stolen - if (item.mBase.getCellRef().getRefId().size() > 6 - && item.mBase.getCellRef().getRefId().substr(0,6) == "bound_") - { + if (item.mFlags & ItemStack::Flag_Bound) continue; - } if (std::find(mHiddenItems.begin(), mHiddenItems.end(), item) == mHiddenItems.end() && item.mType != ItemStack::Type_Equipped) diff --git a/apps/openmw/mwgui/tradeitemmodel.cpp b/apps/openmw/mwgui/tradeitemmodel.cpp index 7ac14f7b5..3abfac997 100644 --- a/apps/openmw/mwgui/tradeitemmodel.cpp +++ b/apps/openmw/mwgui/tradeitemmodel.cpp @@ -169,11 +169,8 @@ namespace MWGui continue; // Bound items may not be bought - if (item.mBase.getCellRef().getRefId().size() > 6 - && item.mBase.getCellRef().getRefId().substr(0,6) == "bound_") - { + if (item.mFlags & ItemStack::Flag_Bound) continue; - } // don't show equipped items if(mMerchant.getClass().hasInventoryStore(mMerchant))