Merge branch 'master' into careminster-presence-refactor

This brings careminster on the level of master. To be tested
This commit is contained in:
Melanie
2010-03-03 02:07:03 +00:00
501 changed files with 26121 additions and 46964 deletions

View File

@@ -39,7 +39,7 @@ using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.CoreModules;
using OpenSim.Region.CoreModules.World.Land;
using OpenSim.Region.CoreModules.World.Terrain;
@@ -53,9 +53,10 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
using OpenSim.Region.ScriptEngine.Interfaces;
using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
using OpenSim.Services.Interfaces;
using PrimType = OpenSim.Region.Framework.Scenes.PrimType;
using OpenSim.Services.Interfaces;
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
using PrimType = OpenSim.Region.Framework.Scenes.PrimType;
using AssetLandmark = OpenSim.Framework.AssetLandmark;
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
@@ -917,10 +918,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public string resolveName(UUID objecUUID)
{
// try avatar username surname
CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID);
if (profile != null && profile.UserProfile != null)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, objecUUID);
if (account != null)
{
string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName;
string avatarname = account.Name;
return avatarname;
}
// try an scene object
@@ -1252,7 +1253,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB) == ScriptBaseClass.STATUS_BLOCK_GRAB)
{
NotImplemented("llSetStatus - STATUS_BLOCK_GRAB");
if (value != 0)
m_host.SetBlockGrab(true);
else
m_host.SetBlockGrab(false);
}
if ((status & ScriptBaseClass.STATUS_DIE_AT_EDGE) == ScriptBaseClass.STATUS_DIE_AT_EDGE)
@@ -1265,12 +1269,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if ((status & ScriptBaseClass.STATUS_RETURN_AT_EDGE) == ScriptBaseClass.STATUS_RETURN_AT_EDGE)
{
NotImplemented("llSetStatus - STATUS_RETURN_AT_EDGE");
if (value != 0)
m_host.SetReturnAtEdge(true);
else
m_host.SetReturnAtEdge(false);
}
if ((status & ScriptBaseClass.STATUS_SANDBOX) == ScriptBaseClass.STATUS_SANDBOX)
{
NotImplemented("llSetStatus - STATUS_SANDBOX");
if (value != 0)
m_host.SetStatusSandbox(true);
else
m_host.SetStatusSandbox(false);
}
if (statusrotationaxis != 0)
@@ -1307,8 +1317,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return 0;
case ScriptBaseClass.STATUS_BLOCK_GRAB:
NotImplemented("llGetStatus - STATUS_BLOCK_GRAB");
return 0;
if (m_host.GetBlockGrab())
return 1;
else
return 0;
case ScriptBaseClass.STATUS_DIE_AT_EDGE:
if (m_host.GetDieAtEdge())
@@ -1317,24 +1329,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return 0;
case ScriptBaseClass.STATUS_RETURN_AT_EDGE:
NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE");
return 0;
if (m_host.GetReturnAtEdge())
return 1;
else
return 0;
case ScriptBaseClass.STATUS_ROTATE_X:
NotImplemented("llGetStatus - STATUS_ROTATE_X");
return 0;
if (m_host.GetAxisRotation(2) == 2)
return 1;
else
return 0;
case ScriptBaseClass.STATUS_ROTATE_Y:
NotImplemented("llGetStatus - STATUS_ROTATE_Y");
return 0;
if (m_host.GetAxisRotation(4) == 4)
return 1;
else
return 0;
case ScriptBaseClass.STATUS_ROTATE_Z:
NotImplemented("llGetStatus - STATUS_ROTATE_Z");
return 0;
if (m_host.GetAxisRotation(8) == 8)
return 1;
else
return 0;
case ScriptBaseClass.STATUS_SANDBOX:
NotImplemented("llGetStatus - STATUS_SANDBOX");
return 0;
if (m_host.GetStatusSandbox())
return 1;
else
return 0;
}
return 0;
}
@@ -2346,7 +2368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
// send the sound, once, to all clients in range
m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0);
m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, false, false);
}
// Xantor 20080528 we should do this differently.
@@ -2376,42 +2398,98 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llLoopSoundMaster(string sound, double volume)
{
m_host.AddScriptLPS(1);
NotImplemented("llLoopSoundMaster");
m_host.ParentGroup.LoopSoundMasterPrim = m_host;
lock (m_host.ParentGroup.LoopSoundSlavePrims)
{
foreach (SceneObjectPart prim in m_host.ParentGroup.LoopSoundSlavePrims)
{
if (prim.Sound != UUID.Zero)
llStopSound();
prim.Sound = KeyOrName(sound);
prim.SoundGain = volume;
prim.SoundFlags = 1; // looping
prim.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
prim.ScheduleFullUpdate();
prim.SendFullUpdateToAllClients();
}
}
if (m_host.Sound != UUID.Zero)
llStopSound();
m_host.Sound = KeyOrName(sound);
m_host.SoundGain = volume;
m_host.SoundFlags = 1; // looping
m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
m_host.ScheduleFullUpdate();
m_host.SendFullUpdateToAllClients();
}
public void llLoopSoundSlave(string sound, double volume)
{
m_host.AddScriptLPS(1);
NotImplemented("llLoopSoundSlave");
lock (m_host.ParentGroup.LoopSoundSlavePrims)
{
m_host.ParentGroup.LoopSoundSlavePrims.Add(m_host);
}
}
public void llPlaySoundSlave(string sound, double volume)
{
m_host.AddScriptLPS(1);
NotImplemented("llPlaySoundSlave");
// send the sound, once, to all clients in range
m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, true, false);
}
public void llTriggerSound(string sound, double volume)
{
m_host.AddScriptLPS(1);
// send the sound, once, to all clients in range
m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0);
m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, 0, false, false);
}
// Xantor 20080528: Clear prim data of sound instead
public void llStopSound()
{
m_host.AddScriptLPS(1);
m_host.Sound = UUID.Zero;
m_host.SoundGain = 0;
m_host.SoundFlags = 0;
m_host.SoundRadius = 0;
m_host.ScheduleFullUpdate();
m_host.SendFullUpdateToAllClients();
// m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2);
if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host))
{
if (m_host.ParentGroup.LoopSoundMasterPrim == m_host)
{
foreach (SceneObjectPart part in m_host.ParentGroup.LoopSoundSlavePrims)
{
part.Sound = UUID.Zero;
part.SoundGain = 0;
part.SoundFlags = 0;
part.SoundRadius = 0;
part.ScheduleFullUpdate();
part.SendFullUpdateToAllClients();
}
m_host.ParentGroup.LoopSoundMasterPrim = null;
m_host.ParentGroup.LoopSoundSlavePrims.Clear();
}
else
{
m_host.Sound = UUID.Zero;
m_host.SoundGain = 0;
m_host.SoundFlags = 0;
m_host.SoundRadius = 0;
m_host.ScheduleFullUpdate();
m_host.SendFullUpdateToAllClients();
}
}
else
{
m_host.Sound = UUID.Zero;
m_host.SoundGain = 0;
m_host.SoundFlags = 0;
m_host.SoundRadius = 0;
m_host.ScheduleFullUpdate();
m_host.SendFullUpdateToAllClients();
}
}
public void llPreloadSound(string sound)
@@ -2803,8 +2881,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llLookAt(LSL_Vector target, double strength, double damping)
{
// partial implementation, rotates objects correctly but does not apply strength or damping attributes
m_host.AddScriptLPS(1);
// Determine where we are looking from
LSL_Vector from = llGetPos();
@@ -2824,9 +2900,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// the angles of rotation in radians into rotation value
LSL_Types.Quaternion rot = llEuler2Rot(angle);
Quaternion rotation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
m_host.startLookAt(rotation, (float)damping, (float)strength);
// Orient the object to the angle calculated
llSetRot(rot);
//llSetRot(rot);
}
public void llRotLookAt(LSL_Rotation target, double strength, double damping)
@@ -3329,13 +3406,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llPointAt(LSL_Vector pos)
{
m_host.AddScriptLPS(1);
NotImplemented("llPointAt");
ScenePresence Owner = World.GetScenePresence(m_host.UUID);
LSL_Rotation rot = llEuler2Rot(pos);
Owner.PreviousRotation = Owner.Rotation;
Owner.Rotation = (new Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s));
}
public void llStopPointAt()
{
m_host.AddScriptLPS(1);
NotImplemented("llStopPointAt");
ScenePresence Owner = m_host.ParentGroup.Scene.GetScenePresence(m_host.OwnerID);
Owner.Rotation = Owner.PreviousRotation;
}
public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
@@ -3998,13 +4079,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
UUID uuid = (UUID)id;
UserProfileData userProfile =
World.CommsManager.UserService.GetUserProfile(uuid);
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid);
UserAgentData userAgent =
World.CommsManager.UserService.GetAgentByUUID(uuid);
PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
PresenceInfo pinfo = PresenceInfo.GetOnlinePresence(pinfos);
if (userProfile == null || userAgent == null)
if (pinfo == null)
return UUID.Zero.ToString();
string reply = String.Empty;
@@ -4013,17 +4093,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
case 1: // DATA_ONLINE (0|1)
// TODO: implement fetching of this information
if (userProfile.CurrentAgent!=null && userProfile.CurrentAgent.AgentOnline)
if (pinfo != null)
reply = "1";
else
else
reply = "0";
break;
case 2: // DATA_NAME (First Last)
reply = userProfile.FirstName + " " + userProfile.SurName;
reply = account.FirstName + " " + account.LastName;
break;
case 3: // DATA_BORN (YYYY-MM-DD)
DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0);
born = born.AddSeconds(userProfile.Created);
born = born.AddSeconds(account.Created);
reply = born.ToString("yyyy-MM-dd");
break;
case 4: // DATA_RATING (0,0,0,0,0,0)
@@ -4138,8 +4218,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llCollisionSound(string impact_sound, double impact_volume)
{
m_host.AddScriptLPS(1);
//NotImplemented("llCollisionSound");
// TODO: Parameter check logic required.
UUID soundId = UUID.Zero;
if (!UUID.TryParse(impact_sound, out soundId))
@@ -4727,8 +4805,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llGetCenterOfMass()
{
m_host.AddScriptLPS(1);
NotImplemented("llGetCenterOfMass");
return new LSL_Vector();
Vector3 center = m_host.GetGeometricCenter();
return new LSL_Vector(center.X,center.Y,center.Z);
}
public LSL_List llListSort(LSL_List src, int stride, int ascending)
@@ -5461,8 +5539,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
flags |= ScriptBaseClass.AGENT_SITTING;
}
//NotImplemented("llGetAgentInfo");
return flags;
}
@@ -5545,7 +5621,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_Vector bottom_south_west)
{
m_host.AddScriptLPS(1);
NotImplemented("llTriggerSoundLimited");
float radius1 = (float)llVecDist(llGetPos(), top_north_east);
float radius2 = (float)llVecDist(llGetPos(), bottom_south_west);
float radius = Math.Abs(radius1 - radius2);
m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, radius, false, false);
}
public void llEjectFromLand(string pest)
@@ -6084,7 +6163,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llGroundRepel(double height, int water, double tau)
{
m_host.AddScriptLPS(1);
NotImplemented("llGroundRepel");
if (m_host.PhysActor != null)
{
float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0));
float waterLevel = (float)llWater(new LSL_Types.Vector3(0, 0, 0));
PIDHoverType hoverType = PIDHoverType.Ground;
if (water != 0)
{
hoverType = PIDHoverType.GroundAndWater;
if (ground < waterLevel)
height += waterLevel;
else
height += ground;
}
else
{
height += ground;
}
m_host.SetHoverHeight((float)height, hoverType, (float)tau);
}
}
protected UUID GetTaskInventoryItem(string name)
@@ -6219,7 +6317,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
if (!m_host.ParentGroup.IsDeleted)
{
m_host.ParentGroup.RootPart.SetVehicleFlags(flags);
m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false);
}
}
}
@@ -6231,7 +6329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
if (!m_host.ParentGroup.IsDeleted)
{
m_host.ParentGroup.RootPart.RemoveVehicleFlags(flags);
m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true);
}
}
}
@@ -7271,7 +7369,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llRemoteDataSetRegion()
{
m_host.AddScriptLPS(1);
NotImplemented("llRemoteDataSetRegion");
Deprecated("llRemoteDataSetRegion");
}
public LSL_Float llLog10(double val)
@@ -8409,7 +8507,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llSetInventoryPermMask(string item, int mask, int value)
{
m_host.AddScriptLPS(1);
NotImplemented("llSetInventoryPermMask");
if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
{
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
{
lock (m_host.TaskInventory)
{
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
{
if (inv.Value.Name == item)
{
switch (mask)
{
case 0:
inv.Value.BasePermissions = (uint)value;
break;
case 1:
inv.Value.CurrentPermissions = (uint)value;
break;
case 2:
inv.Value.GroupPermissions = (uint)value;
break;
case 3:
inv.Value.EveryonePermissions = (uint)value;
break;
case 4:
inv.Value.NextPermissions = (uint)value;
break;
}
}
}
}
}
}
}
public LSL_String llGetInventoryCreator(string item)
@@ -8843,6 +8973,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// we send to all
landData.MediaID = new UUID(texture);
landData.MediaAutoScale = autoAlign ? (byte)1 : (byte)0;
landData.MediaSize[0] = width;
landData.MediaSize[1] = height;
landData.MediaType = mediaType;
// do that one last, it will cause a ParcelPropertiesUpdate
landObject.SetMediaUrl(url);
@@ -8902,11 +9035,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
LSL_List list = new LSL_List();
//TO DO: make the implementation for the missing commands
//PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture.
//PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url.
//PARCEL_MEDIA_COMMAND_TYPE string mime_type Use this to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later)
//PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Use this to get or set the parcel media pixel resolution. (1.19.1 RC0 or later)
//PARCEL_MEDIA_COMMAND_DESC string desc Use this to get or set the parcel media description. (1.19.1 RC0 or later)
//PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later)
for (int i = 0; i < aList.Data.Length; i++)
{
@@ -8924,6 +9052,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case ParcelMediaCommandEnum.Texture:
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString()));
break;
case ParcelMediaCommandEnum.Type:
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaType));
break;
case ParcelMediaCommandEnum.Size:
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaSize[0]));
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaSize[1]));
break;
default:
ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
NotImplemented("llParcelMediaQuery parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString());

View File

@@ -36,12 +36,11 @@ using OpenMetaverse;
using Nini.Config;
using OpenSim;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console;
using OpenSim.Region.CoreModules.Avatar.NPC;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Hypergrid;
using OpenSim.Region.ScriptEngine.Shared;
using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
@@ -607,21 +606,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// and convert the regionName to the target region
if (regionName.Contains(".") && regionName.Contains(":"))
{
List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
// Try to link the region
IHyperlinkService hyperService = World.RequestModuleInterface<IHyperlinkService>();
if (hyperService != null)
if (regions != null && regions.Count > 0)
{
GridRegion regInfo = hyperService.TryLinkRegion(presence.ControllingClient,
regionName);
// Get the region name
if (regInfo != null)
{
regionName = regInfo.RegionName;
}
else
{
// Might need to ping the client here in case of failure??
}
GridRegion regInfo = regions[0];
regionName = regInfo.RegionName;
}
}
presence.ControllingClient.SendTeleportLocationStart();
@@ -1482,7 +1472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
// Create new asset
AssetBase asset = new AssetBase(UUID.Random(), notecardName, (sbyte)AssetType.Notecard);
AssetBase asset = new AssetBase(UUID.Random(), notecardName, (sbyte)AssetType.Notecard, m_host.OwnerID.ToString());
asset.Description = "Script Generated Notecard";
string notecardData = String.Empty;
@@ -1695,15 +1685,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key");
CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
if (null == userInfo)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname);
if (null == account)
{
return UUID.Zero.ToString();
}
else
{
return userInfo.UserProfile.ID.ToString();
return account.PrincipalID.ToString();
}
}
@@ -1714,15 +1703,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (UUID.TryParse(id, out key))
{
CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(key);
if (null == userInfo)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key);
if (null == account)
{
return "";
}
else
{
return userInfo.UserProfile.Name;
return account.Name;
}
}
else

View File

@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.ScriptEngine.Shared;
using OpenSim.Region.ScriptEngine.Shared.Api;

View File

@@ -160,6 +160,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int VEHICLE_BANKING_MIX = 39;
public const int VEHICLE_BANKING_TIMESCALE = 40;
public const int VEHICLE_REFERENCE_FRAME = 44;
public const int VEHICLE_RANGE_BLOCK = 45;
public const int VEHICLE_ROLL_FRAME = 46;
public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1;
public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2;
public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4;
@@ -170,6 +172,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128;
public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256;
public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512;
public const int VEHICLE_FLAG_NO_X = 1024;
public const int VEHICLE_FLAG_NO_Y = 2048;
public const int VEHICLE_FLAG_NO_Z = 4096;
public const int VEHICLE_FLAG_LOCK_HOVER_HEIGHT = 8192;
public const int VEHICLE_FLAG_NO_DEFLECTION = 16392;
public const int VEHICLE_FLAG_LOCK_ROTATION = 32784;
public const int INVENTORY_ALL = -1;
public const int INVENTORY_NONE = -1;