public static GameMapMovementRequestMessage deserialize(Utils.Objects.Packet sender)
 {
     List<int> path = new List<int>();
     int nCells = sender.ReadShort();
     for (int i = 0; i < nCells; ++i)
         path.Add(sender.ReadCell());
     return new GameMapMovementRequestMessage(path, sender.ReadInt());
 }
        public static CharacterCreationRequestMessage deserialize(Utils.Objects.Packet packet)
        {
            string name = packet.ReadUTF();
            Breed breed = (Breed)packet.ReadByte();
            Gender gender = (Gender)packet.ReadByte();

            int[] colors = new int[6];
            for (int i = 0; i < 6; ++i)
                colors[i] = packet.ReadInt();

            return new CharacterCreationRequestMessage
                (new object[]{
                    name, breed, gender, colors
                });
        }
        public static CharacterCreationRequestMessage deserialize(Utils.Objects.Packet packet)
        {
            string name = packet.ReadUTF();
            Classe classe = (Classe)packet.ReadByte();
            Sexe sexe = (Sexe)packet.ReadByte();

            int[] colors = new int[6];
            for (int i = 0; i < 6; ++i)
                colors[i] = packet.ReadInt();

            return new CharacterCreationRequestMessage
                (
                    new Global.Character
                        (
                            name, classe, sexe, colors
                        )
                );
        }
 public static CharacterDeletionRequestMessage deserialize(Utils.Objects.Packet sender)
 {
     return new CharacterDeletionRequestMessage(sender.ReadInt(), sender.ReadUTF());
 }
Beispiel #5
0
 public static BasicTimeMessage deserialize(Utils.Objects.Packet sender)
 {
     sender.ReadInt(); // timestamp
     sender.ReadShort(); // timezoneOffset
     return new BasicTimeMessage();
 }
Beispiel #6
0
 public static ChangeMapMessage deserialize(Utils.Objects.Packet sender)
 {
     return new ChangeMapMessage(sender.ReadInt());
 }
 public static PartyKickRequestMessage deserialize(Utils.Objects.Packet sender)
 {
     return new PartyKickRequestMessage(sender.ReadInt());
 }
 public static CharacterSelectionMessage deserialize(Utils.Objects.Packet sender)
 {
     return new CharacterSelectionMessage(sender.ReadInt());
 }
 public static PartyAbdicateThroneMessage deserialize(Utils.Objects.Packet sender)
 {
     return new PartyAbdicateThroneMessage(sender.ReadInt());
 }