Пример #1
0
 private void UpdateGameSessionFromHeartbeatStatus(GameSession gameSession,
                                                   string filepath, MagFilter.LaunchControl.HeartbeatResponse response)
 {
     gameSession.ProcessStatusFilepath = filepath;
     if (!response.IsValid)
     {
         return;
     }
     gameSession.AccountName   = response.Status.AccountName;
     gameSession.ServerName    = response.Status.ServerName;
     gameSession.CharacterName = response.Status.CharacterName;
     if (gameSession.ProcessId != response.Status.ProcessId)
     {
         int oldpid = gameSession.ProcessId;
         _map.SetGameSessionProcessId(gameSession, response.Status.ProcessId);
     }
     if (gameSession.GameChannel == null)
     {
         CreateGameChannel(response.Status.ProcessId, gameSession);
     }
     gameSession.UptimeSeconds = response.Status.UptimeSeconds;
     if (gameSession.TeamList != response.Status.TeamList)
     {
         gameSession.AssignTeamSetFromString(response.Status.TeamList);
         NotifyGameChange(gameSession, GameChangeType.ChangeTeam);
     }
 }