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 | 54 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 44 insertions(+), 10 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py index a73766d..59dfaa4 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py @@ -109,6 +109,8 @@ import ChPlayer import PyDataManager import GameWorldOpenServerCampaign +import CrossBillboard +import CrossChampionship #--------------------------------------------------------------------- #--------------------------------------------------------------------- @@ -144,6 +146,7 @@ GameWorld.Log("GameServer -> OnDay!") #排行榜拷贝昨日榜单 PlayerBillboard.CopyBillboardOnDay() + CrossBillboard.CopyBillboardOnDay() #开服活动,放在排行榜拷贝昨日榜更新后处理 PlayerEventCounter.DoLogic_GameServer_OnDay(tick) # 通知开服天数, 放在地图OnDay之前处理, 不然地图在OnDay时需要用到开服天时会取到昨天的值 @@ -355,9 +358,11 @@ def GameWorldProcessOnMinute(curMinute, tick): # 每整分钟触发一次 + CheckServerHasPlayerLoginAfterInitOK() #检查服务器正式开服 DoCheckNewServerOpen(tick) - + #回报数据库当前在线玩家数 + DisposeGameActivePlayer(tick) #处理游戏世界中的时间事件 DisposeGameWorldEvenByTime(tick) GameWorldActionControl.Dispose_OperationActionState() @@ -365,6 +370,8 @@ GameWorldActionControl.Dispose_FBStateTime() #跨服PK CrossRealmPK.OnMinuteProcess() + #跨服排位 + CrossChampionship.OnMinuteProcess(curMinute) CrossBattlefield.OnMinuteProcess() #处理重开服务器后, 活动继续开启逻辑根据天数 #GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick) @@ -381,6 +388,24 @@ PlayerFamily.UpdFamilyTotalFightPower() PlayerFamilyRedPacket.CheckDelRedpacketData() + 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(): @@ -409,7 +434,7 @@ #处理世界活动 DisposeGameWorldGame(tick) #回报数据库当前在线玩家数 - DisposeGameActivePlayer(tick) + #DisposeGameActivePlayer(tick) #同步地图服务器时间 Dispose_MapServer_Time(tick) #保存玩家数据 @@ -609,15 +634,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") @@ -1261,6 +1289,8 @@ GameWorldArena.OnServerStart() #跨服PK CrossRealmPK.OnGameServerInitOK() + #跨服排位 + CrossChampionship.OnServerStart() #跨服战场 CrossBattlefield.OnServerStart() #红包 @@ -1373,6 +1403,9 @@ ReadChConfig.ReloadConfig() AllMapServerInitOK(tick) + + GameWorld.GetGameWorld().SaveGameServerData() + GameWorld.SendGameError("ClearOpenServerOK") return ## 服务器开服时是星期几 @@ -1972,6 +2005,7 @@ ChPlayer.SavePlayerLVData() PlayerFBHelpBattle.OnServerClose() CrossActionControl.OnServerClose() + CrossChampionship.OnServerClose() CrossBattlefield.OnServerClose() PlayerFamilyRedPacket.OnServerClose() CrossLuckyCloudBuy.OnServerClose() -- Gitblit v1.8.0