/// <summary> /// Received from the CityServer in response to a CITY_TOKEN packet. /// </summary> public static CityTransferStatus OnCityTokenResponse(NetworkClient Client, ProcessedPacket Packet) { LogThis.Log.LogThis("Received OnCityTokenResponse", LogThis.eloglevel.info); CityTransferStatus Status = (CityTransferStatus)Packet.ReadByte(); ushort NumHouses = Packet.ReadUInt16(); LotTileEntry[] TileEntries = new LotTileEntry[NumHouses]; if (NumHouses > 0) { for (int i = 0; i < NumHouses; i++) { TileEntries[i] = new LotTileEntry(Packet.ReadInt32(), Packet.ReadString(), (short)Packet.ReadUInt16(), (short)Packet.ReadUInt16(), (byte)Packet.ReadByte(), Packet.ReadInt32()); } } PlayerAccount.Money = Packet.ReadInt32(); lock (GameFacade.CDataRetriever.LotTileData) GameFacade.CDataRetriever.LotTileData = TileEntries; return(Status); }
/// <summary> /// Received from the CityServer in response to a CITY_TOKEN packet. /// </summary> public static CityTransferStatus OnCityTokenResponse(NetworkClient Client, ProcessedPacket Packet) { Debug.WriteLine("Received OnCityTokenResponse"); CityTransferStatus Status = (CityTransferStatus)Packet.ReadByte(); return(Status); }
/// <summary> /// Response from city server. /// </summary> public void _OnCityTokenResponse(NetworkClient Client, ProcessedPacket Packet) { Log.LogThis("Received OnCityTokenResponse!", eloglevel.info); if (OnCityTransferProgress != null) { CityTransferStatus Status = UIPacketHandlers.OnCityTokenResponse(Client, Packet); OnCityTransferProgress(Status); } else { //TODO: Error handling... } }
/// <summary> /// Received a status update from the CityServer. /// Occurs after sending the token. /// </summary> /// <param name="e">Status of transfer.</param> private void Controller_OnCityTransfer(CityTransferStatus e) { switch (e) { case CityTransferStatus.Success: if (m_Dead) { return; //don't create multiple please } ProgressEvent Progress = new ProgressEvent(EventCodes.PROGRESS_UPDATE); Progress.Done = 2; Progress.Total = 3; //Commenting out the below line makes the city show up when creating a new Sim... o_O //OnTransitionProgress(Progress); GameFacade.Controller.ShowCity(); m_Dead = true; break; case CityTransferStatus.GeneralError: Controller_OnNetworkError(new SocketException()); break; } }
public void _OnCityTokenResponse(NetworkClient Client, ProcessedPacket packet) { CityTransferStatus Status = UIPacketHandlers.OnCityTokenResponse(Client, packet); OnCityTransferProgress(Status); }
/// <summary> /// Received from the CityServer in response to a CITY_TOKEN packet. /// </summary> public static CityTransferStatus OnCityTokenResponse(NetworkClient Client, ProcessedPacket Packet) { CityTransferStatus Status = (CityTransferStatus)Packet.ReadByte(); return(Status); }
/// <summary> /// Received a status update from the CityServer. /// Occurs after sending the token. /// </summary> /// <param name="e">Status of transfer.</param> private void Controller_OnCityTransfer(CityTransferStatus e) { switch (e) { case CityTransferStatus.Success: if (m_Dead) return; //don't create multiple please ProgressEvent Progress = new ProgressEvent(EventCodes.PROGRESS_UPDATE); Progress.Done = 2; Progress.Total = 3; //Commenting out the below line makes the city show up when creating a new Sim... o_O //OnTransitionProgress(Progress); GameFacade.Controller.ShowCity(); m_Dead = true; break; case CityTransferStatus.GeneralError: Controller_OnNetworkError(new SocketException()); break; } }
/// <summary> /// Received a status update from the CityServer. /// Occurs after sending the token. /// </summary> /// <param name="e">Status of transfer.</param> private void Controller_OnCityTransfer(CityTransferStatus e) { switch (e) { case CityTransferStatus.Success: OnTransitionProgress(new TSOClient.Network.Events.ProgressEvent(EventCodes.PROGRESS_UPDATE)); GameFacade.Controller.ShowCity(); break; case CityTransferStatus.GeneralError: Controller_OnNetworkError(new SocketException()); break; } }
public void _OnCityTokenResponse(CityTransferStatus Status) { OnCityTransfer(Status); }