diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-08-13 11:12:51 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-08-13 11:12:51 -0400 |
commit | 5881252ab2e9ab31b05c1a54d8ce723013eee15a (patch) | |
tree | 5031e4f66cc11e722f874f702c09598bfb1f2050 /indra/newview/llappearancemgr.cpp | |
parent | 40eda71ff0cbc73efbe7520c73406cce39d763bb (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.cpp | 32 |
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. |