Contains all the packethandlers in the game that are based on an interaction with the UI. I.E. a packet received because the user clicked on a UINetworkButton that sent a packet.
コード例 #1
0
 /// <summary>
 /// Received a list of available cities from the login server.
 /// </summary>
 public void _OnCityList(NetworkClient Client, ProcessedPacket packet)
 {
     if (OnLoginProgress != null)
     {
         if (OnLoginStatus != null)
         {
             UIPacketHandlers.OnCityInfoResponse(packet);
             OnLoginProgress(new ProgressEvent(EventCodes.PROGRESS_UPDATE)
             {
                 Done = 5, Total = 5
             });
             OnLoginStatus(new LoginEvent(EventCodes.LOGIN_RESULT)
             {
                 Success = true
             });
         }
         else
         {
             //TODO: Error handling...
         }
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #2
0
        public void _OnCityServerOffline(NetworkClient Client, ProcessedPacket Packet)
        {
            UIPacketHandlers.OnCityServerOffline(Client, Packet);

            if (OnCityServerOffline != null)
            {
                OnCityServerOffline();
            }
        }
コード例 #3
0
 /// <summary>
 /// Received token from login server.
 /// </summary>
 public void _OnCityToken(NetworkClient Client, ProcessedPacket Packet)
 {
     if (OnCityToken != null)
     {
         UIPacketHandlers.OnCityToken(Client, Packet);
         OnCityToken(PlayerAccount.CurrentlyActiveSim.ResidingCity);
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #4
0
 public void _OnLoginNotifyCity(NetworkClient Client, ProcessedPacket packet)
 {
     if (OnLoginNotifyCity != null)
     {
         UIPacketHandlers.OnLoginNotifyCity(Client, packet);
         OnLoginNotifyCity();
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #5
0
        public void _OnPlayerJoinedSession(NetworkClient Client, ProcessedPacket Packet)
        {
            LotTileEntry TileEntry = UIPacketHandlers.OnPlayerJoinedSession(Client, Packet);

            if (TileEntry.lotid != 0)
            {
                if (OnPlayerJoined != null)
                {
                    OnPlayerJoined(TileEntry);
                }
            }
        }
コード例 #6
0
 public void _OnCharacterCreationStatus(NetworkClient Client, ProcessedPacket Packet)
 {
     if (OnCharacterCreationStatus != null)
     {
         CharacterCreationStatus CCStatus = UIPacketHandlers.OnCharacterCreationStatus(Client, Packet);
         OnCharacterCreationStatus(CCStatus);
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #7
0
 public void _OnRetireCharacterStatus(NetworkClient Client, ProcessedPacket Packet)
 {
     if (OnCharacterRetirement != null)
     {
         string GUID = UIPacketHandlers.OnCharacterRetirement(Client, Packet);
         OnCharacterRetirement(GUID);
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #8
0
        /// <summary>
        /// Lot purchase was successful, server sent correct amount of money for player's character's account.
        /// </summary>
        public void _OnLotPurchaseSuccessful(NetworkClient Client, ProcessedPacket Packet)
        {
            int Money = UIPacketHandlers.OnLotPurchaseSuccessful(Client, Packet);

            if (OnLotPurchaseSuccessful != null)
            {
                OnLotPurchaseSuccessful(Money);
            }
            else
            {
                //TODO: Error handling...
            }
        }
コード例 #9
0
        /// <summary>
        /// City server sent the cost of a lot.
        /// </summary>
        public void _OnLotCost(NetworkClient Client, ProcessedPacket Packet)
        {
            LotTileEntry Entry = UIPacketHandlers.OnLotCostResponse(Client, Packet);

            if (OnLotCost != null)
            {
                OnLotCost(Entry);
            }
            else
            {
                //TODO: Error handling...
            }
        }
コード例 #10
0
        public void _OnNewCity(NetworkClient Client, ProcessedPacket Packet)
        {
            UIPacketHandlers.OnNewCityServer(Client, Packet);

            if (OnNewCityServer != null)
            {
                OnNewCityServer();
            }
            else
            {
                //TODO: Error handling...
            }
        }
コード例 #11
0
        /// <summary>
        /// Progressing to city server (received from login server).
        /// </summary>
        public void _OnCharacterCreationProgress(NetworkClient Client, ProcessedPacket Packet)
        {
            Log.LogThis("Received OnCharacterCreationProgress!", eloglevel.info);

            if (OnCharacterCreationProgress != null)
            {
                CharacterCreationStatus CCStatus = UIPacketHandlers.OnCharacterCreationProgress(Client, Packet);
                OnCharacterCreationProgress(CCStatus);
            }
            else
            {
                //TODO: Error handling...
            }
        }
コード例 #12
0
        /// <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...
            }
        }
コード例 #13
0
        public void _OnLoginFailureCity(NetworkClient Client, ProcessedPacket Packet)
        {
            Log.LogThis("Received OnLoginFailureCity!", eloglevel.info);

            if (OnLoginFailureCity != null)
            {
                UIPacketHandlers.OnLoginFailResponse(ref NetworkFacade.Client, Packet);
                OnLoginFailureCity();
            }
            else
            {
                //TODO: Error handling...
            }
        }
コード例 #14
0
 public void _OnLoginSuccess(NetworkClient Client, ProcessedPacket packet)
 {
     if (OnLoginProgress != null)
     {
         UIPacketHandlers.OnLoginSuccessResponse(ref NetworkFacade.Client, packet);
         OnLoginProgress(new ProgressEvent(EventCodes.PROGRESS_UPDATE)
         {
             Done = 3, Total = 5
         });
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #15
0
        public void _OnTimeOfDay(NetworkClient Client, ProcessedPacket Packet)
        {
            DateTime CurrentTime = UIPacketHandlers.OnNewTimeOfDay(Client, Packet);

            NetworkFacade.ServerTime = CurrentTime;

            if (OnNewTimeOfDay != null)
            {
                OnNewTimeOfDay(CurrentTime);
            }
            else
            {
                //TODO: Error handling...
            }
        }
コード例 #16
0
 /// <summary>
 /// Received list of characters for account from login server.
 /// </summary>
 public void _OnCharacterList(NetworkClient Client, ProcessedPacket packet)
 {
     if (OnLoginProgress != null)
     {
         OnLoginProgress(new ProgressEvent(EventCodes.PROGRESS_UPDATE)
         {
             Done = 4, Total = 5
         });
         UIPacketHandlers.OnCharacterInfoResponse(packet, NetworkFacade.Client);
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #17
0
 public void _OnInvalidVersion(NetworkClient Client, ProcessedPacket packet)
 {
     if (OnLoginStatus != null)
     {
         UIPacketHandlers.OnInvalidVersionResponse(ref NetworkFacade.Client, packet);
         OnLoginStatus(new LoginEvent(EventCodes.LOGIN_RESULT)
         {
             Success = false, VersionOK = false
         });
     }
     else
     {
         //TODO: Error handling...
     }
 }
コード例 #18
0
        /// <summary>
        /// An attempt to buy a lot failed, usually because player was out of money.
        /// </summary>
        public void _OnLotBuyFailed(NetworkClient Client, ProcessedPacket Packet)
        {
            UIPacketHandlers.OnLotPurchaseFailed(Client, Packet);

            if (OnLotPurchaseFailed != null)
            {
                OnLotPurchaseFailed(new TransactionEvent(EventCodes.TRANSACTION_RESULT)
                {
                    Success = false
                });
            }
            else
            {
                //TODO: Error handling...
            }
        }
コード例 #19
0
 public void _OnPlayerRecvdLetter(NetworkClient Client, ProcessedPacket Packet)
 {
     UIPacketHandlers.OnPlayerReceivedLetter(Client, Packet);
 }
コード例 #20
0
 public void _OnPlayerLeftSession(NetworkClient Client, ProcessedPacket Packet)
 {
     UIPacketHandlers.OnPlayerLeftSession(Client, Packet);
 }