OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.osGetLinkPrimitiveParams C# (CSharp) Method

osGetLinkPrimitiveParams() public method

Get the primitive parameters of a linked prim.
Threat level is 'Low' because certain users could possibly be tricked into dropping an unverified script into one of their own objects, which could then gather the physical construction details of the object and transmit it to an unscrupulous third party, thus permitting unauthorized duplication of the object's form.
public osGetLinkPrimitiveParams ( int linknumber, OpenSim.Region.ScriptEngine.Shared.LSL_Types.list rules ) : OpenSim.Region.ScriptEngine.Shared.LSL_Types.list
linknumber int
rules OpenSim.Region.ScriptEngine.Shared.LSL_Types.list
return OpenSim.Region.ScriptEngine.Shared.LSL_Types.list
        public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
        {
            CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams");
            m_host.AddScriptLPS(1);
            InitLSL();
            // One needs to cast m_LSL_Api because we're using functions not
            // on the ILSL_Api interface.
            LSL_Api LSL_Api = (LSL_Api)m_LSL_Api;
            LSL_List retVal = new LSL_List();
            LSL_List remaining = new LSL_List();
            List<SceneObjectPart> parts = LSL_Api.GetLinkParts(linknumber);
            foreach (SceneObjectPart part in parts)
            {
                remaining = LSL_Api.GetPrimParams(part, rules, ref retVal);
            }

            while (remaining.Length > 2)
            {
                linknumber = remaining.GetLSLIntegerItem(0);
                rules = remaining.GetSublist(1, -1);
                parts = LSL_Api.GetLinkParts(linknumber);

                foreach (SceneObjectPart part in parts)
                    remaining = LSL_Api.GetPrimParams(part, rules, ref retVal);
            }
            return retVal;
        }
OSSL_Api