Ejemplo n.º 1
0
 public PlayerQueueType CheckQueueState(GameQueue _this, bool strick)
 {
     if (strick && _this.WaitPlayerCount >= StaticParam.WaitPlayerCountMax)
     {
         PlayerLog.WriteLog((int)LogType.Error_PLayerLoginMore, "have");
         return(PlayerQueueType.More);
     }
     if (QueueManager.GamePlayerCount >= StaticParam.GamePlayerCountMax ||
         QueueManager.LandingPlayerCount >= StaticParam.LandingPlayerCountMax ||
         QueueManager.EnterGamePlayerCount >= StaticParam.EnterGamePlayerCountMax)
     {
         PlayerLog.WriteLog((int)LogType.Error_PLayerLoginWait, "have");
         return(PlayerQueueType.Wait);
     }
     return(PlayerQueueType.NoWait);
 }
Ejemplo n.º 2
0
        public void UpdataNoWait(GameQueue _this)
        {
            var index = 0;

            while (CheckQueueState(_this, false) == PlayerQueueType.NoWait)
            {
                var first = _this.GetFirstWaitPlayer();
                if (first == null)
                {
                    return;
                }
                if (first.State == ConnectState.WaitOffLine)
                {
                    continue;
                }
                first.SendClientQueueSuccess(QueueType.Login, 0);
                QueueManager.LandingPlayerList.TryAdd(first.Player.DbData.Id, first);
                index++;
            }
        }