aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.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/SceneObjectPartInventory.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 '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 6bf1654..d03fec2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -776,7 +776,7 @@ namespace OpenSim.Region.Framework.Scenes
776 776
777 foreach (TaskInventoryItem item in m_items.Values) 777 foreach (TaskInventoryItem item in m_items.Values)
778 { 778 {
779 if (item.InvType != 6) 779 if (item.InvType != (int)InventoryType.Object)
780 { 780 {
781 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0) 781 if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
782 mask &= ~((uint)PermissionMask.Copy >> 13); 782 mask &= ~((uint)PermissionMask.Copy >> 13);
@@ -809,7 +809,7 @@ namespace OpenSim.Region.Framework.Scenes
809 { 809 {
810 foreach (TaskInventoryItem item in m_items.Values) 810 foreach (TaskInventoryItem item in m_items.Values)
811 { 811 {
812 if (item.InvType == 6 && (item.CurrentPermissions & 7) != 0) 812 if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0)
813 { 813 {
814 if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0) 814 if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
815 item.CurrentPermissions &= ~(uint)PermissionMask.Copy; 815 item.CurrentPermissions &= ~(uint)PermissionMask.Copy;
@@ -840,7 +840,7 @@ namespace OpenSim.Region.Framework.Scenes
840 { 840 {
841 foreach (TaskInventoryItem item in m_items.Values) 841 foreach (TaskInventoryItem item in m_items.Values)
842 { 842 {
843 if (item.InvType == 10) 843 if (item.InvType == (int)InventoryType.LSL)
844 { 844 {
845 return true; 845 return true;
846 } 846 }
@@ -866,7 +866,7 @@ namespace OpenSim.Region.Framework.Scenes
866 866
867 foreach (TaskInventoryItem item in m_items.Values) 867 foreach (TaskInventoryItem item in m_items.Values)
868 { 868 {
869 if (item.InvType == 10) 869 if (item.InvType == (int)InventoryType.LSL)
870 { 870 {
871 foreach (IScriptModule e in engines) 871 foreach (IScriptModule e in engines)
872 { 872 {
@@ -890,7 +890,7 @@ namespace OpenSim.Region.Framework.Scenes
890 890
891 foreach (TaskInventoryItem item in m_items.Values) 891 foreach (TaskInventoryItem item in m_items.Values)
892 { 892 {
893 if (item.InvType == 10) 893 if (item.InvType == (int)InventoryType.LSL)
894 { 894 {
895 foreach (IScriptModule e in engines) 895 foreach (IScriptModule e in engines)
896 { 896 {