Added wearable index handling to LLAgentWearables to scope out further changes. Index is still always zero for now, so behavior should not have changed. (marked with // TODO: MULTI-WEARABLE)

This commit is contained in:
Shyotl
2012-01-21 19:02:19 -06:00
parent 4a4b786a60
commit 51746dc751
14 changed files with 357 additions and 292 deletions

View File

@@ -876,7 +876,7 @@ void RlvWearableLocks::addWearableTypeLock(LLWearableType::EType eType, const LL
if (eLock & RLV_LOCK_REMOVE)
{
m_WearableTypeRem.insert(std::pair<LLWearableType::EType, LLUUID>(eType, idRlvObj));
LLUUID item_id = gAgentWearables.getWearableItemID(eType);
LLUUID item_id = gAgentWearables.getWearableItemID(eType, 0); // TODO: MULTI-WEARABLE
if(item_id.notNull())
{
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
@@ -891,7 +891,7 @@ void RlvWearableLocks::addWearableTypeLock(LLWearableType::EType eType, const LL
bool RlvWearableLocks::canRemove(LLWearableType::EType eType) const
{
// NOTE: we return TRUE if the wearable type has at least one wearable that can be removed by the user
LLWearable* pWearable = gAgentWearables.getWearable(eType);
LLWearable* pWearable = gAgentWearables.getWearable(eType, 0); // TODO: MULTI-WEARABLE
if ( (pWearable) && (!isLockedWearable(pWearable)) )
return true;
return false;
@@ -901,7 +901,7 @@ bool RlvWearableLocks::canRemove(LLWearableType::EType eType) const
bool RlvWearableLocks::hasLockedWearable(LLWearableType::EType eType) const
{
// NOTE: we return TRUE if there is at least 1 non-removable wearable currently worn on this wearable type
LLWearable* pWearable = gAgentWearables.getWearable(eType);
LLWearable* pWearable = gAgentWearables.getWearable(eType, 0); // TODO: MULTI-WEARABLE
if ( (pWearable) && (isLockedWearable(pWearable)) )
return true;
return false;
@@ -972,7 +972,7 @@ void RlvWearableLocks::removeWearableTypeLock(LLWearableType::EType eType, const
{
if(m_WearableTypeRem.find(eType) == m_WearableTypeRem.end())
{
LLUUID item_id = gAgentWearables.getWearableItemID(eType);
LLUUID item_id = gAgentWearables.getWearableItemID(eType, 0); // TODO: MULTI-WEARABLE
if(item_id.notNull())
{
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);