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

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

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

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

            uuid      = (string)decoded[0];
            this.guid = Guid.Parse(uuid);
        }
Esempio 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];
        }
        public PlayerDataPacket(byte[] received_data)
        {
            var decoded = Packets.decodeData(schema, received_data);

            sprite = (string)decoded[0];
            uuid   = (string)decoded[1];
            guid   = Guid.Parse(uuid);
        }
Esempio 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);
        }
Esempio 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];
        }
Esempio 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];
        }
Esempio 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];
        }
Esempio 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;
        }
Esempio 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];
        }
Esempio 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>());
        }
Esempio 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];
        }
Esempio 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];
        }
Esempio 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());
             * }*/
        }
Esempio n. 17
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { uuid, item, index });

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

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

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

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

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

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

            return(output);
        }
Esempio 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);
        }
Esempio n. 25
0
        public override byte[] encode()
        {
            var output = Packets.encodeData(schema, new object[] { (uint)world.height, (uint)world.width, world, world });

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

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

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

            return(output);
        }