From 03f617028885a2e8840500bb520f3418d54eb791 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 30 一月 2019 18:09:20 +0800 Subject: [PATCH] 2968 【1.6】本服打boss,中途传送到跨服,未清空本服归属 --- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 28 +++++++++++++--------------- 1 files changed, 13 insertions(+), 15 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py index c0472d1..4a71a97 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py @@ -95,6 +95,7 @@ #import ReloadModule import CrossRealmPK import CrossRealmMsg +import CrossRealmPlayer import PlayerFBHelpBattle import PlayerFamilyRedPacket import IpyGameDataPY @@ -291,7 +292,8 @@ PlayerFamilyParty.FamilyParty_Process(tick) # 帮主弹劾时钟调用 PlayerFamily.OnLeaderImpeachTick(tick) - + #跨服玩家 + CrossRealmPlayer.OnCrossProcess(tick) #跨服PK匹配 CrossRealmPK.OnPKMatchProcess(tick) @@ -355,6 +357,8 @@ PlayerTeam.DoCountdownLeaveTeamLogic(tick) #副本助战 PlayerFBHelpBattle.OnMinuteProcess() + #红包 + PlayerFamilyRedPacket.OnRedPacketMinuteProcess() #每5分钟触发一次仙盟总战力更新 if curMinute % 5 == 0: PlayerFamily.UpdFamilyTotalFightPower() @@ -544,22 +548,16 @@ # 所有服务器人数要回报一次, 每个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 = {} # 平台在线人数 {平台:人数, ...} -- Gitblit v1.8.0