From d2bf601759fd63bd9d6995a4120ecc3f2af0866c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 01 七月 2022 18:42:50 +0800 Subject: [PATCH] 9626 【后台】增加查看各个服务器的玩家在线情况(在线流向调整为整5分钟记录) --- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py index f219753..1840357 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py @@ -359,7 +359,8 @@ # 每整分钟触发一次 #检查服务器正式开服 DoCheckNewServerOpen(tick) - + #回报数据库当前在线玩家数 + DisposeGameActivePlayer(tick) #处理游戏世界中的时间事件 DisposeGameWorldEvenByTime(tick) GameWorldActionControl.Dispose_OperationActionState() @@ -411,7 +412,7 @@ #处理世界活动 DisposeGameWorldGame(tick) #回报数据库当前在线玩家数 - DisposeGameActivePlayer(tick) + #DisposeGameActivePlayer(tick) #同步地图服务器时间 Dispose_MapServer_Time(tick) #保存玩家数据 @@ -611,15 +612,18 @@ #activePlayerCount = GameWorld.GetPlayerManager().GetActivePlayerCount() #DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, platformOLDict, tjgOnlineCnt) #=========================================================================== - for platform, playerCnt in platformOLDict.items(): - DataRecordPack.DR_OnLinePlayerCount(playerCnt, platform, tjgOnlineCnt) # 单平台 - EventReport.WriteEvent_concurrency(playerCnt, 0, platform) # 单平台 此处不能传脱机挂玩家总数 - - + isMixture = False #是否混服 + if isMixture: + for platform, playerCnt in platformOLDict.items(): + DataRecordPack.DR_OnLinePlayerCount(playerCnt, platform, tjgOnlineCnt) # 单平台 + EventReport.WriteEvent_concurrency(playerCnt, 0, platform) # 单平台 此处不能传脱机挂玩家总数 + DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, {}, tjgOnlineCnt) # 总在线 + #EventReport.WriteEvent_concurrency(activePlayerCount, tjgOnlineCnt) + else: + serverPlatform = GameWorld.GetPlatform() + DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, {}, tjgOnlineCnt) # 总在线 + EventReport.WriteEvent_concurrency(activePlayerCount, tjgOnlineCnt, serverPlatform) #=========================================================================== - - DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, {}, tjgOnlineCnt) # 总在线 - #EventReport.WriteEvent_concurrency(activePlayerCount, tjgOnlineCnt) #刷新当前地图服务器 #=========================================================================== # custom_concurrencyMapList = ReadChConfig.GetEvalChConfig("EventReportMapID") -- Gitblit v1.8.0