summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-04-01 11:24:04 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-04-01 11:24:04 -0400
commit6eeb4247bbdbb8c7682fabf871dd0345a340593c (patch)
tree21c03fd1b82cc2062794f35068ada29a6c1f4243 /indra/newview/llagentwearables.cpp
parent98695056c2fbfb91de805d9e2a01cde23668c4d3 (diff)
updating some back-end functionality that will come in handy as we bring the UI up to date with multiwearables.
code reviewed by Seraph and Vir.
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r--indra/newview/llagentwearables.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index dad7c7e705..6e983747b2 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1595,7 +1595,6 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
}
// Assumes existing wearables are not dirty.
-// MULTI_WEARABLE: assumes one wearable per type.
void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items,
const LLDynamicArray< LLWearable* >& wearables,
BOOL remove)
@@ -1853,16 +1852,24 @@ void LLAgentWearables::queryWearableCache()
gAgentQueryManager.mWearablesCacheQueryID++;
}
-// 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(EWearableType& type)
+void LLAgentWearables::userRemoveWearable(const EWearableType &type, const U32 &index)
{
- if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&&
+ if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&&
//!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT)))
{
- // MULTI_WEARABLE: fixed to 0th for now.
- gAgentWearables.removeWearable(type,false,0);
+ gAgentWearables.removeWearable(type,false,index);
+ }
+}
+
+//static
+void LLAgentWearables::userRemoveWearablesOfType(const EWearableType &type)
+{
+ if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&&
+ //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT)))
+ {
+ gAgentWearables.removeWearable(type,true,0);
}
}