From b2aa714eafbfd5e7e04ac09d1368231701bbcf71 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 30 八月 2018 14:44:44 +0800
Subject: [PATCH] fix: 3007 超值礼包购买调整

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
index 97db3c6..dd7e024 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
@@ -176,6 +176,10 @@
         __SetIsAlive(bossID, isAlive)
         # 全服广播世界boss变更信息
         Sync_BossInfo(None, [bossID])
+        
+    # 仙盟归属boss的重置
+    if bossID in PyGameData.g_familyOwnerBossInfo:
+        PyGameData.g_familyOwnerBossInfo.pop(bossID)
     return
 
 
@@ -472,6 +476,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 +594,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 +1011,71 @@
         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
+
+def MapServer_FamilyOwnerBossInfo(msgInfo):
+    ## 地图同步仙盟归属boss信息
+    
+    #GameWorld.DebugLog("地图同步仙盟归属boss信息: %s" % msgInfo)
+    if not isinstance(msgInfo, dict):
+        return
+    
+    PyGameData.g_familyOwnerBossInfo.update(msgInfo)
+    return
+
+#// AC 04 查询仙盟抢Boss所有Boss当前进度 #tagCGQueryAllFamilyBossHurt
+#
+#struct    tagCGQueryAllFamilyBossHurt
+#{
+#    tagHead        Head;
+#};
+def OnQueryAllFamilyBossHurt(index, clientData, tick):
+    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+    
+    hurtPack = ChPyNetSendPack.tagGCAllFamilyBossHurtInfoList()
+    hurtPack.NPCHurtInfo = []
+    for npcID, hurtInfo in PyGameData.g_familyOwnerBossInfo.items():
+        curHP, maxHP, firstFamilyID, firstFamilyName = hurtInfo
+        hurtInfo = ChPyNetSendPack.tagGCFamilyBossHurtInfo()
+        hurtInfo.NPCID = npcID
+        hurtInfo.CurHP = curHP%ShareDefine.Def_PerPointValue
+        hurtInfo.CurHPEx = curHP/ShareDefine.Def_PerPointValue
+        hurtInfo.MaxHP = maxHP%ShareDefine.Def_PerPointValue
+        hurtInfo.MaxHPEx = maxHP/ShareDefine.Def_PerPointValue
+        hurtInfo.FamilyID = firstFamilyID
+        hurtInfo.FamilyName = firstFamilyName
+        hurtInfo.NameLen = len(hurtInfo.FamilyName)
+        hurtPack.NPCHurtInfo.append(hurtInfo)
+    hurtPack.NPCCount = len(hurtPack.NPCHurtInfo)
+    NetPackCommon.SendFakePack(curPlayer, hurtPack)
+    return
+

--
Gitblit v1.8.0