[EEP] II_FLAGS_WEARABLES_MASK -> II_FLAGS_SUBTYPE_MASK
This commit is contained in:
@@ -184,6 +184,6 @@ BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type)
|
|||||||
// static
|
// static
|
||||||
LLWearableType::EType LLWearableType::inventoryFlagsToWearableType(U32 flags)
|
LLWearableType::EType LLWearableType::inventoryFlagsToWearableType(U32 flags)
|
||||||
{
|
{
|
||||||
return (LLWearableType::EType)(flags & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
|
return (LLWearableType::EType)(flags & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1168,10 +1168,10 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
|
|||||||
static U32 WT_UNKNOWN = 16; // LLWearableType::WT_UNKNOWN
|
static U32 WT_UNKNOWN = 16; // LLWearableType::WT_UNKNOWN
|
||||||
static U32 WT_COUNT = 17; // LLWearableType::WT_COUNT
|
static U32 WT_COUNT = 17; // LLWearableType::WT_COUNT
|
||||||
// The last 8 bits of mFlags contain the wearable type.
|
// The last 8 bits of mFlags contain the wearable type.
|
||||||
static U32 II_FLAGS_WEARABLES_MASK = 0xff; // LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK
|
static U32 II_FLAGS_SUBTYPE_MASK = 0xff; // LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK
|
||||||
|
|
||||||
// The wearable type is stored in the lower 8 bits of mFlags.
|
// The wearable type is stored in the lower 8 bits of mFlags.
|
||||||
U32 wt = mFlags & II_FLAGS_WEARABLES_MASK;
|
U32 wt = mFlags & II_FLAGS_SUBTYPE_MASK;
|
||||||
|
|
||||||
// Because WT_UNKNOWN now has locally a special meaning, make sure we don't receive it from the server.
|
// Because WT_UNKNOWN now has locally a special meaning, make sure we don't receive it from the server.
|
||||||
if (wt == WT_UNKNOWN)
|
if (wt == WT_UNKNOWN)
|
||||||
|
|||||||
@@ -2,33 +2,26 @@
|
|||||||
* @file llinventorydefines.cpp
|
* @file llinventorydefines.cpp
|
||||||
* @brief Implementation of the inventory defines.
|
* @brief Implementation of the inventory defines.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-2010, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlife.com/developers/opensource/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlife.com/developers/opensource/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
|
|||||||
@@ -2,33 +2,26 @@
|
|||||||
* @file llinventorydefines.h
|
* @file llinventorydefines.h
|
||||||
* @brief LLInventoryDefines
|
* @brief LLInventoryDefines
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-2010, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlife.com/developers/opensource/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlife.com/developers/opensource/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LL_LLINVENTORYDEFINES_H
|
#ifndef LL_LLINVENTORYDEFINES_H
|
||||||
@@ -88,9 +81,10 @@ public:
|
|||||||
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
|
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
|
||||||
// Whether a returned object is composed of multiple items.
|
// Whether a returned object is composed of multiple items.
|
||||||
|
|
||||||
II_FLAGS_WEARABLES_MASK = 0xff,
|
II_FLAGS_SUBTYPE_MASK = 0x0000ff,
|
||||||
// Wearables use the low order byte of flags to store the
|
// Some items like Wearables and settings use the low order byte
|
||||||
// LLWearableType::EType enumeration found in newview/llwearable.h
|
// of flags to store the sub type of the inventory item.
|
||||||
|
// see LLWearableType::EType enumeration found in newview/llwearable.h
|
||||||
|
|
||||||
II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM |
|
II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM |
|
||||||
II_FLAGS_OBJECT_SLAM_SALE |
|
II_FLAGS_OBJECT_SLAM_SALE |
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
|
|||||||
BOOL item_is_multi = FALSE;
|
BOOL item_is_multi = FALSE;
|
||||||
if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
|
if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
|
||||||
|| inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
|
|| inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
|
||||||
&& !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
|
&& !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK))
|
||||||
{
|
{
|
||||||
item_is_multi = TRUE;
|
item_is_multi = TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,13 +193,13 @@ const std::string& LLInventoryIcon::getIconName(LLInventoryType::EIconName idx)
|
|||||||
|
|
||||||
LLInventoryType::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag)
|
LLInventoryType::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag)
|
||||||
{
|
{
|
||||||
const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & misc_flag);
|
const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK & misc_flag);
|
||||||
return LLWearableType::getIconName(wearable_type);
|
return LLWearableType::getIconName(wearable_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLInventoryType::EIconName LLInventoryIcon::assignSettingsIcon(U32 misc_flag)
|
LLInventoryType::EIconName LLInventoryIcon::assignSettingsIcon(U32 misc_flag)
|
||||||
{
|
{
|
||||||
switch (misc_flag & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK)
|
switch (misc_flag & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK)
|
||||||
{
|
{
|
||||||
case 0: return LLInventoryType::ICONNAME_SETTINGS_SKY;
|
case 0: return LLInventoryType::ICONNAME_SETTINGS_SKY;
|
||||||
case 1: return LLInventoryType::ICONNAME_SETTINGS_WATER;
|
case 1: return LLInventoryType::ICONNAME_SETTINGS_WATER;
|
||||||
|
|||||||
@@ -2259,7 +2259,7 @@ void LLViewerInventoryItem::setWearableType(LLWearableType::EType type)
|
|||||||
LL_WARNS() << "Calling LLViewerInventoryItem::setWearableType for item that does not have an unknown wearable type!?" << LL_ENDL;
|
LL_WARNS() << "Calling LLViewerInventoryItem::setWearableType for item that does not have an unknown wearable type!?" << LL_ENDL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mFlags = (mFlags & ~LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK) | type;
|
mFlags = (mFlags & ~LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK) | type;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t LLViewerInventoryItem::getCreationDate() const
|
time_t LLViewerInventoryItem::getCreationDate() const
|
||||||
|
|||||||
@@ -1035,7 +1035,7 @@ LLColor3 RlvHandler::camDrawColor() const
|
|||||||
case LLAssetType::AT_CLOTHING:
|
case LLAssetType::AT_CLOTHING:
|
||||||
{
|
{
|
||||||
// NOTE: without its asset we don't know what type the wearable is so we need to look at the item's flags instead
|
// NOTE: without its asset we don't know what type the wearable is so we need to look at the item's flags instead
|
||||||
LLWearableType::EType wtType = (LLWearableType::EType)(pItem->getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
|
LLWearableType::EType wtType = (LLWearableType::EType)(pItem->getFlags() & LLInventoryItem::II_FLAGS_SUBTYPE_MASK);
|
||||||
LLViewerInventoryCategory* pFolder;
|
LLViewerInventoryCategory* pFolder;
|
||||||
if ( (!isWearable(wtType)) ||
|
if ( (!isWearable(wtType)) ||
|
||||||
( (gAgent.getWearable(wtType)) && (!isRemovable(wtType)) ) ||
|
( (gAgent.getWearable(wtType)) && (!isRemovable(wtType)) ) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user