public void ShowPersonCreation(CityInfo selectedCity) { var screen = new PersonSelectionEdit(); screen.SelectedCity = selectedCity; GameFacade.Screens.RemoveCurrent(); GameFacade.Screens.AddScreen(screen); }
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); } }
/// <summary> /// Reconnects to a CityServer. /// </summary> public void Reconnect(ref NetworkClient Client, CityInfo SelectedCity, LoginArgsContainer LoginArgs) { Client.Disconnect(); Client.Connect(LoginArgs); }