From d76c6ee14097b3fa6d93186358a5d6b8ecb05de2 Mon Sep 17 00:00:00 2001 From: alondria Date: Fri, 21 Mar 2008 18:45:09 +0000 Subject: Implements llKey2Name(). --- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 7903b52..85017373 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2627,7 +2627,18 @@ namespace OpenSim.Region.ScriptEngine.Common public string llKey2Name(string id) { m_host.AddScriptLPS(1); - NotImplemented("llKey2Name"); + LLUUID key = new LLUUID(); + if (LLUUID.TryParse(id,out key)) + { + if (World.m_innerScene.ScenePresences.ContainsKey(key)) + { + return World.m_innerScene.ScenePresences[key].Firstname + " " + World.m_innerScene.ScenePresences[key].Lastname; + } + if (World.GetSceneObjectPart(key) != null) + { + return World.GetSceneObjectPart(key).Name; + } + } return String.Empty; } -- cgit v1.1