diff options
author | Kitto Flora | 2011-01-13 04:48:32 +0000 |
---|---|---|
committer | Kitto Flora | 2011-01-13 04:48:32 +0000 |
commit | c0134710f7f2c2ee51f51166f0987d3d6d589204 (patch) | |
tree | 77c933047a09377ec1647ed78f45cbbb29b9f246 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Add llLookAt() kinetic. Reduce StandUp +x offset to 0.3M. (diff) | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-c0134710f7f2c2ee51f51166f0987d3d6d589204.zip opensim-SC-c0134710f7f2c2ee51f51166f0987d3d6d589204.tar.gz opensim-SC-c0134710f7f2c2ee51f51166f0987d3d6d589204.tar.bz2 opensim-SC-c0134710f7f2c2ee51f51166f0987d3d6d589204.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 1f32362..7fa5509 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -310,8 +310,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
310 | { | 310 | { |
311 | item.Name = itemUpd.Name; | 311 | item.Name = itemUpd.Name; |
312 | item.Description = itemUpd.Description; | 312 | item.Description = itemUpd.Description; |
313 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) | ||
314 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; | ||
313 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; | 315 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; |
316 | if (item.EveryOnePermissions != (itemUpd.EveryOnePermissions & item.BasePermissions)) | ||
317 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteEveryone; | ||
314 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; | 318 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; |
319 | if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) | ||
320 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; | ||
315 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; | 321 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; |
316 | item.GroupID = itemUpd.GroupID; | 322 | item.GroupID = itemUpd.GroupID; |
317 | item.GroupOwned = itemUpd.GroupOwned; | 323 | item.GroupOwned = itemUpd.GroupOwned; |
@@ -326,9 +332,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
326 | // TODO: Check if folder changed and move item | 332 | // TODO: Check if folder changed and move item |
327 | //item.NextPermissions = itemUpd.Folder; | 333 | //item.NextPermissions = itemUpd.Folder; |
328 | item.InvType = itemUpd.InvType; | 334 | item.InvType = itemUpd.InvType; |
335 | |||
336 | if (item.SalePrice != itemUpd.SalePrice || | ||
337 | item.SaleType != itemUpd.SaleType) | ||
338 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamSale; | ||
329 | item.SalePrice = itemUpd.SalePrice; | 339 | item.SalePrice = itemUpd.SalePrice; |
330 | item.SaleType = itemUpd.SaleType; | 340 | item.SaleType = itemUpd.SaleType; |
331 | item.Flags = itemUpd.Flags; | ||
332 | 341 | ||
333 | InventoryService.UpdateItem(item); | 342 | InventoryService.UpdateItem(item); |
334 | } | 343 | } |
@@ -509,7 +518,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
509 | // Assign to the actual item. Make sure the slam bit is | 518 | // Assign to the actual item. Make sure the slam bit is |
510 | // set, if it wasn't set before. | 519 | // set, if it wasn't set before. |
511 | itemCopy.BasePermissions = basePerms; | 520 | itemCopy.BasePermissions = basePerms; |
512 | itemCopy.CurrentPermissions = ownerPerms | 16; // Slam | 521 | itemCopy.CurrentPermissions = ownerPerms; |
522 | itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | ||
513 | 523 | ||
514 | itemCopy.NextPermissions = item.NextPermissions; | 524 | itemCopy.NextPermissions = item.NextPermissions; |
515 | 525 | ||
@@ -1049,7 +1059,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1049 | else | 1059 | else |
1050 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | 1060 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; |
1051 | 1061 | ||
1052 | agentItem.CurrentPermissions |= 16; // Slam | 1062 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
1053 | agentItem.NextPermissions = taskItem.NextPermissions; | 1063 | agentItem.NextPermissions = taskItem.NextPermissions; |
1054 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | 1064 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
1055 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; | 1065 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; |
@@ -1260,7 +1270,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1260 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); | 1270 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1261 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & | 1271 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & |
1262 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); | 1272 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1263 | destTaskItem.CurrentPermissions |= 16; // Slam! | 1273 | destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
1264 | } | 1274 | } |
1265 | } | 1275 | } |
1266 | 1276 | ||
@@ -1434,6 +1444,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1434 | // Base ALWAYS has move | 1444 | // Base ALWAYS has move |
1435 | currentItem.BasePermissions |= (uint)PermissionMask.Move; | 1445 | currentItem.BasePermissions |= (uint)PermissionMask.Move; |
1436 | 1446 | ||
1447 | itemInfo.Flags = currentItem.Flags; | ||
1448 | |||
1437 | // Check if we're allowed to mess with permissions | 1449 | // Check if we're allowed to mess with permissions |
1438 | if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god | 1450 | if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god |
1439 | { | 1451 | { |
@@ -1451,6 +1463,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1451 | // Owner can't change base, and can change other | 1463 | // Owner can't change base, and can change other |
1452 | // only up to base | 1464 | // only up to base |
1453 | itemInfo.BasePermissions = currentItem.BasePermissions; | 1465 | itemInfo.BasePermissions = currentItem.BasePermissions; |
1466 | if (itemInfo.EveryonePermissions != currentItem.EveryonePermissions) | ||
1467 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteEveryone; | ||
1468 | if (itemInfo.GroupPermissions != currentItem.GroupPermissions) | ||
1469 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; | ||
1470 | if (itemInfo.CurrentPermissions != currentItem.CurrentPermissions) | ||
1471 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteOwner; | ||
1472 | if (itemInfo.NextPermissions != currentItem.NextPermissions) | ||
1473 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; | ||
1454 | itemInfo.EveryonePermissions &= currentItem.BasePermissions; | 1474 | itemInfo.EveryonePermissions &= currentItem.BasePermissions; |
1455 | itemInfo.GroupPermissions &= currentItem.BasePermissions; | 1475 | itemInfo.GroupPermissions &= currentItem.BasePermissions; |
1456 | itemInfo.CurrentPermissions &= currentItem.BasePermissions; | 1476 | itemInfo.CurrentPermissions &= currentItem.BasePermissions; |
@@ -1458,6 +1478,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1458 | } | 1478 | } |
1459 | 1479 | ||
1460 | } | 1480 | } |
1481 | else | ||
1482 | { | ||
1483 | if (itemInfo.BasePermissions != currentItem.BasePermissions) | ||
1484 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteBase; | ||
1485 | if (itemInfo.EveryonePermissions != currentItem.EveryonePermissions) | ||
1486 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteEveryone; | ||
1487 | if (itemInfo.GroupPermissions != currentItem.GroupPermissions) | ||
1488 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; | ||
1489 | if (itemInfo.CurrentPermissions != currentItem.CurrentPermissions) | ||
1490 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteOwner; | ||
1491 | if (itemInfo.NextPermissions != currentItem.NextPermissions) | ||
1492 | itemInfo.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; | ||
1493 | } | ||
1461 | 1494 | ||
1462 | // Next ALWAYS has move | 1495 | // Next ALWAYS has move |
1463 | itemInfo.NextPermissions |= (uint)PermissionMask.Move; | 1496 | itemInfo.NextPermissions |= (uint)PermissionMask.Move; |
@@ -1666,7 +1699,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1666 | srcTaskItem.NextPermissions; | 1699 | srcTaskItem.NextPermissions; |
1667 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & | 1700 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & |
1668 | srcTaskItem.NextPermissions; | 1701 | srcTaskItem.NextPermissions; |
1669 | destTaskItem.CurrentPermissions |= 16; // Slam! | 1702 | destTaskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
1670 | } | 1703 | } |
1671 | } | 1704 | } |
1672 | 1705 | ||