| | |
| | | # 所有服务器人数要回报一次, 每个map也要回报一次
|
| | | # gameWorld.GetTickByType(0 - n) 取间隔
|
| | | def DisposeGameActivePlayer(tick):
|
| | | # gameWorld = GameWorld.GetGameWorld()
|
| | | # lastTick = gameWorld.GetTickByType(ChConfig.TYPE_GetActivePlayerCount)
|
| | | # |
| | | # if lastTick == -1:
|
| | | # #GameWorld.Log("未初始化服务器")
|
| | | # return
|
| | | # |
| | | # if tick - lastTick < ChConfig.TYPE_Tick_Time[ChConfig.TYPE_GetActivePlayerCount]:
|
| | | # return
|
| | | # |
| | | # |
| | | # gameWorld.SetTickByType(ChConfig.TYPE_GetActivePlayerCount , tick)
|
| | | |
| | | gameWorld = GameWorld.GetGameWorld() |
| | | curMinute = datetime.datetime.today().minute |
| | | #为了每个服的输出时间点统一一个分钟点,便于统计
|
| | | if datetime.datetime.today().minute % 5 != 0:
|
| | | if curMinute % 5 != 0:
|
| | | return
|
| | | noteData = gameWorld.GetDictByKey("OnlineCntM")
|
| | | if noteData == curMinute:
|
| | | # 同一分钟不多发送,此处不建议用CD处理,避免两CD冲突
|
| | | return
|
| | | gameWorld.SetDict("OnlineCntM", curMinute)
|
| | |
|
| | | # 全服在线人数平台明细
|
| | | platformOLDict = {} # 平台在线人数 {平台:人数, ...}
|