summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index e88f496fc9..ffd6a46fa2 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -36,7 +36,6 @@
#include "llnotificationsutil.h"
#include "llsdserialize.h"
#include "message.h"
-#include "indra_constants.h"
#include "llagent.h"
#include "llagentcamera.h"
@@ -299,10 +298,14 @@ void LLViewerInventoryItem::fetchFromServer(void) const
// we have to check region. It can be null after region was destroyed. See EXT-245
if (region)
{
- if( ALEXANDRIA_LINDEN_ID.getString() == mPermissions.getOwner().getString())
- url = region->getCapability("FetchLib");
- else
- url = region->getCapability("FetchInventory");
+ if(gAgent.getID() != mPermissions.getOwner())
+ {
+ url = region->getCapability("FetchLib");
+ }
+ else
+ {
+ url = region->getCapability("FetchInventory");
+ }
}
else
{
@@ -724,8 +727,8 @@ void LLViewerInventoryCategory::determineFolderType()
return;
if (item->isWearableType())
{
- const EWearableType wearable_type = item->getWearableType();
- const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type);
+ const LLWearableType::EType wearable_type = item->getWearableType();
+ const std::string& wearable_name = LLWearableType::getTypeName(wearable_type);
U64 valid_folder_types = LLViewerFolderType::lookupValidFolderTypes(wearable_name);
folder_valid |= valid_folder_types;
folder_invalid |= ~valid_folder_types;
@@ -909,7 +912,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
const LLUUID& parent, const LLTransactionID& transaction_id,
const std::string& name,
const std::string& desc, LLAssetType::EType asset_type,
- LLInventoryType::EType inv_type, EWearableType wtype,
+ LLInventoryType::EType inv_type, LLWearableType::EType wtype,
U32 next_owner_perm,
LLPointer<LLInventoryCallback> cb)
{
@@ -1196,10 +1199,10 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons
else
{
// Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary.
- EWearableType wearable_type = LLWearableDictionary::typeNameToType(type_name);
- if (wearable_type >= WT_SHAPE && wearable_type < WT_COUNT)
+ LLWearableType::EType wearable_type = LLWearableType::typeNameToType(type_name);
+ if (wearable_type >= LLWearableType::WT_SHAPE && wearable_type < LLWearableType::WT_COUNT)
{
- LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(wearable_type);
+ LLAssetType::EType asset_type = LLWearableType::getAssetType(wearable_type);
LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type);
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(folder_type);
LLFolderBridge::createWearable(parent_id, wearable_type);
@@ -1537,14 +1540,14 @@ bool LLViewerInventoryItem::isWearableType() const
return (getInventoryType() == LLInventoryType::IT_WEARABLE);
}
-EWearableType LLViewerInventoryItem::getWearableType() const
+LLWearableType::EType LLViewerInventoryItem::getWearableType() const
{
if (!isWearableType())
{
llwarns << "item is not a wearable" << llendl;
- return WT_INVALID;
+ return LLWearableType::WT_INVALID;
}
- return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
+ return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
}