Beispiel #1
0
        public PlayerQueueType CheckQueueState(ServerQueue _this, bool strick)
        {
            var record      = _this.SNRecord;
            var playerCount = QueueManager.PlayerCount[record.Id];
            var max         = record.MaxLiveCount;

            if (max != -1 && playerCount >= max)
            {
                return(PlayerQueueType.Wait);
            }
            return(PlayerQueueType.NoWait);
        }
Beispiel #2
0
 public void UpdataNoWait(ServerQueue _this)
 {
     while (CheckQueueState(_this, false) == PlayerQueueType.NoWait)
     {
         var first = _this.GetFirstWaitPlayer();
         if (first == null)
         {
             return;
         }
         if (first.State == ConnectState.WaitOffLine)
         {
             continue;
         }
         if (first.Player == null)
         {
             continue;
         }
         var dbPlayer = first.Player.DbData;
         first.SendClientQueueSuccess(QueueType.EnterGame, dbPlayer.SelectChar);
         QueueManager.PlayerEnterGameSuccess(dbPlayer.Id);
     }
 }
Beispiel #3
0
 public void Construct(ServerQueue _this, int serverId)
 {
     _this.SNRecord = Table.GetServerName(serverId);
 }