From 34cb2d539afd68ebd490f81894769ea494b19dd3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 01 九月 2018 14:13:14 +0800
Subject: [PATCH] Add: 2994 【后端】寻宝抽到的符印也放入寻宝仓库; 增加符印在背包中的排序规则;

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 713981c..8e1857b 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -563,7 +563,7 @@
         return
     
     # 全服在线人数平台明细
-    #platformOLDict = {} # 平台在线人数 {平台:人数, ...}
+    platformOLDict = {} # 平台在线人数 {平台:人数, ...}
     #mapPlatformOLDict = {} # 地图平台在线人数 {mapID:{平台:人数, ...}, ...}
     tjgOnlineCnt = 0 # 脱机挂在线玩家
     playerManager = GameWorld.GetPlayerManager()
@@ -577,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, {})
@@ -592,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")
@@ -1239,13 +1239,15 @@
     #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):
@@ -1660,7 +1662,8 @@
 
 def SendAllMapGlobalDropInfo():
     # 同步所有地图所有全服掉落控制信息
-    globalDropCDDict = IpyGameDataPY.GetFuncEvalCfg("GlobalDropCD") # {物品ID:分钟, ...}
+    globalDropCDDict = IpyGameDataPY.GetFuncEvalCfg("GlobalDropCD", 1) # {物品ID:分钟, ...}
+    globalKilledCountDropDict = IpyGameDataPY.GetFuncEvalCfg("GlobalDropCD", 2) # 全服击杀次数必掉
     globalDropRateDict = IpyGameDataPY.GetFuncEvalCfg("NPCGlobalDropRate") # {物品ID:[[npcID列表], "概率公式"], ...}
     
     for itemID in globalDropCDDict.keys():
@@ -1673,6 +1676,10 @@
         killedCnt = PlayerDBGSEvent.GetDBGSTrig_ByKey(key)
         GameWorld.SendMapServerMsgEx(key, killedCnt)
         
+    for npcID in globalKilledCountDropDict.keys():
+        key = ShareDefine.Def_Notify_WorldKey_NPCKilledCount % npcID
+        killedCnt = PlayerDBGSEvent.GetDBGSTrig_ByKey(key)
+        GameWorld.SendMapServerMsgEx(key, killedCnt)
     return
 
 def UpdGlobalDropCD(msgList):
@@ -1691,6 +1698,14 @@
     GameWorld.SendMapServerMsgEx(key, updKilledCnt)
     return
 
+def UpdGlobalKillCount(msgList):
+    ## 更新全局击杀次数
+    npcID, updKilledCnt = msgList
+    key = ShareDefine.Def_Notify_WorldKey_NPCKilledCount % npcID
+    PlayerDBGSEvent.SetDBGSTrig_ByKey(key, updKilledCnt)
+    GameWorld.SendMapServerMsgEx(key, updKilledCnt)
+    return
+
 #---------------------------------------------------------------------
 #//////////////////////////////////////////////////////////////
 #//01 05 注册副本信息#tagGRegisterFBInfo

--
Gitblit v1.8.0