public static void OnCityInfoResponse(PacketStream Packet) { byte Opcode = (byte)Packet.ReadByte(); byte Length = (byte)Packet.ReadByte(); byte DecryptedLength = (byte)Packet.ReadByte(); Packet.DecryptPacket(PlayerAccount.EncKey, new DESCryptoServiceProvider(), DecryptedLength); byte NumCities = (byte)Packet.ReadByte(); for (int i = 0; i < NumCities; i++) { string Name = Packet.ReadString(); string Description = Packet.ReadString(); string IP = Packet.ReadString(); int Port = Packet.ReadInt32(); CityInfoStatus Status = (CityInfoStatus)Packet.ReadByte(); ulong Thumbnail = Packet.ReadUInt64(); string UUID = Packet.ReadString(); CityInfo Info = new CityInfo(Name, Description, Thumbnail, UUID, 0, IP, Port); NetworkFacade.Cities.Add(Info); } }
public static void OnCityInfoResponse(PacketStream Packet) { byte Opcode = (byte)Packet.ReadByte(); byte Length = (byte)Packet.ReadByte(); byte DecryptedLength = (byte)Packet.ReadByte(); Packet.DecryptPacket(PlayerAccount.EncKey, new DESCryptoServiceProvider(), DecryptedLength); byte NumCities = (byte)Packet.ReadByte(); for (int i = 0; i < NumCities; i++) { string Name = Packet.ReadString(); string Description = Packet.ReadString(); string IP = Packet.ReadString(); int Port = Packet.ReadInt32(); CityInfoStatus Status = (CityInfoStatus)Packet.ReadByte(); ulong Thumbnail = Packet.ReadUInt64(); string UUID = Packet.ReadString(); CityInfo Info = new CityInfo(Name, Description, Thumbnail, UUID, 0, IP, Port); NetworkFacade.Cities.Add(Info); } }