diff options
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2d8b058ed8..aef412d24a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4294,32 +4294,37 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ {
for(i = 0; i < wearable_count; ++i)
{
- if( gAgentWearables.isWearingItem (item_array.get(i)->getUUID()) )
+ LLViewerInventoryItem *item = item_array.get(i);
+ if (item->getType() == LLAssetType::AT_BODYPART)
+ continue;
+ if (gAgent.isTeen() && item->isWearableType() &&
+ (item->getWearableType() == WT_UNDERPANTS || item->getWearableType() == WT_UNDERSHIRT))
+ continue;
+ if( gAgentWearables.isWearingItem (item->getLinkedUUID()) )
{
- LLWearableList::instance().getAsset(item_array.get(i)->getAssetUUID(),
- item_array.get(i)->getName(),
- item_array.get(i)->getType(),
+ LLWearableList::instance().getAsset(item->getAssetUUID(),
+ item->getName(),
+ item->getType(),
LLWearableBridge::onRemoveFromAvatarArrived,
- new OnRemoveStruct(item_array.get(i)->getUUID()));
-
+ new OnRemoveStruct(item->getLinkedUUID()));
}
}
}
-
if (obj_count > 0)
{
for(i = 0; i < obj_count; ++i)
{
+ LLViewerInventoryItem *obj_item = obj_item_array.get(i);
gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
gMessageSystem->nextBlockFast(_PREHASH_ObjectData );
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
- gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item_array.get(i)->getUUID() );
+ gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->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( obj_item_array.get(i)->getUUID());
+ LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID());
if (found_obj)
{
LLSelectMgr::getInstance()->remove(found_obj);
@@ -4331,10 +4336,11 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ {
for(i = 0; i < gest_count; ++i)
{
- if ( LLGestureManager::instance().isGestureActive( gest_item_array.get(i)->getUUID()) )
+ LLViewerInventoryItem *gest_item = gest_item_array.get(i);
+ if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) )
{
- LLGestureManager::instance().deactivateGesture( gest_item_array.get(i)->getUUID() );
- gInventory.updateItem( gest_item_array.get(i) );
+ LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() );
+ gInventory.updateItem( gest_item );
gInventory.notifyObservers();
}
|