Ejemplo n.º 1
0
        public MovePacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            x = (int)decoded[0];
            y = (int)decoded[1];
        }
Ejemplo n.º 2
0
        public LoginResultPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            responseCode = (int)decoded[0];
            userId       = (string)decoded[1];
        }
Ejemplo n.º 3
0
        public PlayerPositionPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            x = (int)decoded[0];
            y = (int)decoded[1];
        }
Ejemplo n.º 4
0
        public CloseDialoguePacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            uuid      = (string)decoded[0];
            this.guid = Guid.Parse(uuid);
        }
Ejemplo n.º 5
0
        public GUIOptionPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            uuid = (string)decoded[0];
            guid = Guid.Parse(uuid);
            data = (string)decoded[1];
        }
Ejemplo n.º 6
0
        public PlayerDataPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            sprite = (string)decoded[0];
            uuid   = (string)decoded[1];
            guid   = Guid.Parse(uuid);
        }
Ejemplo n.º 7
0
        public EntityInteractPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            interactType = (short)decoded[0];
            uuid         = (string)decoded[1];
            guid         = Guid.Parse(uuid);
        }
Ejemplo n.º 8
0
        public WorldPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            height    = (uint)decoded[0];
            width     = (uint)decoded[1];
            worldData = (int [, ])decoded[2];
            bumpData  = (int [, ])decoded[3];
        }
Ejemplo n.º 9
0
        public EntityMovePacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            x      = (int)decoded[0];
            y      = (int)decoded[1];
            facing = (int)decoded[2];
            uuid   = (string)decoded[3];
        }
Ejemplo n.º 10
0
        public AddItemPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            uuid  = (string)decoded[0];
            guid  = Guid.Parse(uuid);
            item  = (Item)decoded[1];
            index = (int)decoded[2];
        }
Ejemplo n.º 11
0
        public InventoryPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);
            var uuid    = (string)decoded[0];
            var guid    = Guid.Parse(uuid);

            inventory      = (Inventory)decoded[1];
            inventory.guid = guid;
        }
Ejemplo n.º 12
0
        public DialoguePacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            text          = (string)decoded[0];
            author        = (string)decoded[1];
            sprite        = (string)decoded[2];
            optionViews   = (List <OptionView>)decoded[3];
            substitutions = (List <Substitution>)decoded[4];
        }
Ejemplo n.º 13
0
        public WorldPacket(byte[] received_data)
        {
            var  decoded = Packets.decodeData(schema, received_data);
            uint height  = (uint)decoded[0];
            uint width   = (uint)decoded[1];

            int[,] worldData = (int [, ])decoded[2];
            int[,] bumpData  = (int [, ])decoded[3];
            world            = new LegendSharp.World(worldData, bumpData, (int)height, (int)width, new Dictionary <LegendSharp.Position, LegendSharp.Position>());
        }
Ejemplo n.º 14
0
        public ChatPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            author = (string)decoded[0];
            msg    = (string)decoded[1];
            userId = (string)decoded[2];
            uuid   = (string)decoded[3];
            x      = (int)decoded[4];
            y      = (int)decoded[5];
        }
Ejemplo n.º 15
0
        public EntityPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            x            = (int)decoded[0];
            y            = (int)decoded[1];
            type         = (ushort)decoded[2];
            facing       = (int)decoded[3];
            interactable = ((int)decoded[4]) == 1;
            sprite       = (string)decoded[5];
            uuid         = (string)decoded[6];
        }
Ejemplo n.º 16
0
        public DialoguePacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            text          = (string)decoded[0];
            author        = (string)decoded[1];
            sprite        = (string)decoded[2];
            optionViews   = (List <OptionView>)decoded[3];
            substitutions = (List <Substitution>)decoded[4];

            /*Godot.GD.Print("TXT '", text, "' -", author, " _", sprite, "_");
             * foreach (OptionView view in optionViews)
             * {
             *  Godot.GD.Print(view.uuid, " - ", view.text);
             * }
             * foreach (Substitution sub in substitutions)
             * {
             *  Godot.GD.Print(sub.ToString());
             * }*/
        }
Ejemplo n.º 17
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { uuid, item, index });

            return(output);
        }
Ejemplo n.º 18
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { interactType, uuid });

            return(output);
        }
Ejemplo n.º 19
0
        public InvalidateCachePacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            uuid = (string)decoded[0];
        }
Ejemplo n.º 20
0
        public ReadyPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            code = (int)decoded[0];
        }
Ejemplo n.º 21
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { responseCode, userId });

            return(output);
        }
Ejemplo n.º 22
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { height, width, worldData, bumpData });

            return(output);
        }
Ejemplo n.º 23
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { x, y });

            return(output);
        }
Ejemplo n.º 24
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { x, y, type, facing, interactable ? 1 : 0, sprite, uuid });

            return(output);
        }
Ejemplo n.º 25
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { (uint)world.height, (uint)world.width, world, world });

            return(output);
        }
Ejemplo n.º 26
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { inventory.guid.ToString("N"), inventory });

            return(output);
        }
Ejemplo n.º 27
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { author, msg, userId, uuid, x, y });

            return(output);
        }
Ejemplo n.º 28
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { text, author, sprite, optionViews, substitutions });

            return(output);
        }