aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2013-08-18 02:59:10 +0100
committerMelanie2013-08-18 02:59:10 +0100
commit3585b0a1392b7f9e93c4156d1d9fad224b4f187a (patch)
treefbfa4bd301aad92d804494ae79a9633e6fb47918 /OpenSim/Region
parentRemove mono compiler warnings from UserProfilesModule (diff)
downloadopensim-SC_OLD-3585b0a1392b7f9e93c4156d1d9fad224b4f187a.zip
opensim-SC_OLD-3585b0a1392b7f9e93c4156d1d9fad224b4f187a.tar.gz
opensim-SC_OLD-3585b0a1392b7f9e93c4156d1d9fad224b4f187a.tar.bz2
opensim-SC_OLD-3585b0a1392b7f9e93c4156d1d9fad224b4f187a.tar.xz
Allow updating the wearable type of wearables that have a type of 0.
This will allow viewers to fix broken wearables as they detect them.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs20
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 8e4e307..c4b07a5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -416,6 +416,8 @@ namespace OpenSim.Region.Framework.Scenes
416// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, 416// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags,
417// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); 417// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions);
418 418
419 bool sendUpdate = false;
420
419 if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid 421 if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid
420 { 422 {
421 // Create a set of base permissions that will not include export if the user 423 // Create a set of base permissions that will not include export if the user
@@ -489,11 +491,13 @@ namespace OpenSim.Region.Framework.Scenes
489 item.SalePrice = itemUpd.SalePrice; 491 item.SalePrice = itemUpd.SalePrice;
490 item.SaleType = itemUpd.SaleType; 492 item.SaleType = itemUpd.SaleType;
491 493
492 InventoryService.UpdateItem(item); 494 if (item.InvType == (int)InventoryType.Wearable && (item.Flags & 0xf) == 0 && (itemUpd.Flags & 0xf) != 0)
495 {
496 item.Flags = (uint)(item.Flags & 0xfffffff0) | (itemUpd.Flags & 0xf);
497 sendUpdate = true;
498 }
493 499
494 // We cannot send out a bulk update here, since this will cause editing of clothing to start 500 InventoryService.UpdateItem(item);
495 // failing frequently. Possibly this is a race with a separate transaction that uploads the asset.
496// remoteClient.SendBulkUpdateInventory(item);
497 } 501 }
498 502
499 if (UUID.Zero != transactionID) 503 if (UUID.Zero != transactionID)
@@ -503,6 +507,14 @@ namespace OpenSim.Region.Framework.Scenes
503 AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); 507 AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
504 } 508 }
505 } 509 }
510 else
511 {
512 // This MAY be problematic, if it is, another solution
513 // needs to be found. If inventory item flags are updated
514 // the viewer's notion of the item needs to be refreshed.
515 if (sendUpdate)
516 remoteClient.SendBulkUpdateInventory(item);
517 }
506 } 518 }
507 else 519 else
508 { 520 {