mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
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
This commit is contained in:
@@ -776,7 +776,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType != 6)
|
||||
if (item.InvType != (int)InventoryType.Object)
|
||||
{
|
||||
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
mask &= ~((uint)PermissionMask.Copy >> 13);
|
||||
@@ -809,7 +809,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType == 6 && (item.CurrentPermissions & 7) != 0)
|
||||
if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0)
|
||||
{
|
||||
if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
|
||||
item.CurrentPermissions &= ~(uint)PermissionMask.Copy;
|
||||
@@ -840,7 +840,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType == 10)
|
||||
if (item.InvType == (int)InventoryType.LSL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -866,7 +866,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType == 10)
|
||||
if (item.InvType == (int)InventoryType.LSL)
|
||||
{
|
||||
foreach (IScriptModule e in engines)
|
||||
{
|
||||
@@ -890,7 +890,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType == 10)
|
||||
if (item.InvType == (int)InventoryType.LSL)
|
||||
{
|
||||
foreach (IScriptModule e in engines)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user