From 8bd70716e5e64b399b1d3dab025e6fe971ab9fb3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 23 八月 2018 22:21:21 +0800
Subject: [PATCH] Fix: 2848 【后端】部位掉落保护规则优化;

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
index 97db3c6..aea34b5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
@@ -472,6 +472,10 @@
     if IsMapNeedBossShunt(0):
         GameWorld.SendCommMapServerMsg(ShareDefine.Def_Notify_WorldKey_BossShuntPlayer, PyGameData.g_bossShuntPlayerInfo)
         GameWorld.SendCommMapServerMsg(ShareDefine.Def_Notify_WorldKey_BossShuntDeadLine, PyGameData.g_bossShuntDeadLine)
+    #通知一个参数
+    bossID = IpyGameDataPY.GetFuncCfg('DogzFBRefreshCfg', 2)
+    onlineCnt = __GetBossOnlineHeroCnt(bossID)[0]
+    GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_BossOnlineHeroCnt % bossID, onlineCnt)
     return
 
 
@@ -586,6 +590,8 @@
     
     newNum = newOnlieCnt * 100 + unUpdataCnt
     PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_GameWorldBossOnlineCnt % bossid, newNum)
+    if bossid == IpyGameDataPY.GetFuncCfg('DogzFBRefreshCfg', 2):
+        GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_BossOnlineHeroCnt % bossid, newOnlieCnt)
     GameWorld.DebugLog("设置计算boss刷新时间用的在线人数 Change:bossid=%s, beforeOnlineCnt = %s, newOnlieCnt = %s, unUpdataCnt=%s" % (bossid, beforeOnlineCnt, newOnlieCnt, unUpdataCnt))
     return
 
@@ -1001,3 +1007,33 @@
         NetPackCommon.SendFakePack(curPlayer, packData)
     return
 
+def Sync_DogzNPCRefreshTime(msgList):
+    #同步神兽副本NPC刷新时间
+    playerID, refreshTimeDict = msgList
+    curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID) if playerID else None
+    if playerID and not curPlayer:
+        return
+    if not refreshTimeDict:
+        return
+    packData = ChPyNetSendPack.tagGCDogzNPCRefreshTime()
+    packData.InfoList=[]
+    for npcid, rTime in refreshTimeDict.items():
+        timeInfo = ChPyNetSendPack.tagDogzTimeInfoObj()
+        timeInfo.NPCID = npcid
+        timeInfo.RefreshSecond = rTime
+        packData.InfoList.append(timeInfo)
+    packData.Cnt = len(packData.InfoList)
+    if not playerID:
+        playerManager = GameWorld.GetPlayerManager()
+        for i in xrange(playerManager.GetActivePlayerCount()):
+            curPlayer = playerManager.GetActivePlayerAt(i)
+            if curPlayer == None or not curPlayer.GetInitOK():
+                continue
+            if PlayerControl.GetIsTJG(curPlayer):
+                continue
+            NetPackCommon.SendFakePack(curPlayer, packData)
+    else:
+        if PlayerControl.GetIsTJG(curPlayer):
+            return
+        NetPackCommon.SendFakePack(curPlayer, packData)
+    return
\ No newline at end of file

--
Gitblit v1.8.0