Compare commits
	
		
			4 Commits 
		
	
	
		
			master
			...
			LSLKeyTest
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  UbitUmarov | df7468ffa2 | |
|  UbitUmarov | 5648f4ae6e | |
|  UbitUmarov | c2dfa48604 | |
|  UbitUmarov | 8b1a174430 | 
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -567,7 +567,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|                         idx++; | ||||
|                         try | ||||
|                         { | ||||
|                             wl.normalMapTexture = new UUID(rules.GetLSLStringItem(idx).m_string); | ||||
|                             wl.normalMapTexture = new UUID(rules.GetLSLKeyItem(idx).m_string); | ||||
|                         } | ||||
|                         catch (ArgumentException) | ||||
|                         { | ||||
|  |  | |||
|  | @ -46,7 +46,7 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | |||
| 
 | ||||
| using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||||
| using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||||
| using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
|  | @ -202,8 +202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (returntype != typeof(UUID)) | ||||
|                 MODError(String.Format("return type mismatch for {0}",fname)); | ||||
| 
 | ||||
|             UUID result = (UUID)modInvoke(fname,parms); | ||||
|             return new LSL_Key(result.ToString()); | ||||
|             return (UUID)modInvoke(fname,parms); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Vector modInvokeV(string fname, params object[] parms) | ||||
|  | @ -394,7 +393,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             else if (lslparm is LSL_Key) | ||||
|             { | ||||
|                 if (type == typeof(UUID)) | ||||
|                     return new UUID((LSL_Key)lslparm); | ||||
|                     return (UUID)((LSL_Key)lslparm); | ||||
|             } | ||||
| 
 | ||||
|             // ---------- Rotation ---------- | ||||
|  | @ -435,7 +434,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|                         else if (plist[i] is LSL_Float) | ||||
|                             result[i] = (float)(LSL_Float)plist[i]; | ||||
|                         else if (plist[i] is LSL_Key) | ||||
|                             result[i] = new UUID((LSL_Key)plist[i]); | ||||
|                             result[i] = (UUID)((LSL_Key)plist[i]); | ||||
|                         else if (plist[i] is LSL_Rotation) | ||||
|                             result[i] = (Quaternion)((LSL_Rotation)plist[i]); | ||||
|                         else if (plist[i] is LSL_Vector) | ||||
|  |  | |||
|  | @ -58,7 +58,7 @@ using System.Text.RegularExpressions; | |||
| 
 | ||||
| using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||||
| using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||||
| using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
|  | @ -626,7 +626,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                              int timer) | ||||
|         { | ||||
|             // This may be upgraded depending on the griefing or DOS | ||||
|  | @ -651,7 +651,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return UUID.Zero.ToString(); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                              int timer, int alpha) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlend"); | ||||
|  | @ -673,7 +673,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return UUID.Zero.ToString(); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                              bool blend, int disp, int timer, int alpha, int face) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace"); | ||||
|  | @ -695,7 +695,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return UUID.Zero.ToString(); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, | ||||
|                                            int timer) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData"); | ||||
|  | @ -724,7 +724,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return UUID.Zero.ToString(); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | ||||
|                                           int timer, int alpha) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlend"); | ||||
|  | @ -753,7 +753,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return UUID.Zero.ToString(); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | ||||
|                                           bool blend, int disp, int timer, int alpha, int face) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlendFace"); | ||||
|  | @ -808,7 +808,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|         } | ||||
| 
 | ||||
|         // Teleport functions | ||||
|         public void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | ||||
|         public void osTeleportAgent(LSL_Key agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | ||||
|         { | ||||
|             // High because there is no security check. High griefer potential | ||||
|             // | ||||
|  | @ -817,7 +817,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             TeleportAgent(agent, regionName, position, lookat, false); | ||||
|         } | ||||
| 
 | ||||
|         private void TeleportAgent(string agent, string regionName, | ||||
|         private void TeleportAgent(LSL_Key agent, string regionName, | ||||
|             LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions) | ||||
|         { | ||||
|             m_host.AddScriptLPS(1); | ||||
|  | @ -853,7 +853,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public void osTeleportAgent(string agent, int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | ||||
|         public void osTeleportAgent(LSL_Key agent, int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | ||||
|         { | ||||
|             // High because there is no security check. High griefer potential | ||||
|             // | ||||
|  | @ -862,7 +862,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             TeleportAgent(agent, regionGridX, regionGridY, position, lookat, false); | ||||
|         } | ||||
| 
 | ||||
|         private void TeleportAgent(string agent, int regionGridX, int regionGridY, | ||||
|         private void TeleportAgent(LSL_Key agent, int regionGridX, int regionGridY, | ||||
|             LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions) | ||||
|         { | ||||
|             ulong regionHandle = Util.RegionGridLocToHandle((uint)regionGridX, (uint)regionGridY); | ||||
|  | @ -900,7 +900,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | ||||
|         public void osTeleportAgent(LSL_Key agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | ||||
|         { | ||||
|             osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat); | ||||
|         } | ||||
|  | @ -932,7 +932,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|         /// Does work if passed key (or keys if overloaded). | ||||
|         /// </summary> | ||||
|         /// <param name="avatar"></param> | ||||
|         public void osForceOtherSit(string avatar) | ||||
|         public void osForceOtherSit(LSL_Key avatar) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryHigh, "osForceOtherSit"); | ||||
| 
 | ||||
|  | @ -947,7 +947,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|         /// </summary> | ||||
|         /// <param name="avatar"></param> | ||||
|         /// <param name="target"></param> | ||||
|         public void osForceOtherSit(string avatar, string target) | ||||
|         public void osForceOtherSit(LSL_Key avatar, string target) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryHigh, "osForceOtherSit"); | ||||
| 
 | ||||
|  | @ -958,7 +958,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             ForceSit(avatar, targetID);              | ||||
|         } | ||||
| 
 | ||||
|         public void ForceSit(string avatar, UUID targetID) | ||||
|         public void ForceSit(LSL_Key avatar, UUID targetID) | ||||
|         { | ||||
|             UUID agentID;  | ||||
| 
 | ||||
|  | @ -985,14 +985,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|         //resources based on the IP address of the clients connected. | ||||
|         //I think High is a good risk level for this, as it is an | ||||
|         //information leak. | ||||
|         public string osGetAgentIP(string agent) | ||||
|         public string osGetAgentIP(LSL_Key agent) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.High, "osGetAgentIP"); | ||||
| 
 | ||||
|             UUID avatarID = (UUID)agent; | ||||
|             UUID avatarID; | ||||
|             if (!UUID.TryParse(agent, out avatarID)) | ||||
|                 return ""; | ||||
| 
 | ||||
|             m_host.AddScriptLPS(1); | ||||
|             if (World.Entities.ContainsKey((UUID)agent) && World.Entities[avatarID] is ScenePresence) | ||||
|             if (World.Entities.ContainsKey(avatarID) && World.Entities[avatarID] is ScenePresence) | ||||
|             { | ||||
|                 ScenePresence target = (ScenePresence)World.Entities[avatarID]; | ||||
|                 return target.ControllingClient.RemoteEndPoint.Address.ToString(); | ||||
|  | @ -1019,14 +1021,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|         } | ||||
| 
 | ||||
|         // Adam's super super custom animation functions | ||||
|         public void osAvatarPlayAnimation(string avatar, string animation) | ||||
|         public void osAvatarPlayAnimation(LSL_Key avatar, string animation) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarPlayAnimation"); | ||||
| 
 | ||||
|             AvatarPlayAnimation(avatar, animation); | ||||
|         } | ||||
| 
 | ||||
|         private void AvatarPlayAnimation(string avatar, string animation) | ||||
|         private void AvatarPlayAnimation(LSL_Key avatar, string animation) | ||||
|         { | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|  | @ -1065,16 +1067,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|                 target.Animator.AddAnimation(animID, m_host.UUID); | ||||
|         } | ||||
| 
 | ||||
|         public void osAvatarStopAnimation(string avatar, string animation) | ||||
|         public void osAvatarStopAnimation(LSL_Key avatar, string animation) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarStopAnimation"); | ||||
| 
 | ||||
|             AvatarStopAnimation(avatar, animation); | ||||
|         } | ||||
| 
 | ||||
|         private void AvatarStopAnimation(string avatar, string animation) | ||||
|         private void AvatarStopAnimation(LSL_Key avatar, string animation) | ||||
|         { | ||||
|             UUID avatarID = (UUID)avatar; | ||||
|             UUID avatarID; | ||||
|             if(!UUID.TryParse(avatar, out avatarID)) | ||||
|                 return; | ||||
| 
 | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|  | @ -1859,7 +1863,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
| 
 | ||||
|         private void MessageObject(UUID objUUID, string message) | ||||
|         { | ||||
|             object[] resobj = new object[] { new LSL_Types.LSLString(m_host.UUID.ToString()), new LSL_Types.LSLString(message) }; | ||||
|             object[] resobj = new object[] { | ||||
|                 new LSL_Types.key(m_host.UUID), | ||||
|                 new LSL_Types.LSLString(message) }; | ||||
| 
 | ||||
|             SceneObjectPart sceneOP = World.GetSceneObjectPart(objUUID); | ||||
| 
 | ||||
|  | @ -2143,7 +2149,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return NotecardCache.GetLines(assetID); | ||||
|         } | ||||
| 
 | ||||
|         public string osAvatarName2Key(string firstname, string lastname) | ||||
|         public LSL_Key osAvatarName2Key(string firstname, string lastname) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); | ||||
|             m_host.AddScriptLPS(1); | ||||
|  | @ -2195,7 +2201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return UUID.Zero.ToString(); | ||||
|         } | ||||
| 
 | ||||
|         public string osKey2Name(string id) | ||||
|         public string osKey2Name(LSL_Key id) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); | ||||
|             m_host.AddScriptLPS(1); | ||||
|  | @ -2414,17 +2420,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return retval; | ||||
|         } | ||||
| 
 | ||||
|         public string osGetAvatarHomeURI(string uuid) | ||||
|         public string osGetAvatarHomeURI(LSL_Key id) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Low, "osGetAvatarHomeURI"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             UUID uuid; | ||||
|             if(!UUID.TryParse(id, out uuid)) | ||||
|                 return ""; | ||||
|             IUserManagement userManager = m_ScriptEngine.World.RequestModuleInterface<IUserManagement>(); | ||||
|             string returnValue = ""; | ||||
| 
 | ||||
|             if (userManager != null) | ||||
|             { | ||||
|                 returnValue = userManager.GetUserServerURL(new UUID(uuid), "HomeURI"); | ||||
|                 returnValue = userManager.GetUserServerURL(uuid, "HomeURI"); | ||||
|             } | ||||
| 
 | ||||
|             if (returnValue == "") | ||||
|  | @ -2538,7 +2547,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return World.RegionInfo.RegionSettings.LoadedCreationTime; | ||||
|         } | ||||
| 
 | ||||
|         public string osLoadedCreationID() | ||||
|         public LSL_Key osLoadedCreationID() | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID"); | ||||
|             m_host.AddScriptLPS(1); | ||||
|  | @ -2587,7 +2596,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return retVal; | ||||
|         } | ||||
| 
 | ||||
|         public void osForceCreateLink(string target, int parent) | ||||
|         public void osForceCreateLink(LSL_Key target, int parent) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osForceCreateLink"); | ||||
| 
 | ||||
|  | @ -2626,7 +2635,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (UUID.TryParse(npc, out npcId)) | ||||
|                     if (module.IsNPC(npcId, World)) | ||||
|                         return ScriptBaseClass.TRUE; | ||||
|             } | ||||
|  | @ -2642,7 +2651,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             // have to get the npc module also here to set the default Not Owned | ||||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if(module == null) | ||||
|                 return new LSL_Key(UUID.Zero.ToString()); | ||||
|                 return new LSL_Key(UUID.Zero); | ||||
|              | ||||
|             bool owned = (module.NPCOptionFlags & NPCOptionsFlags.AllowNotOwned) == 0; | ||||
| 
 | ||||
|  | @ -2666,11 +2675,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|         { | ||||
| 
 | ||||
|             if (!World.Permissions.CanRezObject(1, m_host.OwnerID, new Vector3((float)position.x, (float)position.y, (float)position.z))) | ||||
|                 return new LSL_Key(UUID.Zero.ToString()); | ||||
|                 return new LSL_Key(UUID.Zero); | ||||
| 
 | ||||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if(module == null) | ||||
|                 new LSL_Key(UUID.Zero.ToString()); | ||||
|                 new LSL_Key(UUID.Zero); | ||||
| 
 | ||||
|             string groupTitle = String.Empty; | ||||
|             UUID groupID = UUID.Zero; | ||||
|  | @ -2701,7 +2710,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|                     if (member == null) | ||||
|                     { | ||||
|                         OSSLError(string.Format("osNpcCreate: the object owner is not member of the object group")); | ||||
|                         return new LSL_Key(UUID.Zero.ToString()); | ||||
|                         return new LSL_Key(UUID.Zero); | ||||
|                     } | ||||
| 
 | ||||
|                     groupID = m_host.GroupID; | ||||
|  | @ -2750,7 +2759,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|                     catch | ||||
|                     { | ||||
|                         OSSLError(string.Format("osNpcCreate: Error processing notcard '{0}'", notecard)); | ||||
|                         return new LSL_Key(UUID.Zero.ToString()); | ||||
|                         return new LSL_Key(UUID.Zero); | ||||
|                     } | ||||
|                 } | ||||
|             else | ||||
|  | @ -2797,16 +2806,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (npcModule != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc.m_string, out npcId)) | ||||
|                     return new LSL_Key(UUID.Zero.ToString()); | ||||
|                 if (!UUID.TryParse(npc.ToString(), out npcId)) | ||||
|                     return UUID.Zero; | ||||
| 
 | ||||
|                 if (!npcModule.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                     return new LSL_Key(UUID.Zero.ToString()); | ||||
|                     return UUID.Zero; | ||||
| 
 | ||||
|                 return SaveAppearanceToNotecard(npcId, notecard); | ||||
|             } | ||||
| 
 | ||||
|             return new LSL_Key(UUID.Zero.ToString()); | ||||
|             return UUID.Zero; | ||||
|         } | ||||
| 
 | ||||
|         public void osNpcLoadAppearance(LSL_Key npc, string notecard) | ||||
|  | @ -2819,7 +2828,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (npcModule != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!npcModule.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|  | @ -2850,7 +2859,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (npcModule != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (UUID.TryParse(npc, out npcId)) | ||||
|                 { | ||||
|                     UUID owner = npcModule.GetOwner(npcId); | ||||
|                     if (owner != UUID.Zero) | ||||
|  | @ -2872,7 +2881,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (npcModule != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return new LSL_Vector(0, 0, 0); | ||||
| 
 | ||||
|                 if (!npcModule.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|  | @ -2896,7 +2905,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|  | @ -2915,14 +2924,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                     return; | ||||
| 
 | ||||
|                 module.MoveToTarget( | ||||
|                     new UUID(npc.m_string), | ||||
|                     npcId, | ||||
|                     World, | ||||
|                     target, | ||||
|                     (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, | ||||
|  | @ -2940,7 +2949,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (npcModule != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return new LSL_Rotation(Quaternion.Identity); | ||||
| 
 | ||||
|                 if (!npcModule.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|  | @ -2964,7 +2973,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             if (npcModule != null) | ||||
|             { | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc.m_string, out npcId)) | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!npcModule.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|  | @ -2985,7 +2994,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId = new UUID(npc.m_string); | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                     return; | ||||
|  | @ -3007,7 +3018,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId = new UUID(npc.m_string); | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                     return; | ||||
|  | @ -3024,7 +3037,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId = new UUID(npc.m_string); | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                     return; | ||||
|  | @ -3041,12 +3056,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId = new UUID(npc.m_string); | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                     return; | ||||
| 
 | ||||
|                 module.Sit(npcId, new UUID(target.m_string), World); | ||||
|                 module.Sit(npcId, (UUID)target, World); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|  | @ -3058,7 +3075,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId = new UUID(npc.m_string); | ||||
|                 UUID npcId; | ||||
|                 if (!UUID.TryParse(npc, out npcId)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                     return; | ||||
|  | @ -3077,7 +3096,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|                 INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|                 if (module != null) | ||||
|                 { | ||||
|                     UUID npcId = new UUID(npc.m_string); | ||||
|                     UUID npcId; | ||||
|                     if (!UUID.TryParse(npc, out npcId)) | ||||
|                         return; | ||||
| 
 | ||||
|                     if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                         return; | ||||
|  | @ -3096,7 +3117,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcID = new UUID(npc.m_string); | ||||
|                 UUID npcID; | ||||
|                 if (!UUID.TryParse(npc, out npcID)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (module.CheckPermissions(npcID, m_host.OwnerID)) | ||||
|                     AvatarPlayAnimation(npcID.ToString(), animation); | ||||
|  | @ -3111,7 +3134,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcID = new UUID(npc.m_string); | ||||
|                 UUID npcID; | ||||
|                 if (!UUID.TryParse(npc, out npcID)) | ||||
|                     return; | ||||
| 
 | ||||
|                 if (module.CheckPermissions(npcID, m_host.OwnerID)) | ||||
|                     AvatarStopAnimation(npcID.ToString(), animation); | ||||
|  | @ -3126,12 +3151,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||||
|             if (module != null) | ||||
|             { | ||||
|                 UUID npcId = new UUID(npc.m_string); | ||||
| 
 | ||||
|                 if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||||
|                 UUID npcID; | ||||
|                 if (!UUID.TryParse(npc, out npcID)) | ||||
|                     return; | ||||
| 
 | ||||
|                 module.Whisper(npcId, World, message, channel); | ||||
|                 if (!module.CheckPermissions(npcID, m_host.OwnerID)) | ||||
|                     return; | ||||
| 
 | ||||
|                 module.Whisper(npcID, World, message, channel); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|  | @ -3367,11 +3394,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return (int)pws; | ||||
|         } | ||||
|          | ||||
|         public void osSetSpeed(string UUID, LSL_Float SpeedModifier) | ||||
|         public void osSetSpeed(LSL_Key UUID, LSL_Float SpeedModifier) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); | ||||
|             m_host.AddScriptLPS(1); | ||||
|             ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); | ||||
|             ScenePresence avatar = World.GetScenePresence((UUID)UUID); | ||||
| 
 | ||||
|             if (avatar != null) | ||||
|                 avatar.SpeedModifier = (float)SpeedModifier; | ||||
|  | @ -3396,23 +3423,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             }); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Float osGetHealth(string avatar) | ||||
|         public LSL_Float osGetHealth(LSL_Key avatar) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.None, "osGetHealth"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             LSL_Float health = new LSL_Float(-1); | ||||
|             ScenePresence presence = World.GetScenePresence(new UUID(avatar)); | ||||
|             ScenePresence presence = World.GetScenePresence((UUID)avatar); | ||||
|             if (presence != null) health = presence.Health; | ||||
|             return health; | ||||
|         } | ||||
|          | ||||
|         public void osCauseDamage(string avatar, double damage) | ||||
|         public void osCauseDamage(LSL_Key avatar, double damage) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             UUID avatarId = new UUID(avatar); | ||||
|             UUID avatarId = (UUID)avatar; | ||||
|             Vector3 pos = m_host.GetWorldPosition(); | ||||
| 
 | ||||
|             ScenePresence presence = World.GetScenePresence(avatarId);  | ||||
|  | @ -3435,12 +3462,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|         } | ||||
|          | ||||
|         public void osCauseHealing(string avatar, double healing) | ||||
|         public void osCauseHealing(LSL_Key avatar, double healing) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             UUID avatarId = new UUID(avatar); | ||||
|             UUID avatarId = (UUID)avatar; | ||||
|             ScenePresence presence = World.GetScenePresence(avatarId); | ||||
| 
 | ||||
|             if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) | ||||
|  | @ -3455,12 +3482,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public void osSetHealth(string avatar, double health) | ||||
|         public void osSetHealth(LSL_Key avatar, double health) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.High, "osSetHealth"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             UUID avatarId = new UUID(avatar); | ||||
|             UUID avatarId = (UUID)avatar; | ||||
|             ScenePresence presence = World.GetScenePresence(avatarId); | ||||
| 
 | ||||
|             if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) | ||||
|  | @ -3474,25 +3501,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public void osSetHealRate(string avatar, double healrate) | ||||
|         public void osSetHealRate(LSL_Key avatar, double healrate) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.High, "osSetHealRate"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             UUID avatarId = new UUID(avatar); | ||||
|             UUID avatarId = (UUID)avatar; | ||||
|             ScenePresence presence = World.GetScenePresence(avatarId); | ||||
| 
 | ||||
|             if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) | ||||
|                  presence.HealRate = (float)healrate; | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Float osGetHealRate(string avatar) | ||||
|         public LSL_Float osGetHealRate(LSL_Key avatar) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             LSL_Float rate = new LSL_Float(0); | ||||
|             ScenePresence presence = World.GetScenePresence(new UUID(avatar)); | ||||
|             ScenePresence presence = World.GetScenePresence((UUID)avatar); | ||||
|             if (presence != null) | ||||
|                 rate = presence.HealRate; | ||||
|             return rate; | ||||
|  | @ -3541,13 +3568,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|             else | ||||
|             { | ||||
|                 obj = World.GetSceneObjectPart(new UUID(prim)); | ||||
|                 obj = World.GetSceneObjectPart((UUID)prim); | ||||
|                 if (obj == null) | ||||
|                     return; | ||||
|             } | ||||
| 
 | ||||
|             obj.Shape.ProjectionEntry = projection; | ||||
|             obj.Shape.ProjectionTextureUUID = new UUID(texture); | ||||
|             obj.Shape.ProjectionTextureUUID = (UUID)texture; | ||||
|             obj.Shape.ProjectionFOV = (float)fov; | ||||
|             obj.Shape.ProjectionFocus = (float)focus; | ||||
|             obj.Shape.ProjectionAmbiance = (float)amb; | ||||
|  | @ -3570,7 +3597,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             { | ||||
|                 if (avatar != null && avatar.UUID != m_host.OwnerID) | ||||
|                 { | ||||
|                     result.Add(new LSL_String(avatar.UUID.ToString())); | ||||
|                     result.Add(new LSL_Key(avatar.UUID)); | ||||
|                     result.Add(new LSL_Vector(avatar.AbsolutePosition)); | ||||
|                     result.Add(new LSL_String(avatar.Name)); | ||||
|                 } | ||||
|  | @ -3630,7 +3657,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osInviteToGroup"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             UUID agent = new UUID(agentId); | ||||
|             UUID agent = (UUID)agentId; | ||||
| 
 | ||||
|             // groups module is required | ||||
|             IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface<IGroupsModule>(); | ||||
|  | @ -3665,7 +3692,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             CheckThreatLevel(ThreatLevel.VeryLow, "osEjectFromGroup"); | ||||
|             m_host.AddScriptLPS(1); | ||||
| 
 | ||||
|             UUID agent = new UUID(agentId); | ||||
|             UUID agent = (UUID)agentId; | ||||
| 
 | ||||
|             // groups module is required | ||||
|             IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface<IGroupsModule>(); | ||||
|  | @ -3765,7 +3792,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             ForceAttachToAvatarFromInventory(m_host.OwnerID, itemName, attachmentPoint); | ||||
|         } | ||||
| 
 | ||||
|         public void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint) | ||||
|         public void osForceAttachToOtherAvatarFromInventory(LSL_Key rawAvatarId, string itemName, int attachmentPoint) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.VeryHigh, "osForceAttachToOtherAvatarFromInventory"); | ||||
| 
 | ||||
|  | @ -4064,7 +4091,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             CheckThreatLevel(ThreatLevel.High, "osSetContentType"); | ||||
| 
 | ||||
|             if (m_UrlModule != null) | ||||
|                 m_UrlModule.HttpContentType(new UUID(id),type); | ||||
|                 m_UrlModule.HttpContentType((UUID)id, type); | ||||
|         } | ||||
| 
 | ||||
|         /// Shout an error if the object owner did not grant the script the specified permissions. | ||||
|  | @ -4153,7 +4180,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             DropAttachmentAt(false, pos, rot); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield) | ||||
|         public LSL_Integer osListenRegex(int channelID, string name, LSL_Key ID, string msg, int regexBitfield) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Low, "osListenRegex"); | ||||
|             m_host.AddScriptLPS(1); | ||||
|  | @ -4216,7 +4243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String osRequestURL(LSL_List options) | ||||
|         public LSL_Key osRequestURL(LSL_List options) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); | ||||
|             m_host.AddScriptLPS(1); | ||||
|  | @ -4234,7 +4261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
|             return UUID.Zero.ToString(); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String osRequestSecureURL(LSL_List options) | ||||
|         public LSL_Key osRequestSecureURL(LSL_List options) | ||||
|         { | ||||
|             CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); | ||||
|             m_host.AddScriptLPS(1); | ||||
|  |  | |||
|  | @ -105,7 +105,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
| 
 | ||||
|             m_CmdManager.m_ScriptEngine.PostObjectEvent(ds.localID, | ||||
|                     new EventParams("dataserver", new Object[] | ||||
|                             { new LSL_Types.LSLString(ds.ID.ToString()), | ||||
|                             { new LSL_Types.key(ds.ID), | ||||
|                             new LSL_Types.LSLString(reply)}, | ||||
|                     new DetectParams[0])); | ||||
|         } | ||||
|  |  | |||
|  | @ -71,7 +71,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
| 
 | ||||
|                 object[] resobj = new object[] | ||||
|                 { | ||||
|                     new LSL_Types.LSLString(httpInfo.ReqID.ToString()), | ||||
|                     new LSL_Types.key(httpInfo.ReqID), | ||||
|                     new LSL_Types.LSLInteger(httpInfo.Status), | ||||
|                     new LSL_Types.list(), | ||||
|                     new LSL_Types.LSLString(httpInfo.ResponseBody) | ||||
|  |  | |||
|  | @ -71,7 +71,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
|                     { | ||||
|                         new LSL_Types.LSLInteger(lInfo.GetChannel()), | ||||
|                         new LSL_Types.LSLString(lInfo.GetName()), | ||||
|                         new LSL_Types.LSLString(lInfo.GetID().ToString()), | ||||
|                         new LSL_Types.key(lInfo.GetID()), | ||||
|                         new LSL_Types.LSLString(lInfo.GetMessage()) | ||||
|                     }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -62,10 +62,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
|                     object[] resobj = new object[] | ||||
|                     { | ||||
|                         new LSL_Types.LSLInteger(2), | ||||
|                         new LSL_Types.LSLString( | ||||
|                                 rInfo.GetChannelKey().ToString()), | ||||
|                         new LSL_Types.LSLString( | ||||
|                                 rInfo.GetMessageID().ToString()), | ||||
|                         new LSL_Types.key(rInfo.GetChannelKey()), | ||||
|                         new LSL_Types.key(rInfo.GetMessageID()), | ||||
|                         new LSL_Types.LSLString(String.Empty), | ||||
|                         new LSL_Types.LSLInteger(rInfo.GetIntValue()), | ||||
|                         new LSL_Types.LSLString(rInfo.GetStrVal()) | ||||
|  | @ -93,8 +91,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
|                     object[] resobj = new object[] | ||||
|                     { | ||||
|                         new LSL_Types.LSLInteger(3), | ||||
|                         new LSL_Types.LSLString(srdInfo.Channel.ToString()), | ||||
|                         new LSL_Types.LSLString(srdInfo.GetReqID().ToString()), | ||||
|                         new LSL_Types.key(srdInfo.Channel), | ||||
|                         new LSL_Types.key(srdInfo.GetReqID()), | ||||
|                         new LSL_Types.LSLString(String.Empty), | ||||
|                         new LSL_Types.LSLInteger(srdInfo.Idata), | ||||
|                         new LSL_Types.LSLString(srdInfo.Sdata) | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ using System; | |||
| 
 | ||||
| using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||||
| using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||||
| using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
|  | @ -43,8 +43,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
| 
 | ||||
|        LSL_Integer llAbs(int i); | ||||
|          LSL_Float llAcos(double val); | ||||
|               void llAddToLandBanList(string avatar, double hours); | ||||
|               void llAddToLandPassList(string avatar, double hours); | ||||
|               void llAddToLandBanList(LSL_Key avatar, double hours); | ||||
|               void llAddToLandPassList(LSL_Key avatar, double hours); | ||||
|               void llAdjustSoundVolume(double volume); | ||||
|               void llAllowInventoryDrop(int add); | ||||
|          LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b); | ||||
|  | @ -66,13 +66,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|               void llClearCameraParams(); | ||||
|        LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face); | ||||
|        LSL_Integer llClearPrimMedia(LSL_Integer face); | ||||
|               void llCloseRemoteDataChannel(string channel); | ||||
|               void llCloseRemoteDataChannel(LSL_Key channel); | ||||
|          LSL_Float llCloud(LSL_Vector offset); | ||||
|               void llCollisionFilter(string name, string id, int accept); | ||||
|               void llCollisionFilter(string name, LSL_Key id, int accept); | ||||
|               void llCollisionSound(string impact_sound, double impact_volume); | ||||
|               void llCollisionSprite(string impact_sprite); | ||||
|          LSL_Float llCos(double f); | ||||
|               void llCreateLink(string target, int parent); | ||||
|               void llCreateLink(LSL_Key target, int parent); | ||||
|           LSL_List llCSV2List(string src); | ||||
|           LSL_List llDeleteSubList(LSL_List src, int start, int end); | ||||
|         LSL_String llDeleteSubString(string src, int start, int end); | ||||
|  | @ -93,11 +93,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         LSL_Vector llDetectedTouchST(int index); | ||||
|         LSL_Vector llDetectedTouchUV(int index); | ||||
|         LSL_Vector llDetectedVel(int number); | ||||
|               void llDialog(string avatar, string message, LSL_List buttons, int chat_channel); | ||||
|               void llDialog(LSL_Key avatar, string message, LSL_List buttons, int chat_channel); | ||||
|               void llDie(); | ||||
|         LSL_String llDumpList2String(LSL_List src, string seperator); | ||||
|        LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir); | ||||
|               void llEjectFromLand(string pest); | ||||
|               void llEjectFromLand(LSL_Key pest); | ||||
|               void llEmail(string address, string subject, string message); | ||||
|         LSL_String llEscapeURL(string url); | ||||
|       LSL_Rotation llEuler2Rot(LSL_Vector v); | ||||
|  | @ -107,21 +107,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|          LSL_Float llFrand(double mag); | ||||
|            LSL_Key llGenerateKey(); | ||||
|         LSL_Vector llGetAccel(); | ||||
|        LSL_Integer llGetAgentInfo(string id); | ||||
|        LSL_Integer llGetAgentInfo(LSL_Key id); | ||||
|         LSL_String llGetAgentLanguage(string id); | ||||
|           LSL_List llGetAgentList(LSL_Integer scope, LSL_List options); | ||||
|         LSL_Vector llGetAgentSize(string id); | ||||
|         LSL_Vector llGetAgentSize(LSL_Key id); | ||||
|          LSL_Float llGetAlpha(int face); | ||||
|          LSL_Float llGetAndResetTime(); | ||||
|         LSL_String llGetAnimation(string id); | ||||
|           LSL_List llGetAnimationList(string id); | ||||
|         LSL_String llGetAnimation(LSL_Key id); | ||||
|           LSL_List llGetAnimationList(LSL_Key id); | ||||
|        LSL_Integer llGetAttached(); | ||||
|           LSL_List llGetBoundingBox(string obj); | ||||
|           LSL_List llGetBoundingBox(LSL_Key obj); | ||||
|         LSL_Vector llGetCameraPos(); | ||||
|       LSL_Rotation llGetCameraRot(); | ||||
|         LSL_Vector llGetCenterOfMass(); | ||||
|         LSL_Vector llGetColor(int face); | ||||
|         LSL_String llGetCreator(); | ||||
|            LSL_Key llGetCreator(); | ||||
|         LSL_String llGetDate(); | ||||
|          LSL_Float llGetEnergy(); | ||||
|         LSL_String llGetEnv(LSL_String name); | ||||
|  | @ -154,19 +154,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|          LSL_Float llGetMassMKS(); | ||||
|        LSL_Integer llGetMemoryLimit(); | ||||
|               void llGetNextEmail(string address, string subject); | ||||
|         LSL_String llGetNotecardLine(string name, int line); | ||||
|            LSL_Key llGetNotecardLine(string name, int line); | ||||
|            LSL_Key llGetNumberOfNotecardLines(string name); | ||||
|        LSL_Integer llGetNumberOfPrims(); | ||||
|        LSL_Integer llGetNumberOfSides(); | ||||
|         LSL_String llGetObjectDesc(); | ||||
|           LSL_List llGetObjectDetails(string id, LSL_List args); | ||||
|          LSL_Float llGetObjectMass(string id); | ||||
|           LSL_List llGetObjectDetails(LSL_Key id, LSL_List args); | ||||
|          LSL_Float llGetObjectMass(LSL_Key id); | ||||
|         LSL_String llGetObjectName(); | ||||
|        LSL_Integer llGetObjectPermMask(int mask); | ||||
|        LSL_Integer llGetObjectPrimCount(string object_id); | ||||
|        LSL_Integer llGetObjectPrimCount(LSL_Key object_id); | ||||
|         LSL_Vector llGetOmega(); | ||||
|            LSL_Key llGetOwner(); | ||||
|            LSL_Key llGetOwnerKey(string id); | ||||
|            LSL_Key llGetOwnerKey(LSL_Key id); | ||||
|           LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param); | ||||
|        LSL_Integer llGetParcelFlags(LSL_Vector pos); | ||||
|        LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide); | ||||
|  | @ -207,28 +207,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|        LSL_Integer llGetUnixTime(); | ||||
|         LSL_Vector llGetVel(); | ||||
|          LSL_Float llGetWallclock(); | ||||
|               void llGiveInventory(string destination, string inventory); | ||||
|               void llGiveInventoryList(string destination, string category, LSL_List inventory); | ||||
|        LSL_Integer llGiveMoney(string destination, int amount); | ||||
|         LSL_String llTransferLindenDollars(string destination, int amount); | ||||
|               void llGodLikeRezObject(string inventory, LSL_Vector pos); | ||||
|               void llGiveInventory(LSL_Key destination, string inventory); | ||||
|               void llGiveInventoryList(LSL_Key destination, string category, LSL_List inventory); | ||||
|        LSL_Integer llGiveMoney(LSL_Key destination, int amount); | ||||
|            LSL_Key llTransferLindenDollars(LSL_Key destination, int amount); | ||||
|               void llGodLikeRezObject(LSL_Key inventory, LSL_Vector pos); | ||||
|          LSL_Float llGround(LSL_Vector offset); | ||||
|         LSL_Vector llGroundContour(LSL_Vector offset); | ||||
|         LSL_Vector llGroundNormal(LSL_Vector offset); | ||||
|               void llGroundRepel(double height, int water, double tau); | ||||
|         LSL_Vector llGroundSlope(LSL_Vector offset); | ||||
|         LSL_String llHTTPRequest(string url, LSL_List parameters, string body); | ||||
|            LSL_Key llHTTPRequest(string url, LSL_List parameters, string body); | ||||
|               void llHTTPResponse(LSL_Key id, int status, string body); | ||||
|         LSL_String llInsertString(string dst, int position, string src); | ||||
|               void llInstantMessage(string user, string message); | ||||
|               void llInstantMessage(LSL_Key user, string message); | ||||
|         LSL_String llIntegerToBase64(int number); | ||||
|         LSL_String llKey2Name(string id); | ||||
|         LSL_String llGetUsername(string id); | ||||
|         LSL_String llRequestUsername(string id); | ||||
|         LSL_String llGetDisplayName(string id); | ||||
|         LSL_String llRequestDisplayName(string id); | ||||
|         void llLinkParticleSystem(int linknum, LSL_List rules); | ||||
|         void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot); | ||||
|         LSL_String llKey2Name(LSL_Key id); | ||||
|         LSL_String llGetUsername(LSL_Key id); | ||||
|            LSL_Key llRequestUsername(LSL_Key id); | ||||
|         LSL_String llGetDisplayName(LSL_Key id); | ||||
|            LSL_Key llRequestDisplayName(LSL_Key id); | ||||
|               void llLinkParticleSystem(int linknum, LSL_List rules); | ||||
|               void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot); | ||||
|         LSL_String llList2CSV(LSL_List src); | ||||
|          LSL_Float llList2Float(LSL_List src, int index); | ||||
|        LSL_Integer llList2Integer(LSL_List src, int index); | ||||
|  | @ -238,7 +238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|       LSL_Rotation llList2Rot(LSL_List src, int index); | ||||
|         LSL_String llList2String(LSL_List src, int index); | ||||
|         LSL_Vector llList2Vector(LSL_List src, int index); | ||||
|        LSL_Integer llListen(int channelID, string name, string ID, string msg); | ||||
|        LSL_Integer llListen(int channelID, string name, LSL_Key ID, string msg); | ||||
|               void llListenControl(int number, int active); | ||||
|               void llListenRemove(int number); | ||||
|        LSL_Integer llListFindList(LSL_List src, LSL_List test); | ||||
|  | @ -247,29 +247,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|           LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end); | ||||
|           LSL_List llListSort(LSL_List src, int stride, int ascending); | ||||
|          LSL_Float llListStatistics(int operation, LSL_List src); | ||||
|               void llLoadURL(string avatar_id, string message, string url); | ||||
|               void llLoadURL(LSL_Key avatar_id, string message, string url); | ||||
|          LSL_Float llLog(double val); | ||||
|          LSL_Float llLog10(double val); | ||||
|               void llLookAt(LSL_Vector target, double strength, double damping); | ||||
|               void llLoopSound(string sound, double volume); | ||||
|               void llLoopSoundMaster(string sound, double volume); | ||||
|               void llLoopSoundSlave(string sound, double volume); | ||||
|        LSL_Integer llManageEstateAccess(int action, string avatar); | ||||
|        LSL_Integer llManageEstateAccess(int action, LSL_Key avatar); | ||||
|               void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset); | ||||
|               void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset); | ||||
|               void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset); | ||||
|               void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset); | ||||
|               void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at); | ||||
|               LSL_String llMD5String(string src, int nonce); | ||||
|               LSL_String llSHA1String(string src); | ||||
|               void llMessageLinked(int linknum, int num, string str, string id); | ||||
|         LSL_String llMD5String(string src, int nonce); | ||||
|         LSL_String llSHA1String(string src); | ||||
|               void llMessageLinked(int linknum, int num, string str, LSL_Key id); | ||||
|               void llMinEventDelay(double delay); | ||||
|               void llModifyLand(int action, int brush); | ||||
|        LSL_Integer llModPow(int a, int b, int c); | ||||
|               void llMoveToTarget(LSL_Vector target, double tau); | ||||
|               void llOffsetTexture(double u, double v, int face); | ||||
|               void llOpenRemoteDataChannel(); | ||||
|        LSL_Integer llOverMyLand(string id); | ||||
|        LSL_Integer llOverMyLand(LSL_Key id); | ||||
|               void llOwnerSay(string msg); | ||||
|               void llParcelMediaCommandList(LSL_List commandList); | ||||
|           LSL_List llParcelMediaQuery(LSL_List aList); | ||||
|  | @ -283,25 +283,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|               void llPointAt(LSL_Vector pos); | ||||
|          LSL_Float llPow(double fbase, double fexponent); | ||||
|               void llPreloadSound(string sound); | ||||
|               void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local); | ||||
|               void llPushObject(LSL_Key target, LSL_Vector impulse, LSL_Vector ang_impulse, int local); | ||||
|               void llRefreshPrimURL(); | ||||
|               void llRegionSay(int channelID, string text); | ||||
|               void llRegionSayTo(string target, int channelID, string text); | ||||
|               void llRegionSayTo(LSL_Key target, int channelID, string text); | ||||
|               void llReleaseCamera(string avatar); | ||||
|               void llReleaseControls(); | ||||
|               void llReleaseURL(string url); | ||||
|               void llRemoteDataReply(string channel, string message_id, string sdata, int idata); | ||||
|               void llRemoteDataReply(LSL_Key channel, LSL_Key message_id, string sdata, int idata); | ||||
|               void llRemoteDataSetRegion(); | ||||
|               void llRemoteLoadScript(string target, string name, int running, int start_param); | ||||
|               void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param); | ||||
|               void llRemoveFromLandBanList(string avatar); | ||||
|               void llRemoveFromLandPassList(string avatar); | ||||
|               void llRemoteLoadScript(LSL_Key target, string name, int running, int start_param); | ||||
|               void llRemoteLoadScriptPin(LSL_Key target, string name, int pin, int running, int start_param); | ||||
|               void llRemoveFromLandBanList(LSL_Key avatar); | ||||
|               void llRemoveFromLandPassList(LSL_Key avatar); | ||||
|               void llRemoveInventory(string item); | ||||
|               void llRemoveVehicleFlags(int flags); | ||||
|            LSL_Key llRequestAgentData(string id, int data); | ||||
|            LSL_Key llRequestAgentData(LSL_Key id, int data); | ||||
|            LSL_Key llRequestInventoryData(string name); | ||||
|               void llRequestPermissions(string agent, int perm); | ||||
|         LSL_String llRequestSecureURL(); | ||||
|               void llRequestPermissions(LSL_Key agent, int perm); | ||||
|            LSL_Key llRequestSecureURL(); | ||||
|            LSL_Key llRequestSimulatorData(string simulator, int data); | ||||
|            LSL_Key llRequestURL(); | ||||
|               void llResetLandBanList(); | ||||
|  | @ -323,15 +323,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|        LSL_Integer llRotTarget(LSL_Rotation rot, double error); | ||||
|               void llRotTargetRemove(int number); | ||||
|        LSL_Integer llRound(double f); | ||||
|        LSL_Integer llSameGroup(string agent); | ||||
|        LSL_Integer llSameGroup(LSL_Key agent); | ||||
|               void llSay(int channelID, string text); | ||||
|               void llScaleTexture(double u, double v, int face); | ||||
|        LSL_Integer llScriptDanger(LSL_Vector pos); | ||||
|               void llScriptProfiler(LSL_Integer flag); | ||||
|            LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata); | ||||
|               void llSensor(string name, string id, int type, double range, double arc); | ||||
|            LSL_Key llSendRemoteData(LSL_Key channel, string dest, int idata, string sdata); | ||||
|               void llSensor(string name, LSL_Key id, int type, double range, double arc); | ||||
|               void llSensorRemove(); | ||||
|               void llSensorRepeat(string name, string id, int type, double range, double arc, double rate); | ||||
|               void llSensorRepeat(string name, LSL_Key id, int type, double range, double arc, double rate); | ||||
|               void llSetAlpha(double alpha, int face); | ||||
|               void llSetBuoyancy(double buoyancy); | ||||
|               void llSetCameraAtOffset(LSL_Vector offset); | ||||
|  | @ -410,16 +410,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|        LSL_Integer llTarget(LSL_Vector position, double range); | ||||
|               void llTargetOmega(LSL_Vector axis, double spinrate, double gain); | ||||
|               void llTargetRemove(int number); | ||||
|               void llTeleportAgentHome(string agent); | ||||
|               void llTeleportAgent(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt); | ||||
|               void llTeleportAgentGlobalCoords(string agent, LSL_Vector global, LSL_Vector pos, LSL_Vector lookAt); | ||||
|               void llTextBox(string avatar, string message, int chat_channel); | ||||
|               void llTeleportAgentHome(LSL_Key agent); | ||||
|               void llTeleportAgent(LSL_Key agent, string simname, LSL_Vector pos, LSL_Vector lookAt); | ||||
|               void llTeleportAgentGlobalCoords(LSL_Key agent, LSL_Vector global, LSL_Vector pos, LSL_Vector lookAt); | ||||
|               void llTextBox(LSL_Key avatar, string message, int chat_channel); | ||||
|         LSL_String llToLower(string source); | ||||
|         LSL_String llToUpper(string source); | ||||
|               void llTriggerSound(string sound, double volume); | ||||
|               void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, LSL_Vector bottom_south_west); | ||||
|         LSL_String llUnescapeURL(string url); | ||||
|               void llUnSit(string id); | ||||
|               void llUnSit(LSL_Key id); | ||||
|          LSL_Float llVecDist(LSL_Vector a, LSL_Vector b); | ||||
|          LSL_Float llVecMag(LSL_Vector v); | ||||
|         LSL_Vector llVecNorm(LSL_Vector v); | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ using OpenSim.Region.ScriptEngine.Interfaces; | |||
| 
 | ||||
| using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||||
| using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||||
| using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
|  |  | |||
|  | @ -29,14 +29,13 @@ using System; | |||
| using System.Collections; | ||||
| using OpenSim.Region.ScriptEngine.Interfaces; | ||||
| 
 | ||||
| using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||||
| using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||||
| using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| 
 | ||||
| namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | ||||
| { | ||||
|  | @ -117,15 +116,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         void CheckThreatLevel(ThreatLevel level, string function); | ||||
| 
 | ||||
|         //OpenSim functions | ||||
|         string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); | ||||
|         string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||||
|         LSL_Key osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); | ||||
|         LSL_Key osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                            int timer, int alpha); | ||||
|         string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | ||||
|         LSL_Key osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                            bool blend, int disp, int timer, int alpha, int face); | ||||
|         string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); | ||||
|         string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | ||||
|         LSL_Key osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); | ||||
|         LSL_Key osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | ||||
|                                             int timer, int alpha); | ||||
|         string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | ||||
|         LSL_Key osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | ||||
|                                             bool blend, int disp, int timer, int alpha, int face); | ||||
| 
 | ||||
|         LSL_Float osGetTerrainHeight(int x, int y); | ||||
|  | @ -143,20 +142,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         void osSetParcelSIPAddress(string SIPAddress); | ||||
| 
 | ||||
|         // Avatar Info Commands | ||||
|         string osGetAgentIP(string agent); | ||||
|         string osGetAgentIP(LSL_Key agent); | ||||
|         LSL_List osGetAgents(); | ||||
|          | ||||
|         // Teleport commands | ||||
|         void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportAgent(LSL_Key agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportAgent(LSL_Key agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportAgent(LSL_Key agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportOwner(int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
|         void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | ||||
| 
 | ||||
|         // Animation commands | ||||
|         void osAvatarPlayAnimation(string avatar, string animation); | ||||
|         void osAvatarStopAnimation(string avatar, string animation); | ||||
|         void osAvatarPlayAnimation(LSL_Key avatar, string animation); | ||||
|         void osAvatarStopAnimation(LSL_Key avatar, string animation); | ||||
| 
 | ||||
|         #region Attachment commands | ||||
| 
 | ||||
|  | @ -185,7 +184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         /// <param name='rawAvatarId'>The UUID of the avatar to which to attach.  Nothing happens if this is not a UUID</para> | ||||
|         /// <param name='itemName'>The name of the item.  If this is not found then a warning is said to the owner</param> | ||||
|         /// <param name='attachment'>The attachment point.  For example, ATTACH_CHEST</param> | ||||
|         void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint); | ||||
|         void osForceAttachToOtherAvatarFromInventory(LSL_Key rawAvatarId, string itemName, int attachmentPoint); | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Detach the object containing this script from the avatar it is attached to without checking for PERMISSION_ATTACH | ||||
|  | @ -234,18 +233,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         string osSetPenCap(string drawList, string direction, string type); | ||||
|         string osDrawImage(string drawList, int width, int height, string imageUrl); | ||||
|         vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize); | ||||
|         void osSetStateEvents(int events); | ||||
|         void   osSetStateEvents(int events); | ||||
| 
 | ||||
|         double osList2Double(LSL_Types.list src, int index); | ||||
| 
 | ||||
|         void osSetRegionWaterHeight(double height); | ||||
|         void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour); | ||||
|         void osSetEstateSunSettings(bool sunFixed, double sunHour); | ||||
|         void   osSetRegionWaterHeight(double height); | ||||
|         void   osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour); | ||||
|         void   osSetEstateSunSettings(bool sunFixed, double sunHour); | ||||
|         double osGetCurrentSunHour(); | ||||
|         double osGetSunParam(string param); | ||||
|         double osSunGetParam(string param); // Deprecated | ||||
|         void osSetSunParam(string param, double value); | ||||
|         void osSunSetParam(string param, double value); // Deprecated | ||||
|         void   osSetSunParam(string param, double value); | ||||
|         void   osSunSetParam(string param, double value); // Deprecated | ||||
| 
 | ||||
|         // Wind Module Functions | ||||
|         string osWindActiveModelPluginName(); | ||||
|  | @ -258,24 +257,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         void osSetParcelDetails(vector pos, LSL_List rules); | ||||
|         void osParcelSetDetails(vector pos, LSL_List rules); // Deprecated | ||||
| 
 | ||||
|         string osGetScriptEngineName(); | ||||
|         string osGetSimulatorVersion(); | ||||
|         string      osGetScriptEngineName(); | ||||
|         string      osGetSimulatorVersion(); | ||||
|         LSL_Integer osCheckODE(); | ||||
|         string osGetPhysicsEngineType(); | ||||
|         string osGetPhysicsEngineName(); | ||||
|         string      osGetPhysicsEngineType(); | ||||
|         string      osGetPhysicsEngineName(); | ||||
| 
 | ||||
|         Object osParseJSONNew(string JSON); | ||||
|         Hashtable osParseJSON(string JSON); | ||||
| 
 | ||||
|         void osMessageObject(key objectUUID,string message); | ||||
|         void osMessageObject(LSL_Key objectUUID, string message); | ||||
| 
 | ||||
|         void osMakeNotecard(string notecardName, LSL_Types.list contents); | ||||
| 
 | ||||
|         string osGetNotecardLine(string name, int line); | ||||
|         string osGetNotecard(string name); | ||||
|         int osGetNumberOfNotecardLines(string name); | ||||
|         int    osGetNumberOfNotecardLines(string name); | ||||
| 
 | ||||
|         string osAvatarName2Key(string firstname, string lastname); | ||||
|         string osKey2Name(string id); | ||||
|         LSL_Key osAvatarName2Key(string firstname, string lastname); | ||||
|         string  osKey2Name(LSL_Key id); | ||||
| 
 | ||||
|         // Grid Info Functions | ||||
|         string osGetGridNick(); | ||||
|  | @ -285,16 +285,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         string osGetGridGatekeeperURI(); | ||||
|         string osGetGridCustom(string key); | ||||
| 
 | ||||
|         string osGetAvatarHomeURI(string uuid); | ||||
|         string osGetAvatarHomeURI(LSL_Key uuid); | ||||
| 
 | ||||
|         LSL_String osFormatString(string str, LSL_List strings); | ||||
|         LSL_List osMatchString(string src, string pattern, int start); | ||||
|         LSL_List   osMatchString(string src, string pattern, int start); | ||||
|         LSL_String osReplaceString(string src, string pattern, string replace, int count, int start); | ||||
| 
 | ||||
|         // Information about data loaded into the region | ||||
|         string osLoadedCreationDate(); | ||||
|         string osLoadedCreationTime(); | ||||
|         string osLoadedCreationID(); | ||||
|         string  osLoadedCreationDate(); | ||||
|         string  osLoadedCreationTime(); | ||||
|         LSL_Key osLoadedCreationID(); | ||||
| 
 | ||||
|         LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules); | ||||
| 
 | ||||
|  | @ -303,7 +303,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         /// </summary> | ||||
|         /// <param name='target'></param> | ||||
|         /// <param name='parent'></param> | ||||
|         void osForceCreateLink(string target, int parent); | ||||
|         void osForceCreateLink(LSL_Key target, int parent); | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Identical to llBreakLink() but does not require permission from the owner. | ||||
|  | @ -323,13 +323,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         /// <returns>TRUE if the key belongs to an npc in the scene.  FALSE otherwise.</returns> | ||||
|         LSL_Integer osIsNpc(LSL_Key npc); | ||||
| 
 | ||||
|         key         osNpcCreate(string user, string name, vector position, string notecard); | ||||
|         key         osNpcCreate(string user, string name, vector position, string notecard, int options); | ||||
|         LSL_Key     osNpcSaveAppearance(key npc, string notecard); | ||||
|         void        osNpcLoadAppearance(key npc, string notecard); | ||||
|         vector      osNpcGetPos(key npc); | ||||
|         void        osNpcMoveTo(key npc, vector position); | ||||
|         void        osNpcMoveToTarget(key npc, vector target, int options); | ||||
|         LSL_Key osNpcCreate(string user, string name, vector position, string notecard); | ||||
|         LSL_Key osNpcCreate(string user, string name, vector position, string notecard, int options); | ||||
|         LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard); | ||||
|         void    osNpcLoadAppearance(LSL_Key npc, string notecard); | ||||
|         vector  osNpcGetPos(LSL_Key npc); | ||||
|         void    osNpcMoveTo(LSL_Key npc, vector position); | ||||
|         void    osNpcMoveToTarget(LSL_Key npc, vector target, int options); | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Get the owner of the NPC | ||||
|  | @ -338,46 +338,47 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         /// <returns> | ||||
|         /// The owner of the NPC for an owned NPC.  The NPC's agent id for an unowned NPC.  UUID.Zero if the key is not an npc. | ||||
|         /// </returns> | ||||
|         LSL_Key     osNpcGetOwner(key npc); | ||||
|         LSL_Key  osNpcGetOwner(LSL_Key npc); | ||||
|         rotation osNpcGetRot(LSL_Key npc); | ||||
|         void     osNpcSetRot(LSL_Key npc, rotation rot); | ||||
|         void     osNpcStopMoveToTarget(LSL_Key npc); | ||||
|         void     osNpcSay(LSL_Key npc, string message); | ||||
|         void     osNpcSay(LSL_Key npc, int channel, string message); | ||||
|         void     osNpcShout(LSL_Key npc, int channel, string message); | ||||
|         void     osNpcSit(LSL_Key npc, LSL_Key target, int options); | ||||
|         void     osNpcStand(LSL_Key npc); | ||||
|         void     osNpcRemove(LSL_Key npc); | ||||
|         void     osNpcPlayAnimation(LSL_Key npc, string animation); | ||||
|         void     osNpcStopAnimation(LSL_Key npc, string animation); | ||||
|         void     osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num); | ||||
|         void     osNpcWhisper(LSL_Key npc, int channel, string message); | ||||
| 
 | ||||
|         rotation    osNpcGetRot(key npc); | ||||
|         void        osNpcSetRot(LSL_Key npc, rotation rot); | ||||
|         void        osNpcStopMoveToTarget(LSL_Key npc); | ||||
|         void        osNpcSay(key npc, string message); | ||||
|         void        osNpcSay(key npc, int channel, string message); | ||||
|         void        osNpcShout(key npc, int channel, string message); | ||||
|         void        osNpcSit(key npc, key target, int options); | ||||
|         void        osNpcStand(LSL_Key npc); | ||||
|         void        osNpcRemove(key npc); | ||||
|         void        osNpcPlayAnimation(LSL_Key npc, string animation); | ||||
|         void        osNpcStopAnimation(LSL_Key npc, string animation); | ||||
|         void        osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num); | ||||
|         void        osNpcWhisper(key npc, int channel, string message); | ||||
|         LSL_Key  osOwnerSaveAppearance(string notecard); | ||||
|         LSL_Key  osAgentSaveAppearance(LSL_Key agentId, string notecard); | ||||
| 
 | ||||
|         LSL_Key     osOwnerSaveAppearance(string notecard); | ||||
|         LSL_Key     osAgentSaveAppearance(key agentId, string notecard); | ||||
|         LSL_String  osGetGender(LSL_Key rawAvatarId); | ||||
|         LSL_Key     osGetMapTexture(); | ||||
|         LSL_Key     osGetRegionMapTexture(string regionName); | ||||
|         LSL_List    osGetRegionStats(); | ||||
|         vector      osGetRegionSize(); | ||||
| 
 | ||||
|         key osGetGender(LSL_Key rawAvatarId); | ||||
|         key osGetMapTexture(); | ||||
|         key osGetRegionMapTexture(string regionName); | ||||
|         LSL_List osGetRegionStats(); | ||||
|         vector osGetRegionSize(); | ||||
| 
 | ||||
|         int osGetSimulatorMemory(); | ||||
|         void osKickAvatar(string FirstName,string SurName,string alert); | ||||
|         void osSetSpeed(string UUID, LSL_Float SpeedModifier); | ||||
|         LSL_Float osGetHealth(string avatar); | ||||
|         void osCauseHealing(string avatar, double healing); | ||||
|         void osSetHealth(string avatar, double health); | ||||
|         void osSetHealRate(string avatar, double health); | ||||
|         LSL_Float osGetHealRate(string avatar); | ||||
|         void osCauseDamage(string avatar, double damage); | ||||
|         void osForceOtherSit(string avatar); | ||||
|         void osForceOtherSit(string avatar, string target); | ||||
|         LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); | ||||
|         void osSetPrimitiveParams(LSL_Key prim, LSL_List rules); | ||||
|         void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb); | ||||
|         void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb); | ||||
|         int         osGetSimulatorMemory(); | ||||
|         void        osKickAvatar(string FirstName, string SurName, string alert); | ||||
|         void        osSetSpeed(LSL_Key UUID, LSL_Float SpeedModifier); | ||||
|         LSL_Float   osGetHealth(LSL_Key avatar); | ||||
|         void        osCauseHealing(LSL_Key avatar, double healing); | ||||
|         void        osSetHealth(LSL_Key avatar, double health); | ||||
|         void        osSetHealRate(LSL_Key avatar, double health); | ||||
|         LSL_Float   osGetHealRate(LSL_Key avatar); | ||||
|         void        osCauseDamage(LSL_Key avatar, double damage); | ||||
|         void        osForceOtherSit(LSL_Key avatar); | ||||
|         void        osForceOtherSit(LSL_Key avatar, string target); | ||||
|         LSL_List    osGetPrimitiveParams(LSL_Key prim, LSL_List rules); | ||||
|         void        osSetPrimitiveParams(LSL_Key prim, LSL_List rules); | ||||
|         void        osSetProjectionParams(bool projection, LSL_Key texture, double fov, | ||||
|                                         double focus, double amb); | ||||
|         void        osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, | ||||
|                                         double focus, double amb); | ||||
| 
 | ||||
|         LSL_List osGetAvatarList(); | ||||
| 
 | ||||
|  | @ -463,7 +464,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         /// OS_LISTEN_REGEX_MESSAGE | ||||
|         /// </param> | ||||
|         /// <returns></returns> | ||||
|         LSL_Integer osListenRegex(int channelID, string name, string ID, | ||||
|         LSL_Integer osListenRegex(int channelID, string name, LSL_Key ID, | ||||
|                 string msg, int regexBitfield); | ||||
| 
 | ||||
|         /// <summary> | ||||
|  | @ -474,8 +475,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
|         /// <returns>boolean</returns> | ||||
|         LSL_Integer osRegexIsMatch(string input, string pattern); | ||||
| 
 | ||||
|         LSL_String osRequestURL(LSL_List options); | ||||
|         LSL_String osRequestSecureURL(LSL_List options); | ||||
|         LSL_Key osRequestURL(LSL_List options); | ||||
|         LSL_Key osRequestSecureURL(LSL_List options); | ||||
|         void osCollisionSound(string impact_sound, double impact_volume); | ||||
|         void osVolumeDetect(int detect); | ||||
|     } | ||||
|  |  | |||
|  | @ -29,6 +29,7 @@ using System; | |||
| using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||||
| using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using LSLInteger = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using LSLKey = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| 
 | ||||
| namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | ||||
| { | ||||
|  | @ -540,7 +541,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|         public static readonly LSLInteger PAY_HIDE = new LSLInteger(-1); | ||||
|         public static readonly LSLInteger PAY_DEFAULT = new LSLInteger(-2); | ||||
| 
 | ||||
|         public const string NULL_KEY = "00000000-0000-0000-0000-000000000000"; | ||||
|         public static readonly LSLKey NULL_KEY = new LSLKey("00000000-0000-0000-0000-000000000000"); | ||||
|         public const string EOF = "\n\n\n"; | ||||
|         public const double PI = 3.14159274f; | ||||
|         public const double TWO_PI = 6.28318548f; | ||||
|  |  | |||
|  | @ -37,7 +37,7 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | |||
| 
 | ||||
| using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||||
| using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||||
| using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
|  | @ -75,12 +75,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llAcos(val); | ||||
|         } | ||||
| 
 | ||||
|         public void llAddToLandBanList(string avatar, double hours) | ||||
|         public void llAddToLandBanList(LSL_Key avatar, double hours) | ||||
|         { | ||||
|             m_LSL_Functions.llAddToLandBanList(avatar, hours); | ||||
|         } | ||||
| 
 | ||||
|         public void llAddToLandPassList(string avatar, double hours) | ||||
|         public void llAddToLandPassList(LSL_Key avatar, double hours) | ||||
|         { | ||||
|             m_LSL_Functions.llAddToLandPassList(avatar, hours); | ||||
|         } | ||||
|  | @ -175,7 +175,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llClearCameraParams(); | ||||
|         } | ||||
| 
 | ||||
|         public void llCloseRemoteDataChannel(string channel) | ||||
|         public void llCloseRemoteDataChannel(LSL_Key channel) | ||||
|         { | ||||
|             m_LSL_Functions.llCloseRemoteDataChannel(channel); | ||||
|         } | ||||
|  | @ -185,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llCloud(offset); | ||||
|         } | ||||
| 
 | ||||
|         public void llCollisionFilter(string name, string id, int accept) | ||||
|         public void llCollisionFilter(string name, LSL_Key id, int accept) | ||||
|         { | ||||
|             m_LSL_Functions.llCollisionFilter(name, id, accept); | ||||
|         } | ||||
|  | @ -205,7 +205,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llCos(f); | ||||
|         } | ||||
| 
 | ||||
|         public void llCreateLink(string target, int parent) | ||||
|         public void llCreateLink(LSL_Key target, int parent) | ||||
|         { | ||||
|             m_LSL_Functions.llCreateLink(target, parent); | ||||
|         } | ||||
|  | @ -310,7 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llDetectedVel(number); | ||||
|         } | ||||
| 
 | ||||
|         public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel) | ||||
|         public void llDialog(LSL_Key avatar, string message, LSL_List buttons, int chat_channel) | ||||
|         { | ||||
|             m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); | ||||
|         } | ||||
|  | @ -331,7 +331,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llEdgeOfWorld(pos, dir); | ||||
|         } | ||||
| 
 | ||||
|         public void llEjectFromLand(string pest) | ||||
|         public void llEjectFromLand(LSL_Key pest) | ||||
|         { | ||||
|             m_LSL_Functions.llEjectFromLand(pest); | ||||
|         } | ||||
|  | @ -381,7 +381,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetAccel(); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer llGetAgentInfo(string id) | ||||
|         public LSL_Integer llGetAgentInfo(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetAgentInfo(id); | ||||
|         } | ||||
|  | @ -396,7 +396,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetAgentList(scope, options); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Vector llGetAgentSize(string id) | ||||
|         public LSL_Vector llGetAgentSize(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetAgentSize(id); | ||||
|         } | ||||
|  | @ -411,12 +411,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetAndResetTime(); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llGetAnimation(string id) | ||||
|         public LSL_String llGetAnimation(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetAnimation(id); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_List llGetAnimationList(string id) | ||||
|         public LSL_List llGetAnimationList(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetAnimationList(id); | ||||
|         } | ||||
|  | @ -426,7 +426,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetAttached(); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_List llGetBoundingBox(string obj) | ||||
|         public LSL_List llGetBoundingBox(LSL_Key obj) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetBoundingBox(obj); | ||||
|         } | ||||
|  | @ -451,7 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetColor(face); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llGetCreator() | ||||
|         public LSL_Key llGetCreator() | ||||
|         { | ||||
|             return m_LSL_Functions.llGetCreator(); | ||||
|         } | ||||
|  | @ -606,7 +606,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llGetNextEmail(address, subject); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llGetNotecardLine(string name, int line) | ||||
|         public LSL_Key llGetNotecardLine(string name, int line) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetNotecardLine(name, line); | ||||
|         } | ||||
|  | @ -631,12 +631,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetObjectDesc(); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_List llGetObjectDetails(string id, LSL_List args) | ||||
|         public LSL_List llGetObjectDetails(LSL_Key id, LSL_List args) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetObjectDetails(id, args); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Float llGetObjectMass(string id) | ||||
|         public LSL_Float llGetObjectMass(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetObjectMass(id); | ||||
|         } | ||||
|  | @ -651,7 +651,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetObjectPermMask(mask); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer llGetObjectPrimCount(string object_id) | ||||
|         public LSL_Integer llGetObjectPrimCount(LSL_Key object_id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetObjectPrimCount(object_id); | ||||
|         } | ||||
|  | @ -666,7 +666,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetOwner(); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Key llGetOwnerKey(string id) | ||||
|         public LSL_Key llGetOwnerKey(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetOwnerKey(id); | ||||
|         } | ||||
|  | @ -871,27 +871,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGetWallclock(); | ||||
|         } | ||||
| 
 | ||||
|         public void llGiveInventory(string destination, string inventory) | ||||
|         public void llGiveInventory(LSL_Key destination, string inventory) | ||||
|         { | ||||
|             m_LSL_Functions.llGiveInventory(destination, inventory); | ||||
|         } | ||||
| 
 | ||||
|         public void llGiveInventoryList(string destination, string category, LSL_List inventory) | ||||
|         public void llGiveInventoryList(LSL_Key destination, string category, LSL_List inventory) | ||||
|         { | ||||
|             m_LSL_Functions.llGiveInventoryList(destination, category, inventory); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer llGiveMoney(string destination, int amount) | ||||
|         public LSL_Integer llGiveMoney(LSL_Key destination, int amount) | ||||
|         { | ||||
|             return m_LSL_Functions.llGiveMoney(destination, amount); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llTransferLindenDollars(string destination, int amount) | ||||
|         public LSL_Key llTransferLindenDollars(LSL_Key destination, int amount) | ||||
|         { | ||||
|             return m_LSL_Functions.llTransferLindenDollars(destination, amount); | ||||
|         } | ||||
| 
 | ||||
|         public void llGodLikeRezObject(string inventory, LSL_Vector pos) | ||||
|         public void llGodLikeRezObject(LSL_Key inventory, LSL_Vector pos) | ||||
|         { | ||||
|             m_LSL_Functions.llGodLikeRezObject(inventory, pos); | ||||
|         } | ||||
|  | @ -921,7 +921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llGroundSlope(offset); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llHTTPRequest(string url, LSL_List parameters, string body) | ||||
|         public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) | ||||
|         { | ||||
|             return m_LSL_Functions.llHTTPRequest(url, parameters, body); | ||||
|         } | ||||
|  | @ -936,7 +936,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llInsertString(dst, position, src); | ||||
|         } | ||||
| 
 | ||||
|         public void llInstantMessage(string user, string message) | ||||
|         public void llInstantMessage(LSL_Key user, string message) | ||||
|         { | ||||
|             m_LSL_Functions.llInstantMessage(user, message); | ||||
|         } | ||||
|  | @ -946,27 +946,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llIntegerToBase64(number); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llKey2Name(string id) | ||||
|         public LSL_String llKey2Name(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llKey2Name(id); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llGetUsername(string id) | ||||
|         public LSL_String llGetUsername(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetUsername(id); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llRequestUsername(string id) | ||||
|         public LSL_Key llRequestUsername(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llRequestUsername(id); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llGetDisplayName(string id) | ||||
|         public LSL_String llGetDisplayName(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llGetDisplayName(id); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String llRequestDisplayName(string id) | ||||
|         public LSL_Key llRequestDisplayName(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llRequestDisplayName(id); | ||||
|         } | ||||
|  | @ -1026,7 +1026,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llList2Vector(src, index); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer llListen(int channelID, string name, string ID, string msg) | ||||
|         public LSL_Integer llListen(int channelID, string name, LSL_Key ID, string msg) | ||||
|         { | ||||
|             return m_LSL_Functions.llListen(channelID, name, ID, msg); | ||||
|         } | ||||
|  | @ -1071,7 +1071,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llListStatistics(operation, src); | ||||
|         } | ||||
| 
 | ||||
|         public void llLoadURL(string avatar_id, string message, string url) | ||||
|         public void llLoadURL(LSL_Key avatar_id, string message, string url) | ||||
|         { | ||||
|             m_LSL_Functions.llLoadURL(avatar_id, message, url); | ||||
|         } | ||||
|  | @ -1106,7 +1106,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llLoopSoundSlave(sound, volume); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer llManageEstateAccess(int action, string avatar) | ||||
|         public LSL_Integer llManageEstateAccess(int action, LSL_Key avatar) | ||||
|         { | ||||
|             return m_LSL_Functions.llManageEstateAccess(action, avatar); | ||||
|         } | ||||
|  | @ -1146,7 +1146,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llSHA1String(src); | ||||
|         } | ||||
| 
 | ||||
|         public void llMessageLinked(int linknum, int num, string str, string id) | ||||
|         public void llMessageLinked(int linknum, int num, string str, LSL_Key id) | ||||
|         { | ||||
|             m_LSL_Functions.llMessageLinked(linknum, num, str, id); | ||||
|         } | ||||
|  | @ -1181,7 +1181,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llOpenRemoteDataChannel(); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer llOverMyLand(string id) | ||||
|         public LSL_Integer llOverMyLand(LSL_Key id) | ||||
|         { | ||||
|             return m_LSL_Functions.llOverMyLand(id); | ||||
|         } | ||||
|  | @ -1251,7 +1251,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llPreloadSound(sound); | ||||
|         } | ||||
| 
 | ||||
|         public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) | ||||
|         public void llPushObject(LSL_Key target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) | ||||
|         { | ||||
|             m_LSL_Functions.llPushObject(target, impulse, ang_impulse, local); | ||||
|         } | ||||
|  | @ -1266,7 +1266,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llRegionSay(channelID, text); | ||||
|         } | ||||
| 
 | ||||
|         public void llRegionSayTo(string key, int channelID, string text) | ||||
|         public void llRegionSayTo(LSL_Key key, int channelID, string text) | ||||
|         { | ||||
|             m_LSL_Functions.llRegionSayTo(key, channelID, text); | ||||
|         } | ||||
|  | @ -1296,22 +1296,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llRemoteDataSetRegion(); | ||||
|         } | ||||
| 
 | ||||
|         public void llRemoteLoadScript(string target, string name, int running, int start_param) | ||||
|         public void llRemoteLoadScript(LSL_Key target, string name, int running, int start_param) | ||||
|         { | ||||
|             m_LSL_Functions.llRemoteLoadScript(target, name, running, start_param); | ||||
|         } | ||||
| 
 | ||||
|         public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) | ||||
|         public void llRemoteLoadScriptPin(LSL_Key target, string name, int pin, int running, int start_param) | ||||
|         { | ||||
|             m_LSL_Functions.llRemoteLoadScriptPin(target, name, pin, running, start_param); | ||||
|         } | ||||
| 
 | ||||
|         public void llRemoveFromLandBanList(string avatar) | ||||
|         public void llRemoveFromLandBanList(LSL_Key avatar) | ||||
|         { | ||||
|             m_LSL_Functions.llRemoveFromLandBanList(avatar); | ||||
|         } | ||||
| 
 | ||||
|         public void llRemoveFromLandPassList(string avatar) | ||||
|         public void llRemoveFromLandPassList(LSL_Key avatar) | ||||
|         { | ||||
|             m_LSL_Functions.llRemoveFromLandPassList(avatar); | ||||
|         } | ||||
|  | @ -1326,7 +1326,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llRemoveVehicleFlags(flags); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Key llRequestAgentData(string id, int data) | ||||
|         public LSL_Key llRequestAgentData(LSL_Key id, int data) | ||||
|         { | ||||
|             return m_LSL_Functions.llRequestAgentData(id, data); | ||||
|         } | ||||
|  | @ -1336,7 +1336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llRequestInventoryData(name); | ||||
|         } | ||||
| 
 | ||||
|         public void llRequestPermissions(string agent, int perm) | ||||
|         public void llRequestPermissions(LSL_Key agent, int perm) | ||||
|         { | ||||
|             m_LSL_Functions.llRequestPermissions(agent, perm); | ||||
|         } | ||||
|  | @ -1450,7 +1450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llRound(f); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer llSameGroup(string agent) | ||||
|         public LSL_Integer llSameGroup(LSL_Key agent) | ||||
|         { | ||||
|             return m_LSL_Functions.llSameGroup(agent); | ||||
|         } | ||||
|  | @ -1475,12 +1475,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llScriptProfiler(flags); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) | ||||
|         public LSL_Key llSendRemoteData(LSL_Key channel, string dest, int idata, string sdata) | ||||
|         { | ||||
|             return m_LSL_Functions.llSendRemoteData(channel, dest, idata, sdata); | ||||
|         } | ||||
| 
 | ||||
|         public void llSensor(string name, string id, int type, double range, double arc) | ||||
|         public void llSensor(string name, LSL_Key id, int type, double range, double arc) | ||||
|         { | ||||
|             m_LSL_Functions.llSensor(name, id, type, range, arc); | ||||
|         } | ||||
|  | @ -1490,7 +1490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llSensorRemove(); | ||||
|         } | ||||
| 
 | ||||
|         public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) | ||||
|         public void llSensorRepeat(string name, LSL_Key id, int type, double range, double arc, double rate) | ||||
|         { | ||||
|             m_LSL_Functions.llSensorRepeat(name, id, type, range, arc, rate); | ||||
|         } | ||||
|  | @ -1881,22 +1881,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_LSL_Functions.llTargetRemove(number); | ||||
|         } | ||||
| 
 | ||||
|         public void llTeleportAgent(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt) | ||||
|         public void llTeleportAgent(LSL_Key agent, string simname, LSL_Vector pos, LSL_Vector lookAt) | ||||
|         { | ||||
|             m_LSL_Functions.llTeleportAgent(agent, simname, pos, lookAt); | ||||
|         } | ||||
| 
 | ||||
|         public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global, LSL_Vector pos, LSL_Vector lookAt) | ||||
|         public void llTeleportAgentGlobalCoords(LSL_Key agent, LSL_Vector global, LSL_Vector pos, LSL_Vector lookAt) | ||||
|         { | ||||
|             m_LSL_Functions.llTeleportAgentGlobalCoords(agent, global, pos, lookAt); | ||||
|         } | ||||
| 
 | ||||
|         public void llTeleportAgentHome(string agent) | ||||
|         public void llTeleportAgentHome(LSL_Key agent) | ||||
|         { | ||||
|             m_LSL_Functions.llTeleportAgentHome(agent); | ||||
|         } | ||||
| 
 | ||||
|         public void llTextBox(string avatar, string message, int chat_channel) | ||||
|         public void llTextBox(LSL_Key avatar, string message, int chat_channel) | ||||
|         { | ||||
|             m_LSL_Functions.llTextBox(avatar, message, chat_channel); | ||||
|         } | ||||
|  | @ -1926,7 +1926,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_LSL_Functions.llUnescapeURL(url); | ||||
|         } | ||||
| 
 | ||||
|         public void llUnSit(string id) | ||||
|         public void llUnSit(LSL_Key id) | ||||
|         { | ||||
|             m_LSL_Functions.llUnSit(id); | ||||
|         } | ||||
|  |  | |||
|  | @ -38,10 +38,10 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | |||
| using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||||
| using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||||
| using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||||
| using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||||
| using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.key; | ||||
| using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||||
| using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||||
| 
 | ||||
|  | @ -141,7 +141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_OSSL_Functions.osList2Double(src, index); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                              int timer) | ||||
|         { | ||||
|             return m_OSSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer); | ||||
|  | @ -153,7 +153,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                            int timer, int alpha) | ||||
|         { | ||||
|             return m_OSSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha); | ||||
|  | @ -165,14 +165,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_OSSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | ||||
|                                            bool blend, int disp, int timer, int alpha, int face) | ||||
|         { | ||||
|             return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams, | ||||
|                                              blend, disp, timer, alpha, face); | ||||
|         } | ||||
| 
 | ||||
|         public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | ||||
|         public LSL_Key osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | ||||
|                                              bool blend, int disp, int timer, int alpha, int face) | ||||
|         { | ||||
|             return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams, | ||||
|  | @ -241,12 +241,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
| 
 | ||||
|         // Teleport Functions | ||||
| 
 | ||||
|         public void osTeleportAgent(string agent, string regionName, vector position, vector lookat) | ||||
|         public void osTeleportAgent(LSL_Key agent, string regionName, vector position, vector lookat) | ||||
|         { | ||||
|             m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat); | ||||
|         } | ||||
| 
 | ||||
|         public void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat) | ||||
|         public void osTeleportAgent(LSL_Key agent, int regionX, int regionY, vector position, vector lookat) | ||||
|         { | ||||
|             m_OSSL_Functions.osTeleportAgent(agent, regionX, regionY, position, lookat); | ||||
|         } | ||||
|  | @ -272,7 +272,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|         } | ||||
| 
 | ||||
|         // Avatar info functions | ||||
|         public string osGetAgentIP(string agent) | ||||
|         public string osGetAgentIP(LSL_Key agent) | ||||
|         { | ||||
|             return m_OSSL_Functions.osGetAgentIP(agent); | ||||
|         } | ||||
|  | @ -284,12 +284,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
| 
 | ||||
|         // Animation Functions | ||||
| 
 | ||||
|         public void osAvatarPlayAnimation(string avatar, string animation) | ||||
|         public void osAvatarPlayAnimation(LSL_Key avatar, string animation) | ||||
|         { | ||||
|             m_OSSL_Functions.osAvatarPlayAnimation(avatar, animation); | ||||
|         } | ||||
| 
 | ||||
|         public void osAvatarStopAnimation(string avatar, string animation) | ||||
|         public void osAvatarStopAnimation(LSL_Key avatar, string animation) | ||||
|         { | ||||
|             m_OSSL_Functions.osAvatarStopAnimation(avatar, animation); | ||||
|         } | ||||
|  | @ -306,7 +306,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_OSSL_Functions.osForceAttachToAvatarFromInventory(itemName, attachmentPoint); | ||||
|         } | ||||
| 
 | ||||
|         public void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint) | ||||
|         public void osForceAttachToOtherAvatarFromInventory(LSL_Key rawAvatarId, string itemName, int attachmentPoint) | ||||
|         { | ||||
|             m_OSSL_Functions.osForceAttachToOtherAvatarFromInventory(rawAvatarId, itemName, attachmentPoint); | ||||
|         } | ||||
|  | @ -480,12 +480,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_OSSL_Functions.osGetNumberOfNotecardLines(name); | ||||
|         } | ||||
| 
 | ||||
|         public string osAvatarName2Key(string firstname, string lastname) | ||||
|         public key osAvatarName2Key(string firstname, string lastname) | ||||
|         { | ||||
|             return m_OSSL_Functions.osAvatarName2Key(firstname, lastname); | ||||
|         } | ||||
| 
 | ||||
|         public string osKey2Name(string id) | ||||
|         public string osKey2Name(LSL_Key id) | ||||
|         { | ||||
|             return m_OSSL_Functions.osKey2Name(id); | ||||
|         } | ||||
|  | @ -520,7 +520,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_OSSL_Functions.osGetGridCustom(key); | ||||
|         } | ||||
| 
 | ||||
|         public string osGetAvatarHomeURI(string uuid) | ||||
|         public string osGetAvatarHomeURI(LSL_Key uuid) | ||||
|         { | ||||
|             return m_OSSL_Functions.osGetAvatarHomeURI(uuid); | ||||
|         } | ||||
|  | @ -562,7 +562,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_OSSL_Functions.osGetLinkPrimitiveParams(linknumber, rules); | ||||
|         } | ||||
| 
 | ||||
|         public void osForceCreateLink(string target, int parent) | ||||
|         public void osForceCreateLink(LSL_Key target, int parent) | ||||
|         { | ||||
|             m_OSSL_Functions.osForceCreateLink(target, parent); | ||||
|         } | ||||
|  | @ -925,47 +925,47 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert); | ||||
|         } | ||||
|          | ||||
|         public void osSetSpeed(string UUID, LSL_Float SpeedModifier) | ||||
|         public void osSetSpeed(LSL_Key UUID, LSL_Float SpeedModifier) | ||||
|         { | ||||
|             m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Float osGetHealth(string avatar) | ||||
|         public LSL_Float osGetHealth(LSL_Key avatar) | ||||
|         { | ||||
|             return m_OSSL_Functions.osGetHealth(avatar); | ||||
|         } | ||||
| 
 | ||||
|         public void osCauseDamage(string avatar, double damage) | ||||
|         public void osCauseDamage(LSL_Key avatar, double damage) | ||||
|         { | ||||
|             m_OSSL_Functions.osCauseDamage(avatar, damage); | ||||
|         } | ||||
|          | ||||
|         public void osCauseHealing(string avatar, double healing) | ||||
|         public void osCauseHealing(LSL_Key avatar, double healing) | ||||
|         { | ||||
|             m_OSSL_Functions.osCauseHealing(avatar, healing); | ||||
|         } | ||||
| 
 | ||||
|         public void osSetHealth(string avatar, double health) | ||||
|         public void osSetHealth(LSL_Key avatar, double health) | ||||
|         { | ||||
|             m_OSSL_Functions.osSetHealth(avatar, health); | ||||
|         } | ||||
| 
 | ||||
|         public void osSetHealRate(string avatar, double health) | ||||
|         public void osSetHealRate(LSL_Key avatar, double health) | ||||
|         { | ||||
|             m_OSSL_Functions.osSetHealRate(avatar, health); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Float osGetHealRate(string avatar) | ||||
|         public LSL_Float osGetHealRate(LSL_Key avatar) | ||||
|         { | ||||
|             return m_OSSL_Functions.osGetHealRate(avatar); | ||||
|         } | ||||
| 
 | ||||
|         public void osForceOtherSit(string avatar) | ||||
|         public void osForceOtherSit(LSL_Key avatar) | ||||
|         { | ||||
|             m_OSSL_Functions.osForceOtherSit(avatar); | ||||
|         } | ||||
| 
 | ||||
|         public void osForceOtherSit(string avatar, string target) | ||||
|         public void osForceOtherSit(LSL_Key avatar, string target) | ||||
|         { | ||||
|             m_OSSL_Functions.osForceOtherSit(avatar, target); | ||||
|         } | ||||
|  | @ -1070,7 +1070,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             m_OSSL_Functions.osForceDropAttachmentAt(pos, rot); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield) | ||||
|         public LSL_Integer osListenRegex(int channelID, string name, LSL_Key ID, string msg, int regexBitfield) | ||||
|         { | ||||
|             return m_OSSL_Functions.osListenRegex(channelID, name, ID, msg, regexBitfield); | ||||
|         } | ||||
|  | @ -1080,12 +1080,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|             return m_OSSL_Functions.osRegexIsMatch(input, pattern); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String osRequestURL(LSL_List options) | ||||
|         public LSL_Key osRequestURL(LSL_List options) | ||||
|         { | ||||
|             return m_OSSL_Functions.osRequestURL(options); | ||||
|         } | ||||
| 
 | ||||
|         public LSL_String osRequestSecureURL(LSL_List options) | ||||
|         public LSL_Key osRequestSecureURL(LSL_List options) | ||||
|         { | ||||
|             return m_OSSL_Functions.osRequestSecureURL(options); | ||||
|         } | ||||
|  |  | |||
|  | @ -168,6 +168,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|                 } | ||||
|                 else if (field.FieldType == typeof(LSL_Types.LSLInteger) || | ||||
|                         field.FieldType == typeof(LSL_Types.LSLString) || | ||||
|                         field.FieldType == typeof(LSL_Types.key) || | ||||
|                         field.FieldType == typeof(LSL_Types.LSLFloat) || | ||||
|                         field.FieldType == typeof(Int32) || | ||||
|                         field.FieldType == typeof(Double) || | ||||
|  | @ -199,6 +200,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
|                         Array.Copy(data, 0, v.Data, 0, data.Length); | ||||
|                         m_Fields[var.Key].SetValue(this, v); | ||||
|                     } | ||||
|                     else if(m_Fields[var.Key].FieldType == typeof(LSL_Types.key)) | ||||
|                     { | ||||
|                         if(var.Value.GetType() == typeof(LSL_Types.LSLString)) | ||||
|                         { | ||||
|                             m_Fields[var.Key].SetValue(this, (object)((LSL_Types.key)var.Value.ToString())); | ||||
|                         } | ||||
|                         else | ||||
|                             m_Fields[var.Key].SetValue(this, var.Value); | ||||
|                     } | ||||
|                     else if (m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLInteger) || | ||||
|                             m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLString) || | ||||
|                             m_Fields[var.Key].FieldType == typeof(LSL_Types.LSLFloat) || | ||||
|  |  | |||
|  | @ -957,6 +957,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
|             { | ||||
|                 c.Value = "new LSL_Types.LSLString(\""+c.Value+"\")"; | ||||
|             } | ||||
|             else if ("LSL_Types.key" == c.Type) | ||||
|             { | ||||
|                 c.Value = "new LSL_Types.key(\""+c.Value+"\")"; | ||||
|             } | ||||
| 
 | ||||
|             Generate(c.Value, c, sb); | ||||
|         } | ||||
|  |  | |||
|  | @ -54,8 +54,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
|                 m_datatypeLSL2OpenSim = new Dictionary<string, string>(); | ||||
|                 m_datatypeLSL2OpenSim.Add("integer", "LSL_Types.LSLInteger"); | ||||
|                 m_datatypeLSL2OpenSim.Add("float", "LSL_Types.LSLFloat"); | ||||
|                 //m_datatypeLSL2OpenSim.Add("key", "LSL_Types.key"); // key doesn't seem to be used | ||||
|                 m_datatypeLSL2OpenSim.Add("key", "LSL_Types.LSLString"); | ||||
|                 m_datatypeLSL2OpenSim.Add("key", "LSL_Types.key"); // key doesn't seem to be used | ||||
|                 m_datatypeLSL2OpenSim.Add("string", "LSL_Types.LSLString"); | ||||
|                 m_datatypeLSL2OpenSim.Add("vector", "LSL_Types.Vector3"); | ||||
|                 m_datatypeLSL2OpenSim.Add("rotation", "LSL_Types.Quaternion"); | ||||
|  | @ -174,8 +173,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
|             case "float": | ||||
|                 return new Constant(p, constantType, "0.0"); | ||||
|             case "string": | ||||
|             case "key": | ||||
|                 return new Constant(p, constantType, ""); | ||||
|             case "key": | ||||
|                 return new Constant(p, "key", ""); | ||||
|             case "list": | ||||
|                 ArgumentList al = new ArgumentList(p); | ||||
|                 return new ListConstant(p, al); | ||||
|  |  | |||
|  | @ -419,7 +419,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
|                 if (m_stateSource == StateSource.AttachedRez) | ||||
|                 { | ||||
|                     PostEvent(new EventParams("attach", | ||||
|                         new object[] { new LSL_Types.LSLString(m_AttachedAvatar.ToString()) }, new DetectParams[0])); | ||||
|                         new object[] { new LSL_Types.key(m_AttachedAvatar) }, new DetectParams[0])); | ||||
|                 } | ||||
|                 else if (m_stateSource == StateSource.RegionStart) | ||||
|                 { | ||||
|  | @ -454,7 +454,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
|                 if (m_stateSource == StateSource.AttachedRez) | ||||
|                 { | ||||
|                     PostEvent(new EventParams("attach", | ||||
|                         new object[] { new LSL_Types.LSLString(m_AttachedAvatar.ToString()) }, new DetectParams[0])); | ||||
|                         new object[] { new LSL_Types.key(m_AttachedAvatar) }, new DetectParams[0])); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  |  | |||
|  | @ -562,7 +562,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|                         else if (o is LSL_Types.LSLString) | ||||
|                             size += ((LSL_Types.LSLString)o).m_string == null ? 0 : ((LSL_Types.LSLString)o).m_string.Length; | ||||
|                         else if (o is LSL_Types.key) | ||||
|                             size += ((LSL_Types.key)o).value.Length; | ||||
|                             size += ((LSL_Types.key)o).m_string.Length; | ||||
|                         else if (o is LSL_Types.Vector3) | ||||
|                             size += 32; | ||||
|                         else if (o is LSL_Types.Quaternion) | ||||
|  | @ -653,7 +653,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|             { | ||||
|                 if (Data[itemIndex] is LSL_Types.key) | ||||
|                 { | ||||
|                     return (LSL_Types.key)Data[itemIndex]; | ||||
|                     return new LSL_Types.LSLString(Data[itemIndex].ToString()); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|  | @ -661,6 +661,18 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             public LSL_Types.key GetLSLKeyItem(int itemIndex) | ||||
|             { | ||||
|                 if (Data[itemIndex] is LSL_Types.key) | ||||
|                 { | ||||
|                     return (LSL_Types.key)Data[itemIndex]; | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     return new LSL_Types.key(Data[itemIndex].ToString()); | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) | ||||
|             { | ||||
|                 if (Data[itemIndex] is LSL_Types.LSLInteger) | ||||
|  | @ -982,12 +994,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|                 } | ||||
| 
 | ||||
|                 int ret = 0; | ||||
| 
 | ||||
|                 if (left is key) | ||||
|                 { | ||||
|                     key l = (key)left; | ||||
|                     key r = (key)right; | ||||
|                     ret = String.CompareOrdinal(l.value, r.value); | ||||
|                     ret = String.CompareOrdinal(l.m_string, r.m_string); | ||||
|                 } | ||||
|                 else if (left is LSLString) | ||||
|                 { | ||||
|  | @ -1416,48 +1427,51 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|         [Serializable] | ||||
|         public struct key | ||||
|         { | ||||
|             public string value; | ||||
|             public string m_string; | ||||
| 
 | ||||
|             #region Constructors | ||||
|             public key(string s) | ||||
|             { | ||||
|                 value = s; | ||||
|                 m_string = s; | ||||
|             } | ||||
| 
 | ||||
|             public key(LSLString s) | ||||
|             { | ||||
|                 m_string = s.m_string; | ||||
|             } | ||||
| 
 | ||||
|             public key(UUID val) | ||||
|             { | ||||
|                 m_string = val.ToString(); | ||||
|             } | ||||
| 
 | ||||
|             public key(key val) | ||||
|             { | ||||
|                 m_string = val.m_string; | ||||
|             } | ||||
| 
 | ||||
|             #endregion | ||||
| 
 | ||||
|             #region Methods | ||||
| 
 | ||||
|             static public bool Parse2Key(string s) | ||||
|             { | ||||
|                 Regex isuuid = new Regex(@"^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$", RegexOptions.Compiled); | ||||
|                 if (isuuid.IsMatch(s)) | ||||
|                 { | ||||
|                     return true; | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             #endregion | ||||
| 
 | ||||
|             #region Operators | ||||
| 
 | ||||
|             static public implicit operator Boolean(key k) | ||||
|             { | ||||
|                 if (k.value.Length == 0) | ||||
|                 { | ||||
|                 if (String.IsNullOrEmpty(k.m_string)) | ||||
|                     return false; | ||||
|                 } | ||||
| 
 | ||||
|                 if (k.value == "00000000-0000-0000-0000-000000000000") | ||||
|                 { | ||||
|                 int len = k.m_string.Length; | ||||
|                 if(len != 36 && len != 32) | ||||
|                     return false; | ||||
|                 } | ||||
| 
 | ||||
|                 if (k.m_string == "00000000-0000-0000-0000-000000000000") | ||||
|                     return false; | ||||
| 
 | ||||
|                 Regex isuuid = new Regex(@"^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$", RegexOptions.Compiled); | ||||
|                 if (isuuid.IsMatch(k.value)) | ||||
|                 if (isuuid.IsMatch(k.m_string)) | ||||
|                 { | ||||
|                     return true; | ||||
|                 } | ||||
|  | @ -1482,23 +1496,43 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|                 return new key(s); | ||||
|             } | ||||
| 
 | ||||
|             static public implicit operator String(key k) | ||||
|             static public implicit operator key(LSLString s) | ||||
|             { | ||||
|                 return k.value; | ||||
|                 return new key(s); | ||||
|             } | ||||
| 
 | ||||
|             static public implicit operator key(UUID id) | ||||
|             { | ||||
|                 return new key(id); | ||||
|             } | ||||
|             // warning some funtions have versions for string and UUID paramenters | ||||
|             // a cast must be used on those | ||||
|             // like GetSceneObjectPart() | ||||
|             static public implicit operator string(key k) | ||||
|             { | ||||
|                 return k.m_string; | ||||
|             } | ||||
| 
 | ||||
|             static public implicit operator LSLString(key k) | ||||
|             { | ||||
|                 return k.value; | ||||
|                 return new LSLString(k.m_string); | ||||
|             } | ||||
| 
 | ||||
|             static public implicit operator UUID(key k) | ||||
|             { | ||||
|                 UUID uuid; | ||||
|                 UUID.TryParse(k, out uuid); | ||||
|                 return uuid; | ||||
|             } | ||||
|             | ||||
|             public static bool operator ==(key k1, key k2) | ||||
|             { | ||||
|                 return k1.value == k2.value; | ||||
|                 return (k1.m_string == k2.m_string); | ||||
|             } | ||||
| 
 | ||||
|             public static bool operator !=(key k1, key k2) | ||||
|             { | ||||
|                 return k1.value != k2.value; | ||||
|                 return (k1.m_string != k2.m_string); | ||||
|             } | ||||
| 
 | ||||
|             #endregion | ||||
|  | @ -1507,17 +1541,17 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
| 
 | ||||
|             public override bool Equals(object o) | ||||
|             { | ||||
|                 return o.ToString() == value; | ||||
|                 return (m_string == o.ToString()); | ||||
|             } | ||||
| 
 | ||||
|             public override int GetHashCode() | ||||
|             { | ||||
|                 return value.GetHashCode(); | ||||
|                 return m_string.GetHashCode(); | ||||
|             } | ||||
| 
 | ||||
|             public override string ToString() | ||||
|             { | ||||
|                 return value; | ||||
|                 return m_string; | ||||
|             } | ||||
| 
 | ||||
|             #endregion | ||||
|  | @ -1560,14 +1594,23 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|             #region Operators | ||||
|             static public implicit operator Boolean(LSLString s) | ||||
|             { | ||||
|                 if (s.m_string.Length == 0) | ||||
|                 { | ||||
|                 if(s.m_string.Length == 0) | ||||
|                     return false; | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                 return true; | ||||
|             } | ||||
| 
 | ||||
|             public static bool operator true(LSLString s) | ||||
|             { | ||||
|                 if(s.m_string.Length == 0) | ||||
|                     return false; | ||||
|                 return true; | ||||
|             } | ||||
| 
 | ||||
|             public static bool operator false(LSLString s) | ||||
|             { | ||||
|                 if(s.m_string.Length == 0) | ||||
|                     return true; | ||||
|                 } | ||||
|                 return false; | ||||
|             } | ||||
| 
 | ||||
|             static public implicit operator String(LSLString s) | ||||
|  | @ -1619,6 +1662,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|             { | ||||
|                 return new LSLString(d); | ||||
|             } | ||||
| 
 | ||||
|              | ||||
|             static public explicit operator LSLString(int i) | ||||
|             { | ||||
|  | @ -1683,7 +1727,6 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|             public int IndexOf(string value) { return m_string.IndexOf(value); } | ||||
|             public int Length { get { return m_string.Length; } } | ||||
| 
 | ||||
| 
 | ||||
|             #endregion | ||||
|         } | ||||
| 
 | ||||
|  | @ -2188,7 +2231,6 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
|                 return value.GetHashCode(); | ||||
|             } | ||||
| 
 | ||||
| 
 | ||||
|             #endregion | ||||
|         } | ||||
|     } | ||||
|  |  | |||
|  | @ -138,7 +138,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
| 
 | ||||
|             string notecardName = "appearanceNc"; | ||||
| 
 | ||||
|             osslApi.osAgentSaveAppearance(new LSL_Types.LSLString(nonOwnerId.ToString()), notecardName); | ||||
|             osslApi.osAgentSaveAppearance(new LSL_Types.key(nonOwnerId.ToString()), notecardName); | ||||
| 
 | ||||
|             IList<TaskInventoryItem> items = part.Inventory.GetInventoryItems(notecardName); | ||||
|             Assert.That(items.Count, Is.EqualTo(1)); | ||||
|  |  | |||
|  | @ -230,7 +230,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
|         { | ||||
|             myScriptEngine.PostObjectEvent(localID, new EventParams( | ||||
|                     "money", new object[] { | ||||
|                     new LSL_Types.LSLString(agentID.ToString()), | ||||
|                     new LSL_Types.key(agentID), | ||||
|                     new LSL_Types.LSLInteger(amount) }, | ||||
|                     new DetectParams[0])); | ||||
|         } | ||||
|  | @ -349,7 +349,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
|         { | ||||
|             myScriptEngine.PostScriptEvent(itemID, new EventParams( | ||||
|                     "control",new object[] { | ||||
|                     new LSL_Types.LSLString(agentID.ToString()), | ||||
|                     new LSL_Types.key(agentID), | ||||
|                     new LSL_Types.LSLInteger(held), | ||||
|                     new LSL_Types.LSLInteger(change)}, | ||||
|                     new DetectParams[0])); | ||||
|  | @ -416,7 +416,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
|             {  | ||||
|                 myScriptEngine.PostObjectEvent(part.LocalId, new EventParams( | ||||
|                     "attach",new object[] { | ||||
|                     new LSL_Types.LSLString(avatar.ToString()) }, | ||||
|                     new LSL_Types.key(avatar) }, | ||||
|                     new DetectParams[0])); | ||||
|             } | ||||
|         } | ||||
|  |  | |||
|  | @ -1781,6 +1781,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
|                     lsl_p[i] = new LSL_Types.Quaternion((Quaternion)p[i]); | ||||
|                 else if (p[i] is float) | ||||
|                     lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); | ||||
|                 else if (p[i] is UUID) | ||||
|                     lsl_p[i] = new LSL_Types.key((UUID)p[i]); | ||||
|                 else | ||||
|                     lsl_p[i] = p[i]; | ||||
|             } | ||||
|  | @ -1807,6 +1809,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
|                     lsl_p[i] = new LSL_Types.Quaternion((Quaternion)p[i]); | ||||
|                 else if (p[i] is float) | ||||
|                     lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); | ||||
|                 else if (p[i] is UUID) | ||||
|                     lsl_p[i] = new LSL_Types.key((UUID)p[i]); | ||||
|                 else | ||||
|                     lsl_p[i] = p[i]; | ||||
|             } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue