Covered forgotten old bound item checks

This commit is contained in:
Ragora 2014-09-13 18:59:13 -04:00
parent f250e3df4b
commit b8851790a6
3 changed files with 3 additions and 9 deletions

View file

@ -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) 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. // 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(); return MWWorld::Ptr();
bool setNewOwner = false; bool setNewOwner = false;

View file

@ -45,11 +45,8 @@ namespace MWGui
const ItemStack& item = mSourceModel->getItem(i); const ItemStack& item = mSourceModel->getItem(i);
// Bound items may not be stolen // Bound items may not be stolen
if (item.mBase.getCellRef().getRefId().size() > 6 if (item.mFlags & ItemStack::Flag_Bound)
&& item.mBase.getCellRef().getRefId().substr(0,6) == "bound_")
{
continue; continue;
}
if (std::find(mHiddenItems.begin(), mHiddenItems.end(), item) == mHiddenItems.end() if (std::find(mHiddenItems.begin(), mHiddenItems.end(), item) == mHiddenItems.end()
&& item.mType != ItemStack::Type_Equipped) && item.mType != ItemStack::Type_Equipped)

View file

@ -169,11 +169,8 @@ namespace MWGui
continue; continue;
// Bound items may not be bought // Bound items may not be bought
if (item.mBase.getCellRef().getRefId().size() > 6 if (item.mFlags & ItemStack::Flag_Bound)
&& item.mBase.getCellRef().getRefId().substr(0,6) == "bound_")
{
continue; continue;
}
// don't show equipped items // don't show equipped items
if(mMerchant.getClass().hasInventoryStore(mMerchant)) if(mMerchant.getClass().hasInventoryStore(mMerchant))