diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 33 |
1 files changed, 28 insertions, 5 deletions
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 | } |