Ejemplo n.º 1
0
        void UpdateOfflineCount(int playerOfflineCount)
        {
            if (_playerOfflineCountQueue.Count >= PlayerCountQueueLength)
            {
                _playerOfflineCountQueue.Dequeue();
            }

            PlayerCountInfo info = new PlayerCountInfo();

            info.Count = playerOfflineCount;
            info.Time  = DateTime.Now;
            _playerOfflineCountQueue.Enqueue(info);
        }
Ejemplo n.º 2
0
        void UpdatePlayerCount(int playerCount, ServerGroup thisGroup)
        {
            if (_playerCountQueue.Count >= PlayerCountQueueLength)
            {
                _playerCountQueue.Dequeue();
            }

            if (_server.GameServiceState != GameServer.ServiceState.Stopping)
            {
                _server.GameServiceState = GameServer.ServiceState.Running;
                if (_server.PID <= 0)
                {
                    string[] para = new string[1] {
                        _server.Id.ToString()
                    };
                    _server.DoPlugInAction(SecurityManager.SystemAutomationId, E2gServerPID.PlugInGuid, E2gServerPID.actionKey, para);
                }
            }

            //TODO 调试用
            //playerCount = s_random.Next(2000);

            DateTime now = DateTime.Now;

            PlayerCountInfo info = new PlayerCountInfo();

            info.Count = playerCount;
            info.Time  = now;
            _playerCountQueue.Enqueue(info);

            if (_lastPlayerCountStatisticHour != now.Hour)
            {
                DoPlayerCountStatistic(now);
            }

            _startingForgive = true;
            _lastPing        = now;

            //记录历史最高人数
            if (playerCount > thisGroup.MaxPlayer)
            {
                thisGroup.MaxPlayer = playerCount;
                thisGroup.SetGroupMaxPlays(playerCount);
            }
        }
Ejemplo n.º 3
0
        void UpdateOfflineCount(int playerOfflineCount)
        {
            if (_playerOfflineCountQueue.Count >= PlayerCountQueueLength)
                _playerOfflineCountQueue.Dequeue();

            PlayerCountInfo info = new PlayerCountInfo();
            info.Count = playerOfflineCount;
            info.Time = DateTime.Now;
            _playerOfflineCountQueue.Enqueue(info);
        }
Ejemplo n.º 4
0
		void UpdatePlayerCount(int playerCount,ServerGroup thisGroup)
		{
			if (_playerCountQueue.Count >= PlayerCountQueueLength)
				_playerCountQueue.Dequeue();

			if (_server.GameServiceState != GameServer.ServiceState.Stopping)
			{				
				_server.GameServiceState = GameServer.ServiceState.Running;
                if (_server.PID <= 0)
                {
                    string[] para = new string[1] { _server.Id.ToString() };
                    _server.DoPlugInAction(SecurityManager.SystemAutomationId, E2gServerPID.PlugInGuid, E2gServerPID.actionKey, para);
                }
			}

			//TODO 调试用
			//playerCount = s_random.Next(2000);

			DateTime now = DateTime.Now;

			PlayerCountInfo info = new PlayerCountInfo();
			info.Count = playerCount;
			info.Time = now;
			_playerCountQueue.Enqueue(info);
								
			if (_lastPlayerCountStatisticHour != now.Hour)
			{
				DoPlayerCountStatistic(now);
			}

			_startingForgive = true;
			_lastPing = now;

            //记录历史最高人数
            if (playerCount > thisGroup.MaxPlayer)
            {
                thisGroup.MaxPlayer = playerCount;
                thisGroup.SetGroupMaxPlays(playerCount);
            }
		}