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); }
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 GameContextCreateMessage deserialize(Utils.Objects.Packet sender) { return new GameContextCreateMessage( (Enums.GameContextEnum)sender.ReadByte() ); }
public static CharacterDeletionErrorMessage deserialize(Utils.Objects.Packet sender) { return new CharacterDeletionErrorMessage((Network.Enums.CharacterDeletionErrorEnum)sender.ReadByte()); }
public static CharacterCreationResultMessage deserialize(Utils.Objects.Packet sender) { return new CharacterCreationResultMessage((Enums.CharacterCreationResult)sender.ReadByte()); }
public static ChannelEnablingMessage deserialize(Utils.Objects.Packet sender) { return new ChannelEnablingMessage((Channel)sender.ReadByte(), sender.ReadBool()); }
public static IdentificationFailedMessage deserialize(Utils.Objects.Packet sender) { return new IdentificationFailedMessage( (Enums.IdentificationFailureReason)sender.ReadByte() ); }
public static ChatClientMultiMessage deserialize(Utils.Objects.Packet sender) { return new ChatClientMultiMessage(sender.ReadUTF(), (Channel)sender.ReadByte()); }
public static Version deserialize(Utils.Objects.Packet sender) { return new Version(sender.ReadByte(), sender.ReadByte(), sender.ReadByte(), sender.ReadUShort(), sender.ReadByte(), sender.ReadByte()); }