Ejemplo n.º 1
0
        public override void onRemoteMethodCall(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];

            UInt16 methodUtype            = 0;
            UInt16 componentPropertyUType = 0;

            if (sm.useMethodDescrAlias)
            {
                componentPropertyUType = stream.readUint8();
                methodUtype            = stream.readUint8();
            }
            else
            {
                componentPropertyUType = stream.readUint16();
                methodUtype            = stream.readUint16();
            }

            Method method = null;

            if (componentPropertyUType == 0)
            {
                method = sm.idmethods[methodUtype];
            }
            else
            {
                Property pComponentPropertyDescription = sm.idpropertys[componentPropertyUType];
                switch (pComponentPropertyDescription.properUtype)
                {
                default:
                    break;
                }

                return;
            }

            switch (method.methodUtype)
            {
            case 3:
                Byte   onCreateAvatarResult_arg1 = stream.readUint8();
                byte[] onCreateAvatarResult_arg2 = stream.readPython();
                onCreateAvatarResult(onCreateAvatarResult_arg1, onCreateAvatarResult_arg2);
                break;

            case 4:
                Byte onReqAvatar_arg1 = stream.readUint8();
                onReqAvatar(onReqAvatar_arg1);
                break;

            default:
                break;
            }
            ;
        }
        public ENTITY_LIST createFromStreamEx(MemoryStream stream)
        {
            UInt32      size  = stream.readUint32();
            ENTITY_LIST datas = new ENTITY_LIST();

            while (size > 0)
            {
                --size;
                datas.Add(stream.readPython());
            }
            ;

            return(datas);
        }