summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-08-13 11:12:51 -0400
committerLoren Shih <seraph@lindenlab.com>2010-08-13 11:12:51 -0400
commit2f77724a48b51a97091a0e27f20767cfb14e78e5 (patch)
tree0fb2b6371c1edef5d63cc68fc5e3ec1fe4a622ef /indra/newview/llappearancemgr.cpp
parentb241d9769cf5ef21fa90e38ad21c2c4d49aab6f3 (diff)
EXT-8650 Can wear multiple copies of no-copy item via object links
* EXT-8688 Automatically detach same object is detected * EXT-8689 Cleanup detachAttachmentIntoInventory code When an object arrives as an attachment, if it's already attached then it's automatically detached.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 6fdd71bfbf..21a635e738 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2496,29 +2496,17 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
switch (item_to_remove->getType())
{
- case LLAssetType::AT_CLOTHING:
- if (get_is_item_worn(id_to_remove))
- {
- //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
- LLWearableBridge::removeItemFromAvatar(item_to_remove);
- }
- break;
- case LLAssetType::AT_OBJECT:
- gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
- gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_to_remove->getLinkedUUID());
- gMessageSystem->sendReliable( gAgent.getRegion()->getHost());
-
- {
- // this object might have been selected, so let the selection manager know it's gone now
- LLViewerObject *found_obj = gObjectList.findObject(item_to_remove->getLinkedUUID());
- if (found_obj)
+ case LLAssetType::AT_CLOTHING:
+ if (get_is_item_worn(id_to_remove))
{
- LLSelectMgr::getInstance()->remove(found_obj);
- };
- }
- default: break;
+ //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
+ LLWearableBridge::removeItemFromAvatar(item_to_remove);
+ }
+ break;
+ case LLAssetType::AT_OBJECT:
+ LLVOAvatarSelf::detachAttachmentIntoInventory(item_to_remove->getLinkedUUID());
+ default:
+ break;
}
// *HACK: Force to remove garbage from COF.