void UpdateOfflineCount(int playerOfflineCount) { if (_playerOfflineCountQueue.Count >= PlayerCountQueueLength) { _playerOfflineCountQueue.Dequeue(); } PlayerCountInfo info = new PlayerCountInfo(); info.Count = playerOfflineCount; info.Time = DateTime.Now; _playerOfflineCountQueue.Enqueue(info); }
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); } }
void UpdateOfflineCount(int playerOfflineCount) { if (_playerOfflineCountQueue.Count >= PlayerCountQueueLength) _playerOfflineCountQueue.Dequeue(); PlayerCountInfo info = new PlayerCountInfo(); info.Count = playerOfflineCount; info.Time = DateTime.Now; _playerOfflineCountQueue.Enqueue(info); }
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); } }