summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-02-26 09:27:14 -0800
committerRider Linden <rider@lindenlab.com>2018-02-26 09:27:14 -0800
commitb766466b3013e39831bcfcaef5d1089c07202afb (patch)
tree8d60793bc706efe39407cbec0a2c6c16b3bcec51 /indra/newview/llviewerinventory.cpp
parente9edd37cdb39639e1ab24e2e63d4f83432282c88 (diff)
Added settings inventory object with subtype
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 1ab7ec0156..d6f48a4c55 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1097,7 +1097,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, LLWearableType::EType wtype,
+ LLInventoryType::EType inv_type, U8 subtype,
U32 next_owner_perm,
LLPointer<LLInventoryCallback> cb)
{
@@ -1132,7 +1132,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
msg->addU32Fast(_PREHASH_NextOwnerMask, next_owner_perm);
msg->addS8Fast(_PREHASH_Type, (S8)asset_type);
msg->addS8Fast(_PREHASH_InvType, (S8)inv_type);
- msg->addU8Fast(_PREHASH_WearableType, (U8)wtype);
+ msg->addU8Fast(_PREHASH_WearableType, (U8)subtype);
msg->addStringFast(_PREHASH_Name, server_name);
msg->addStringFast(_PREHASH_Description, desc);
@@ -1146,9 +1146,36 @@ void create_inventory_callingcard(const LLUUID& avatar_id, const LLUUID& parent
LLAvatarNameCache::get(avatar_id, &av_name);
create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
parent, LLTransactionID::tnull, av_name.getUserName(), item_desc, LLAssetType::AT_CALLINGCARD,
- LLInventoryType::IT_CALLINGCARD, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb);
+ LLInventoryType::IT_CALLINGCARD, NO_INV_SUBTYPE, PERM_MOVE | PERM_TRANSFER, cb);
}
+void create_inventory_wearable(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,
+ LLWearableType::EType wtype,
+ U32 next_owner_perm,
+ LLPointer<LLInventoryCallback> cb)
+{
+ create_inventory_item(agent_id, session_id, parent, transaction_id,
+ name, desc, asset_type, LLInventoryType::IT_WEARABLE, static_cast<U8>(wtype),
+ next_owner_perm, cb);
+}
+
+void create_inventory_settings(const LLUUID& agent_id, const LLUUID& session_id,
+ const LLUUID& parent, const LLTransactionID& transaction_id,
+ const std::string& name,
+ const std::string& desc,
+ LLSettingsType settype,
+ U32 next_owner_perm,
+ LLPointer<LLInventoryCallback> cb)
+{
+ create_inventory_item(agent_id, session_id, parent, transaction_id,
+ name, desc, LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS,
+ static_cast<U8>(settype), next_owner_perm, cb);
+}
+
+
void copy_inventory_item(
const LLUUID& agent_id,
const LLUUID& current_owner,
@@ -1700,7 +1727,7 @@ void create_new_item(const std::string& name,
desc,
asset_type,
inv_type,
- NOT_WEARABLE,
+ NO_INV_SUBTYPE,
next_owner_perm,
cb);
}