From e6062b42c1191e9ab95e000a38276634eff0e1f1 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 27 九月 2023 02:57:09 +0800 Subject: [PATCH] 9949 【BT0.1】【主干】天星塔修改(全服奖励修改) --- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py index aa92dea..59dfaa4 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py @@ -358,6 +358,7 @@ def GameWorldProcessOnMinute(curMinute, tick): # 每整分钟触发一次 + CheckServerHasPlayerLoginAfterInitOK() #检查服务器正式开服 DoCheckNewServerOpen(tick) #回报数据库当前在线玩家数 @@ -370,7 +371,7 @@ #跨服PK CrossRealmPK.OnMinuteProcess() #跨服排位 - CrossChampionship.OnMinuteProcess() + CrossChampionship.OnMinuteProcess(curMinute) CrossBattlefield.OnMinuteProcess() #处理重开服务器后, 活动继续开启逻辑根据天数 #GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick) @@ -389,6 +390,24 @@ 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 -- Gitblit v1.8.0