aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorHomer Horwitz2009-05-09 21:11:12 +0000
committerHomer Horwitz2009-05-09 21:11:12 +0000
commit1d234ca83f64b31b559ace3f63ebbba9f4903778 (patch)
tree887ba461d3ff20432806672786cbb82ff39b9aa4 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parent* Code to make MRM debugging easier. (diff)
downloadopensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.zip
opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.gz
opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.bz2
opensim-SC_OLD-1d234ca83f64b31b559ace3f63ebbba9f4903778.tar.xz
Fixed handling of inventory a bit
- AssetType isn't InventoryType. Those enums contain different numbers. Use AssetType for the asset type, InventoryType for the inventory type. - The ToString method (or ToLower) of AssetType/InventoryType doesn't necessarily return the correct LLSD string. - Replaced several magic numbers by their corresponding enum. - Fixed the invType for gestures and animations in the library. This should fix Mantis #3610 and the non-terminating inventory loading
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 88416d3..1dcdc06 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -490,7 +490,7 @@ namespace OpenSim.Region.Framework.Scenes
490 490
491 if (Permissions.PropagatePermissions()) 491 if (Permissions.PropagatePermissions())
492 { 492 {
493 if (item.InvType == 6) 493 if (item.InvType == (int)InventoryType.Object)
494 { 494 {
495 itemCopy.BasePermissions &= ~(uint)(PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); 495 itemCopy.BasePermissions &= ~(uint)(PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer);
496 itemCopy.BasePermissions |= (item.CurrentPermissions & 7) << 13; 496 itemCopy.BasePermissions |= (item.CurrentPermissions & 7) << 13;
@@ -899,7 +899,7 @@ namespace OpenSim.Region.Framework.Scenes
899 TryGetAvatar(remoteClient.AgentId, out presence); 899 TryGetAvatar(remoteClient.AgentId, out presence);
900 byte[] data = null; 900 byte[] data = null;
901 901
902 if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum 902 if (invType == (sbyte)InventoryType.Landmark && presence != null)
903 { 903 {
904 Vector3 pos = presence.AbsolutePosition; 904 Vector3 pos = presence.AbsolutePosition;
905 string strdata = String.Format( 905 string strdata = String.Format(
@@ -1098,7 +1098,7 @@ namespace OpenSim.Region.Framework.Scenes
1098 1098
1099 if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) 1099 if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
1100 { 1100 {
1101 if (taskItem.InvType == 6) 1101 if (taskItem.InvType == (int)InventoryType.Object)
1102 agentItem.BasePermissions = taskItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13); 1102 agentItem.BasePermissions = taskItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13);
1103 else 1103 else
1104 agentItem.BasePermissions = taskItem.BasePermissions; 1104 agentItem.BasePermissions = taskItem.BasePermissions;