diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2008-08-12 17:29:50 +0000 |
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2008-08-12 17:29:50 +0000 |
| commit | 80be4c1d2d73982ea2df6dd7ef3fc3465416c882 (patch) | |
| tree | 9c5958572368be494b6302db8b03967a2c67b7ad /indra/newview/llinventorymodel.cpp | |
| parent | a09f7d41efdb945755efaeb07f7418c1f6e2a78b (diff) | |
QAR-767 Combined maint-render-7 and maint-viewer-9 merge
merge release@93398 viewer-merge-1@94007 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
| -rw-r--r-- | indra/newview/llinventorymodel.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index c05eea7bd8..9aa7f54fa9 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -56,6 +56,7 @@ #include "llcallbacklist.h" #include "llpreview.h" #include "llviewercontrol.h" +#include "llvoavatar.h" #include "llsdutil.h" #include <deque> @@ -3064,6 +3065,45 @@ void LLInventoryModel::dumpInventory() /// LLInventoryCollectFunctor implementations ///---------------------------------------------------------------------------- +// static +bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* item) +{ + if (!item) + return false; + + bool allowed = false; + LLVOAvatar* my_avatar = NULL; + + switch(item->getType()) + { + case LLAssetType::AT_CALLINGCARD: + // not allowed + break; + + case LLAssetType::AT_OBJECT: + my_avatar = gAgent.getAvatarObject(); + if(my_avatar && !my_avatar->isWearingAttachment(item->getUUID())) + { + allowed = true; + } + break; + + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + if(!gAgent.isWearingItem(item->getUUID())) + { + allowed = true; + } + break; + + default: + allowed = true; + break; + } + + return allowed; +} + bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) |
