summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index ba357b2361..f20acbd016 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -250,18 +250,6 @@ BOOL get_can_item_be_worn(const LLUUID& id)
const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
return FALSE;
-
- if (LLAppearanceMgr::isLinkInCOF(item->getLinkedUUID()))
- {
- // an item having links in COF (i.e. a worn item)
- return FALSE;
- }
-
- if (gInventory.isObjectDescendentOf(id, LLAppearanceMgr::instance().getCOF()))
- {
- // a non-link object in COF (should not normally happen)
- return FALSE;
- }
switch(item->getType())
{
@@ -519,6 +507,19 @@ bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
return TRUE;
}
+bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+ if(mType == LLAssetType::AT_CATEGORY)
+ {
+ if(cat) return TRUE;
+ }
+ if(item)
+ {
+ if(item->getActualType() == mType) return TRUE;
+ }
+ return FALSE;
+}
+
bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if(mType == LLAssetType::AT_CATEGORY)