コード例 #1
0
        public static EnabledChannelsMessage deserialize(Utils.Objects.Packet sender)
        {
            int nEnabled = sender.ReadShort();
            List<Channel> enabled = new List<Channel>();
            for (int i = 0; i < nEnabled; ++i)
                enabled.Add( (Channel)sender.ReadByte() );

            int nDisabled = sender.ReadShort();
            List<Channel> disabled = new List<Channel>();
            for (int i = 0; i < nDisabled; ++i)
                disabled.Add( (Channel)sender.ReadByte() );

            return new EnabledChannelsMessage(enabled, disabled);
        }
コード例 #2
0
        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
                });
        }
コード例 #3
0
        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 GameContextCreateMessage deserialize(Utils.Objects.Packet sender)
 {
     return new GameContextCreateMessage( (Enums.GameContextEnum)sender.ReadByte() );
 }
コード例 #5
0
 public static CharacterDeletionErrorMessage deserialize(Utils.Objects.Packet sender)
 {
     return new CharacterDeletionErrorMessage((Network.Enums.CharacterDeletionErrorEnum)sender.ReadByte());
 }
コード例 #6
0
 public static CharacterCreationResultMessage deserialize(Utils.Objects.Packet sender)
 {
     return new CharacterCreationResultMessage((Enums.CharacterCreationResult)sender.ReadByte());
 }
コード例 #7
0
 public static ChannelEnablingMessage deserialize(Utils.Objects.Packet sender)
 {
     return new ChannelEnablingMessage((Channel)sender.ReadByte(), sender.ReadBool());
 }
コード例 #8
0
 public static IdentificationFailedMessage deserialize(Utils.Objects.Packet sender)
 {
     return new IdentificationFailedMessage( (Enums.IdentificationFailureReason)sender.ReadByte() );
 }
コード例 #9
0
 public static ChatClientMultiMessage deserialize(Utils.Objects.Packet sender)
 {
     return new ChatClientMultiMessage(sender.ReadUTF(), (Channel)sender.ReadByte());
 }
コード例 #10
0
ファイル: Version.cs プロジェクト: Emudofus/Aldos
 public static Version deserialize(Utils.Objects.Packet sender)
 {
     return new Version(sender.ReadByte(), sender.ReadByte(), sender.ReadByte(), sender.ReadUShort(),
                        sender.ReadByte(), sender.ReadByte());
 }