Aurora.ScriptEngine.AuroraDotNetEngine.APIs.LSL_Api.llGetOwnerKey C# (CSharp) Method

llGetOwnerKey() public method

public llGetOwnerKey ( string id ) : Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString
id string
return Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLString
        public LSL_String llGetOwnerKey(string id)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return "";

            UUID key = new UUID();
            if (UUID.TryParse(id, out key))
            {
                try
                {
                    ISceneChildEntity obj = World.GetSceneObjectPart(key);
                    if (obj == null)
                        return id; // the key is for an agent so just return the key
                    return obj.OwnerID.ToString();
                }
                catch (KeyNotFoundException)
                {
                    return id; // The Object/Agent not in the region so just return the key
                }
            }
            return UUID.Zero.ToString();
        }
LSL_Api