- internal : added supporting code for "Detach Folder" RLVa lock checks

--HG--
branch : RLVa
master
Kitty Barnett 2014-01-26 20:00:57 +01:00
parent 379abd9b3d
commit ce3ff8d279
3 changed files with 26 additions and 10 deletions

View File

@ -2943,21 +2943,25 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id)
LLInventoryModel::EXCLUDE_TRASH);
for (S32 i=0; i<item_array.count(); i++)
{
const LLInventoryItem* item = item_array.get(i).get();
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
#if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
const LLViewerInventoryItem* item = item_array.get(i).get();
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{
// NOTE-RLVa: debug-only, can be removed down the line
if (rlv_handler_t::isEnabled())
{
RLV_ASSERT(rlvPredCanRemoveItem(item));
}
#endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
// [/RLVa:KB]
gInventory.purgeObject(item->getUUID());
}
#endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
// [/RLVa:KB]
// const LLInventoryItem* item = item_array.get(i).get();
// if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
// {
// gInventory.purgeObject(item->getUUID());
// }
}
}

View File

@ -671,7 +671,7 @@ bool rlvPredCanNotWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWea
}
// Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
bool rlvPredCanRemoveItem(const LLInventoryItem* pItem)
bool rlvPredCanRemoveItem(const LLViewerInventoryItem* pItem)
{
if ( (pItem) && (RlvForceWear::isWearableItem(pItem)) )
{
@ -694,7 +694,7 @@ bool rlvPredCanRemoveItem(const LLInventoryItem* pItem)
}
// Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
bool rlvPredCanNotRemoveItem(const LLInventoryItem* pItem)
bool rlvPredCanNotRemoveItem(const LLViewerInventoryItem* pItem)
{
return !rlvPredCanRemoveItem(pItem);
}

View File

@ -236,8 +236,8 @@ protected:
bool rlvPredCanWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWearMask);
bool rlvPredCanNotWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWearMask);
bool rlvPredCanRemoveItem(const LLInventoryItem* pItem);
bool rlvPredCanNotRemoveItem(const LLInventoryItem* pItem);
bool rlvPredCanRemoveItem(const LLViewerInventoryItem* pItem);
bool rlvPredCanNotRemoveItem(const LLViewerInventoryItem* pItem);
struct RlvPredCanWearItem
{
@ -255,6 +255,18 @@ protected:
ERlvWearMask m_eWearMask;
};
struct RlvPredCanRemoveItem
{
RlvPredCanRemoveItem() {}
bool operator()(const LLViewerInventoryItem* pItem) { return rlvPredCanRemoveItem(pItem); }
};
struct RlvPredCanNotRemoveItem
{
RlvPredCanNotRemoveItem() {}
bool operator()(const LLViewerInventoryItem* pItem) { return rlvPredCanNotRemoveItem(pItem); }
};
struct RlvPredIsEqualOrLinkedItem
{
RlvPredIsEqualOrLinkedItem(const LLViewerInventoryItem* pItem) : m_pItem(pItem) {}