merge.
commit
1941813479
|
|
@ -1392,6 +1392,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
|
|||
const LLUUID &item_id = getWearableItemID(type,i);
|
||||
popWearable(type,i);
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
|
||||
LLAppearanceManager::removeItemLinks(item_id,false);
|
||||
|
||||
//queryWearableCache(); // moved below
|
||||
if (old_wearable)
|
||||
|
|
@ -1408,6 +1409,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
|
|||
const LLUUID &item_id = getWearableItemID(type,index);
|
||||
popWearable(type, index);
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
|
||||
LLAppearanceManager::removeItemLinks(item_id,false);
|
||||
|
||||
//queryWearableCache(); // moved below
|
||||
|
||||
|
|
@ -1721,10 +1723,8 @@ void LLAgentWearables::queryWearableCache()
|
|||
// MULTI_WEARABLE: need a way to specify by wearable rather than by type.
|
||||
// User has picked "remove from avatar" from a menu.
|
||||
// static
|
||||
void LLAgentWearables::userRemoveWearable(void* userdata)
|
||||
void LLAgentWearables::userRemoveWearable(EWearableType& type)
|
||||
{
|
||||
EWearableType type = (EWearableType)(intptr_t)userdata;
|
||||
|
||||
if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&&
|
||||
//!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT)))
|
||||
{
|
||||
|
|
@ -1734,7 +1734,7 @@ void LLAgentWearables::userRemoveWearable(void* userdata)
|
|||
}
|
||||
|
||||
// static
|
||||
void LLAgentWearables::userRemoveAllClothes(void* userdata)
|
||||
void LLAgentWearables::userRemoveAllClothes()
|
||||
{
|
||||
// We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
|
||||
if (gFloaterCustomize)
|
||||
|
|
|
|||
|
|
@ -191,9 +191,9 @@ public:
|
|||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// MULTI-WEARABLE: assuming one wearable per type. Need upstream changes.
|
||||
static void userRemoveWearable(void* userdata); // userdata is EWearableType
|
||||
static void userRemoveAllClothes(void* userdata); // userdata is NULL
|
||||
|
||||
static void userRemoveWearable(EWearableType& type);
|
||||
static void userRemoveAllClothes();
|
||||
|
||||
typedef std::vector<LLViewerObject*> llvo_vec_t;
|
||||
|
||||
static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
|
||||
|
|
|
|||
|
|
@ -1103,14 +1103,16 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )
|
|||
bool linked_already = false;
|
||||
for (S32 i=0; i<item_array.count(); i++)
|
||||
{
|
||||
// Are these links to the same object?
|
||||
const LLViewerInventoryItem* inv_item = item_array.get(i).get();
|
||||
if (inv_item->getLinkedUUID() == item->getLinkedUUID())
|
||||
{
|
||||
linked_already = true;
|
||||
break;
|
||||
}
|
||||
// Are of same type but are not the same - new item will replace old.
|
||||
if (areMatchingWearables(vitem,inv_item))
|
||||
// Are these links to different items of the same wearable
|
||||
// type? If so, new item will replace old.
|
||||
// MULTI-WEARABLES: revisit if more than one per type is allowed.
|
||||
else if (areMatchingWearables(vitem,inv_item))
|
||||
{
|
||||
gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
|
||||
gInventory.purgeObject(inv_item->getUUID());
|
||||
|
|
|
|||
|
|
@ -7457,52 +7457,10 @@ class LLEditEnableTakeOff : public view_listener_t
|
|||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
std::string clothing = userdata.asString();
|
||||
bool new_value = false;
|
||||
if (clothing == "shirt")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_SHIRT);
|
||||
}
|
||||
if (clothing == "pants")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_PANTS);
|
||||
}
|
||||
if (clothing == "shoes")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_SHOES);
|
||||
}
|
||||
if (clothing == "socks")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_SOCKS);
|
||||
}
|
||||
if (clothing == "jacket")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_JACKET);
|
||||
}
|
||||
if (clothing == "gloves")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_GLOVES);
|
||||
}
|
||||
if (clothing == "undershirt")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT);
|
||||
}
|
||||
if (clothing == "underpants")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS);
|
||||
}
|
||||
if (clothing == "skirt")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_SKIRT);
|
||||
}
|
||||
if (clothing == "alpha")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_ALPHA);
|
||||
}
|
||||
if (clothing == "tattoo")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable(WT_TATTOO);
|
||||
}
|
||||
return new_value;
|
||||
EWearableType type = LLWearableDictionary::typeNameToType(clothing);
|
||||
if (type >= WT_SHAPE && type < WT_COUNT)
|
||||
return LLAgentWearables::selfHasWearable(type);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -7511,53 +7469,13 @@ class LLEditTakeOff : public view_listener_t
|
|||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
std::string clothing = userdata.asString();
|
||||
if (clothing == "shirt")
|
||||
if (clothing == "all")
|
||||
LLAgentWearables::userRemoveAllClothes();
|
||||
else
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SHIRT);
|
||||
}
|
||||
else if (clothing == "pants")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_PANTS);
|
||||
}
|
||||
else if (clothing == "shoes")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SHOES);
|
||||
}
|
||||
else if (clothing == "socks")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SOCKS);
|
||||
}
|
||||
else if (clothing == "jacket")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_JACKET);
|
||||
}
|
||||
else if (clothing == "gloves")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_GLOVES);
|
||||
}
|
||||
else if (clothing == "undershirt")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_UNDERSHIRT);
|
||||
}
|
||||
else if (clothing == "underpants")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_UNDERPANTS);
|
||||
}
|
||||
else if (clothing == "skirt")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SKIRT);
|
||||
}
|
||||
else if (clothing == "alpha")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_ALPHA);
|
||||
}
|
||||
else if (clothing == "tattoo")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_TATTOO);
|
||||
}
|
||||
else if (clothing == "all")
|
||||
{
|
||||
LLAgentWearables::userRemoveAllClothes(NULL);
|
||||
EWearableType type = LLWearableDictionary::typeNameToType(clothing);
|
||||
if (type >= WT_SHAPE && type < WT_COUNT)
|
||||
LLAgentWearables::userRemoveWearable(type);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 253 B |
Binary file not shown.
|
After Width: | Height: | Size: 253 B |
Loading…
Reference in New Issue