Ejemplo n.º 1
0
        public PLAYRE_DATA createFromStreamEx(MemoryStream stream)
        {
            PLAYRE_DATA datas = new PLAYRE_DATA();

            datas.playerName = stream.readUnicode();
            datas.playerDBID = stream.readUint64();
            datas.playerGold = stream.readUint32();
            datas.isOnLine   = stream.readUint8();
            datas.entity     = stream.readEntitycall();
            return(datas);
        }
Ejemplo n.º 2
0
        public FRIENDDATA createFromStreamEx(MemoryStream stream)
        {
            FRIENDDATA datas = new FRIENDDATA();

            datas.status       = stream.readUint8();
            datas.playerID     = stream.readUint64();
            datas.playerName   = stream.readUnicode();
            datas.playerBean   = stream.readInt32();
            datas.playerEntity = stream.readEntitycall();
            return(datas);
        }
Ejemplo n.º 3
0
        public ENTITYCALL_LIST createFromStreamEx(MemoryStream stream)
        {
            UInt32          size  = stream.readUint32();
            ENTITYCALL_LIST datas = new ENTITYCALL_LIST();

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

            return(datas);
        }
Ejemplo n.º 4
0
        public PlayerList createFromStreamEx(MemoryStream stream)
        {
            UInt32     size  = stream.readUint32();
            PlayerList datas = new PlayerList();

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

            return(datas);
        }
Ejemplo n.º 5
0
        public override void onRemoteMethodCall(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];

            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 36:
                byte[] enterRoom_arg1 = stream.readEntitycall();
                Int32  enterRoom_arg2 = stream.readInt32();
                enterRoom(enterRoom_arg1, enterRoom_arg2);
                break;

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

            UInt16 methodUtype            = 0;
            UInt16 componentPropertyUType = 0;

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

            if (sm.useMethodDescrAlias)
            {
                methodUtype = stream.readUint8();
            }
            else
            {
                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 12:
                byte[] playerAlive_arg1 = stream.readEntitycall();
                playerAlive(playerAlive_arg1);
                break;

            case 11:
                byte[] playerDead_arg1 = stream.readEntitycall();
                playerDead(playerDead_arg1);
                break;

            case 13:
                playerGameOver();
                break;

            default:
                break;
            }
            ;
        }