From 7fc14311b1a05376ffb63c6ddb8ccbfda6ee0456 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 11 一月 2019 21:59:21 +0800
Subject: [PATCH] 5722 【后端】【1.5】跨服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 b31f8ee..794177d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -94,6 +94,7 @@
 import EventReport
 #import ReloadModule
 import CrossRealmPK
+import CrossRealmMsg
 import PlayerFBHelpBattle
 import PlayerFamilyRedPacket
 import IpyGameDataPY
@@ -543,22 +544,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 = {} # 平台在线人数 {平台:人数, ...}
@@ -1211,7 +1206,8 @@
     if initOpenServerTime <= 0 or openServerWeekday <= 0:
         #记录首次开发时间(现实时间戳)
         PlayerDBGSEvent.SetInitOpenServerTime(initOpenServerTime if initOpenServerTime else int(time.time()))
-
+        
+    CrossRealmMsg.OnGameServerInitOK()
     #初始化家族数量
     GameWorld.GetFamilyManager().SetFamilyUpperLimitCount(ChConfig.Def_Family_MaxCnt)
     #排序元宝交易平台
@@ -1238,6 +1234,8 @@
     ChPlayer.LoadPlayerLVData()
     #加载助战信息
     PlayerFBHelpBattle.OnServerStart()
+    #跨服PK
+    CrossRealmPK.OnGameServerInitOK()
     #世界boss被杀次数重置
     #GameWorldBoss.CheckResetBossKilledCntOnServerInit()
     #GameWorldActionTeHui.OnGameServerInitOK() # 特惠活动初始化

--
Gitblit v1.8.0