From 531ef1778441b79979e3d5c9367a53f407a0c604 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 27 八月 2018 19:13:35 +0800
Subject: [PATCH] fix:#1721 【BUG】娲皇遗迹,未获得奖励时,副本时间到,扣了次数

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py |   43 +++++++++++++++++++++++++------------------
 1 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 1071626..61338f5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -105,6 +105,7 @@
 import PlayerXMZZ
 import PlayerTeam
 import PyGameData
+import ChPlayer
 #---------------------------------------------------------------------
 
 #---------------------------------------------------------------------
@@ -161,7 +162,8 @@
     # GameDataRecord.OnDayResetRecord()
     # 仙盟红包
     PlayerFamilyRedPacket.DoOnDay()
-    
+    # 玩家等级记录更新
+    ChPlayer.UpdataPlayerLVInfo()
     # 通知开服天数
     #openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay)
     #GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_ServerDay, openServerDay)
@@ -561,7 +563,7 @@
         return
     
     # 全服在线人数平台明细
-    #platformOLDict = {} # 平台在线人数 {平台:人数, ...}
+    platformOLDict = {} # 平台在线人数 {平台:人数, ...}
     #mapPlatformOLDict = {} # 地图平台在线人数 {mapID:{平台:人数, ...}, ...}
     tjgOnlineCnt = 0 # 脱机挂在线玩家
     playerManager = GameWorld.GetPlayerManager()
@@ -575,8 +577,8 @@
             tjgOnlineCnt += 1
             continue
         
-        #platform = GameWorld.GetPlayerPlatform(player.GetAccID())
-        #platformOLDict[platform] = platformOLDict.get(platform, 0) + 1 # 累计平台在线人数
+        platform = GameWorld.GetPlayerPlatform(player.GetAccID())
+        platformOLDict[platform] = platformOLDict.get(platform, 0) + 1 # 累计平台在线人数
         
 #        mapID = player.GetMapID()
 #        mapOLDict = mapPlatformOLDict.get(mapID, {})
@@ -590,15 +592,15 @@
     #activePlayerCount = GameWorld.GetPlayerManager().GetActivePlayerCount()
     #DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, platformOLDict, tjgOnlineCnt)
     #===========================================================================
-    # for platform, playerCnt in platformOLDict.items():
-    #    concurrency = EventReport.concurrency()
-    #    concurrency.SetEventAgentInfo(platform)
-    #    concurrency.concurrency = playerCnt
-    #    EventReport.WriteEvent(concurrency)
+    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)
+    DataRecordPack.DR_OnLinePlayerCount(activePlayerCount, {}, tjgOnlineCnt)    # 总在线
+    #EventReport.WriteEvent_concurrency(activePlayerCount, tjgOnlineCnt)
     #刷新当前地图服务器
     #===========================================================================
     # custom_concurrencyMapList = ReadChConfig.GetEvalChConfig("EventReportMapID")
@@ -1231,17 +1233,21 @@
     __DoMixServerInit()
     #仙魔之争
     PlayerXMZZ.OnGameServerInitOK()
+    #加载活跃玩家等级信息
+    ChPlayer.LoadPlayerLVData()
     #世界boss被杀次数重置
     #GameWorldBoss.CheckResetBossKilledCntOnServerInit()
     #GameWorldActionTeHui.OnGameServerInitOK() # 特惠活动初始化
     #子服启动成功告知跨服主服
-    serverGroupID = GameWorld.GetServerGroupID()
-    if GameWorld.IsMergeOpen() and not GameWorld.IsMergeServer():
-        GameWorld.Log("通知跨服主服务器启动成功, 可接收最新跨服活动状态及数据...")
-        dataMsg = {"Platform":GameWorld.GetPlatform(), "ServerID":GameWorld.GetServerSID(), "ServerGroupID":serverGroupID}
-        MergeChildMsg.SendMergerChildToCenterStringData(ChConfig.Def_ClientServerInitOK, dataMsg)
-        
-    GameWorld.Log("服务器启动成功: ServerGroupID=%s" % serverGroupID)
+    #===========================================================================
+    # serverGroupID = GameWorld.GetServerGroupID()
+    # if GameWorld.IsMergeOpen() and not GameWorld.IsMergeServer():
+    #    GameWorld.Log("通知跨服主服务器启动成功, 可接收最新跨服活动状态及数据...")
+    #    dataMsg = {"Platform":GameWorld.GetPlatform(), "ServerID":GameWorld.GetServerSID(), "ServerGroupID":serverGroupID}
+    #    MergeChildMsg.SendMergerChildToCenterStringData(ChConfig.Def_ClientServerInitOK, dataMsg)
+    #    
+    # GameWorld.Log("服务器启动成功: ServerGroupID=%s" % serverGroupID)
+    #===========================================================================
     return
 
 def DoCheckNewServerOpen(tick):
@@ -1864,6 +1870,7 @@
 #  @return None
 def BeforeClose(tick):
     PlayerTeam.OnServerClose(tick)
+    ChPlayer.SavePlayerLVData()
     GameWorld.Log("通知C++关服!")
     GameWorld.GetGameWorld().OnServerClose()
     

--
Gitblit v1.8.0