summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-11-05 10:52:23 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-11-05 10:52:23 -0500
commit13b4909a3ca066105695afc174642409daa46df2 (patch)
treef12b1c2d32fda122bcd1f6f79ebfe2226325d9a8 /indra/newview/llappearancemgr.cpp
parent52ed6ac28697ffcfd7300602aec34db8eafc171a (diff)
parent02e2235277a90f2e291557a429ae4e5de3e0d3b6 (diff)
merge
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 9451a30341..29534a4382 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1710,8 +1710,16 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
return false;
}
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
- return gInventory.hasMatchingDirectDescendent(outfit_cat_id, not_worn);
+ gInventory.collectDescendentsIf(outfit_cat_id,
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ not_worn);
+
+ return items.size() > 0;
}
bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
@@ -1729,8 +1737,16 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
}
// Check whether the outfit contains any wearables we aren't wearing already (STORM-702).
- LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
- return gInventory.hasMatchingDirectDescendent(outfit_cat_id, not_worn);
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLFindWearablesEx is_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
+ gInventory.collectDescendentsIf(outfit_cat_id,
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_worn);
+
+ return items.size() > 0;
}
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> cb)