aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-30 16:08:24 +0000
committerTeravus Ovares2008-04-30 16:08:24 +0000
commita9cc76e0efba7496909d613c75b81de6a9c5d979 (patch)
treee83763d4dfb3b78ead9b5926dce1d2468b496845 /OpenSim/Region/Environment
parentmove IUserService into the OpenSim.Framework.Communications assembly (diff)
downloadopensim-SC_OLD-a9cc76e0efba7496909d613c75b81de6a9c5d979.zip
opensim-SC_OLD-a9cc76e0efba7496909d613c75b81de6a9c5d979.tar.gz
opensim-SC_OLD-a9cc76e0efba7496909d613c75b81de6a9c5d979.tar.bz2
opensim-SC_OLD-a9cc76e0efba7496909d613c75b81de6a9c5d979.tar.xz
* Long awaited patch from A_Biondi Mantis 923. Kept alive by Melanie. Thanks A_Biondi and Melanie!
* This builds but might not work. JustinCC will examine.. it may work out of the box.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs33
2 files changed, 31 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs
index 4d2ec5b..9fa173d 100644
--- a/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs
@@ -150,6 +150,7 @@ namespace OpenSim.Region.Environment.Modules
150 private string m_description = String.Empty; 150 private string m_description = String.Empty;
151 private sbyte type = 0; 151 private sbyte type = 0;
152 private sbyte invType = 0; 152 private sbyte invType = 0;
153 private byte wearableType = 0;
153 private uint nextPerm = 0; 154 private uint nextPerm = 0;
154 private bool m_finished = false; 155 private bool m_finished = false;
155 private bool m_createItem = false; 156 private bool m_createItem = false;
@@ -314,6 +315,7 @@ namespace OpenSim.Region.Environment.Modules
314 m_description = description; 315 m_description = description;
315 this.type = type; 316 this.type = type;
316 this.invType = invType; 317 this.invType = invType;
318 this.wearableType = wearableType;
317 nextPerm = nextOwnerMask; 319 nextPerm = nextOwnerMask;
318 Asset.Name = name; 320 Asset.Name = name;
319 Asset.Description = description; 321 Asset.Description = description;
@@ -386,6 +388,7 @@ namespace OpenSim.Region.Environment.Modules
386 item.BasePermissions = 2147483647; 388 item.BasePermissions = 2147483647;
387 item.CurrentPermissions = 2147483647; 389 item.CurrentPermissions = 2147483647;
388 item.NextPermissions = nextPerm; 390 item.NextPermissions = nextPerm;
391 item.Flags = (uint)wearableType;
389 392
390 userInfo.AddItem(ourClient.AgentId, item); 393 userInfo.AddItem(ourClient.AgentId, item);
391 ourClient.SendInventoryItemCreateUpdate(item); 394 ourClient.SendInventoryItemCreateUpdate(item);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index d41ede1..7e1b89f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -260,9 +260,11 @@ namespace OpenSim.Region.Environment.Scenes
260 /// <param name="name">The name of the updated item</param> 260 /// <param name="name">The name of the updated item</param>
261 /// <param name="description">The description of the updated item</param> 261 /// <param name="description">The description of the updated item</param>
262 /// <param name="nextOwnerMask">The permissions of the updated item</param> 262 /// <param name="nextOwnerMask">The permissions of the updated item</param>
263 public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID, 263/* public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID,
264 LLUUID itemID, string name, string description, 264 LLUUID itemID, string name, string description,
265 uint nextOwnerMask) 265 uint nextOwnerMask)*/
266 public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID,
267 LLUUID itemID, InventoryItemBase itemUpd)
266 { 268 {
267 CachedUserInfo userInfo 269 CachedUserInfo userInfo
268 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 270 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -275,9 +277,22 @@ namespace OpenSim.Region.Environment.Scenes
275 { 277 {
276 if (LLUUID.Zero == transactionID) 278 if (LLUUID.Zero == transactionID)
277 { 279 {
278 item.Name = name; 280 item.Name = itemUpd.Name;
279 item.Description = description; 281 item.Description = itemUpd.Description;
280 item.NextPermissions = nextOwnerMask; 282 item.NextPermissions = itemUpd.NextPermissions;
283 item.EveryOnePermissions = itemUpd.EveryOnePermissions;
284
285 // TODO: Requires sanity checks
286 //item.GroupID = itemUpd.GroupID;
287 //item.GroupOwned = itemUpd.GroupOwned;
288 //item.CreationDate = itemUpd.CreationDate;
289
290 // TODO: Check if folder changed and move item
291 //item.NextPermissions = itemUpd.Folder;
292 item.InvType = itemUpd.InvType;
293 item.SalePrice = itemUpd.SalePrice;
294 item.SaleType = itemUpd.SaleType;
295 item.Flags = itemUpd.Flags;
281 296
282 userInfo.UpdateItem(remoteClient.AgentId, item); 297 userInfo.UpdateItem(remoteClient.AgentId, item);
283 } 298 }
@@ -351,6 +366,12 @@ namespace OpenSim.Region.Environment.Scenes
351 itemCopy.BasePermissions = item.BasePermissions; 366 itemCopy.BasePermissions = item.BasePermissions;
352 itemCopy.CurrentPermissions = item.CurrentPermissions; 367 itemCopy.CurrentPermissions = item.CurrentPermissions;
353 368
369 itemCopy.GroupID = item.GroupID;
370 itemCopy.GroupOwned = item.GroupOwned;
371 itemCopy.Flags = item.Flags;
372 itemCopy.SalePrice = item.SalePrice;
373 itemCopy.SaleType = item.SaleType;
374
354 recipientUserInfo.AddItem(recipientClient.AgentId, itemCopy); 375 recipientUserInfo.AddItem(recipientClient.AgentId, itemCopy);
355 376
356 // Let the recipient client know about this new item 377 // Let the recipient client know about this new item
@@ -988,6 +1009,8 @@ namespace OpenSim.Region.Environment.Scenes
988 item.NextPermissions = objectGroup.RootPart.NextOwnerMask; 1009 item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
989 } 1010 }
990 1011
1012 // TODO: add the new fields (Flags, Sale info, etc)
1013
991 userInfo.AddItem(remoteClient.AgentId, item); 1014 userInfo.AddItem(remoteClient.AgentId, item);
992 remoteClient.SendInventoryItemCreateUpdate(item); 1015 remoteClient.SendInventoryItemCreateUpdate(item);
993 } 1016 }