OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.llOverMyLand C# (CSharp) Method

llOverMyLand() public method

public llOverMyLand ( string id ) : OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger
id string
return OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger
        public LSL_Integer llOverMyLand(string id)
        {
            m_host.AddScriptLPS(1);
            UUID key = new UUID();
            if (UUID.TryParse(id, out key))
            {
                ScenePresence presence = World.GetScenePresence(key);
                if (presence != null) // object is an avatar
                {
                    if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID)
                        return 1;
                }
                else // object is not an avatar
                {
                    SceneObjectPart obj = World.GetSceneObjectPart(key);

                    if (obj != null)
                    {
                        if (m_host.OwnerID == World.LandChannel.GetLandObject(obj.AbsolutePosition).LandData.OwnerID)
                            return 1;
                    }
                }
            }

            return 0;
        }
LSL_Api