diff options
| author | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2014-05-29 10:57:16 +0300 |
|---|---|---|
| committer | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2014-05-29 10:57:16 +0300 |
| commit | fadf35b90a96475cc2af31eab08a982641a6db0e (patch) | |
| tree | d3b7c49d6454f6beee99a3db2cd66c7d9d8d5c27 /indra/newview/llappearancemgr.cpp | |
| parent | a7b523b36a79bdb1ec8701ce20df4fb60fead1bf (diff) | |
MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
| -rwxr-xr-x | indra/newview/llappearancemgr.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index b7fe96727f..c76652c650 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1621,6 +1621,14 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id) items, LLInventoryModel::EXCLUDE_TRASH, not_worn); + + U32 max_items = gSavedSettings.getU32("WearFolderLimit"); + if (items.size() > max_items) + { + LL_WARNS() << "Folder contains more wearables than allowed to wear by WearFolderLimit setting" << LL_ENDL; + return false; + } + return items.size() > 0; } @@ -1647,6 +1655,14 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) items, LLInventoryModel::EXCLUDE_TRASH, is_worn); + + U32 max_items = gSavedSettings.getU32("WearFolderLimit"); + if (items.size() > max_items) + { + LL_WARNS() << "Folder contains more wearables than allowed to wear by WearFolderLimit setting" << LL_ENDL; + return false; + } + return items.size() > 0; } |
