| | |
| | |
|
| | | def GameWorldProcessOnMinute(curMinute, tick):
|
| | | # 每整分钟触发一次
|
| | | CheckServerHasPlayerLoginAfterInitOK()
|
| | | #检查服务器正式开服
|
| | | DoCheckNewServerOpen(tick)
|
| | | #回报数据库当前在线玩家数
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def CheckServerHasPlayerLoginAfterInitOK():
|
| | | ## 检查服务器启动成功后是否有玩家正常登录
|
| | | initGameWorldTime = GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_IsGameWorldInit)
|
| | | if not initGameWorldTime:
|
| | | return
|
| | | |
| | | if PyGameData.g_noPlayerLoginWarningMailState:
|
| | | return
|
| | | |
| | | curTime = int(time.time())
|
| | | noPlayerLoginWarningTimes = IpyGameDataPY.GetFuncCfg("ServerEvent", 1) * 60 # x分钟没有玩家登录则预警
|
| | | if curTime - initGameWorldTime < noPlayerLoginWarningTimes:
|
| | | return
|
| | | |
| | | GameWorld.SendGameError("NoPlayerLogin")
|
| | | PyGameData.g_noPlayerLoginWarningMailState = 1
|
| | | return
|
| | |
|
| | | def OnReloadConfig():
|
| | | return
|
| | |
|