diff options
author | Melanie | 2013-08-18 03:00:32 +0100 |
---|---|---|
committer | Melanie | 2013-08-18 03:00:32 +0100 |
commit | aa7f4215a9e1a1fcad4c2ac4c1b0466bea9a123c (patch) | |
tree | 61f6f7106c3b75d776eb8b62835c2aff5a339b17 /OpenSim/Region | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Allow updating the wearable type of wearables that have a type of 0. (diff) | |
download | opensim-SC-aa7f4215a9e1a1fcad4c2ac4c1b0466bea9a123c.zip opensim-SC-aa7f4215a9e1a1fcad4c2ac4c1b0466bea9a123c.tar.gz opensim-SC-aa7f4215a9e1a1fcad4c2ac4c1b0466bea9a123c.tar.bz2 opensim-SC-aa7f4215a9e1a1fcad4c2ac4c1b0466bea9a123c.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 550ab87..4337b5a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -411,6 +411,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
411 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, | 411 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, |
412 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); | 412 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); |
413 | 413 | ||
414 | bool sendUpdate = false; | ||
415 | |||
414 | if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid | 416 | if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid |
415 | { | 417 | { |
416 | // Create a set of base permissions that will not include export if the user | 418 | // Create a set of base permissions that will not include export if the user |
@@ -484,11 +486,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
484 | item.SalePrice = itemUpd.SalePrice; | 486 | item.SalePrice = itemUpd.SalePrice; |
485 | item.SaleType = itemUpd.SaleType; | 487 | item.SaleType = itemUpd.SaleType; |
486 | 488 | ||
487 | InventoryService.UpdateItem(item); | 489 | if (item.InvType == (int)InventoryType.Wearable && (item.Flags & 0xf) == 0 && (itemUpd.Flags & 0xf) != 0) |
490 | { | ||
491 | item.Flags = (uint)(item.Flags & 0xfffffff0) | (itemUpd.Flags & 0xf); | ||
492 | sendUpdate = true; | ||
493 | } | ||
488 | 494 | ||
489 | // We cannot send out a bulk update here, since this will cause editing of clothing to start | 495 | InventoryService.UpdateItem(item); |
490 | // failing frequently. Possibly this is a race with a separate transaction that uploads the asset. | ||
491 | // remoteClient.SendBulkUpdateInventory(item); | ||
492 | } | 496 | } |
493 | 497 | ||
494 | if (UUID.Zero != transactionID) | 498 | if (UUID.Zero != transactionID) |
@@ -498,6 +502,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
498 | AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); | 502 | AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); |
499 | } | 503 | } |
500 | } | 504 | } |
505 | else | ||
506 | { | ||
507 | // This MAY be problematic, if it is, another solution | ||
508 | // needs to be found. If inventory item flags are updated | ||
509 | // the viewer's notion of the item needs to be refreshed. | ||
510 | if (sendUpdate) | ||
511 | remoteClient.SendBulkUpdateInventory(item); | ||
512 | } | ||
501 | } | 513 | } |
502 | else | 514 | else |
503 | { | 515 | { |