From e8b853ab499900513f5bdbb693d53815414e5d8a Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 23 五月 2019 17:56:17 +0800
Subject: [PATCH] 6779 【后端】【2.0】BOSS之家多图合一 批

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py                          |    5 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py                                     |    3 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py                                   |    8 ++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py     |   14 ++----
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py                                         |    6 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_HorsePetBoss.py |   17 +++-----
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py               |   24 ++++++------
 7 files changed, 35 insertions(+), 42 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
index cff77fa..35abe2d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
@@ -550,7 +550,7 @@
     # playerName, mapID, npcID, itemID, userData
     if len(msgList) != 8:
         return
-    playerID, killerName, mapID, npcID, itemID, userData, weightValue, serverGroupID = msgList
+    playerID, killerName, mapID, lineID, npcID, itemID, userData, weightValue, serverGroupID = msgList
     GameWorld.DebugLog("击杀Boss掉落好物品: mapID=%s,npcID=%s,killerName=%s,itemID=%s, userData=%s, weightValue=%s, serverGroupID=%s" 
                        % (mapID, npcID, killerName, itemID, userData, weightValue, serverGroupID))
     maxRecordCnt = IpyGameDataPY.GetFuncCfg('DropRecordNum')
@@ -596,9 +596,9 @@
                 recordList.Delete(commonList[0][0])
         
     PlayerUniversalGameRec.MapServer_UniversalGameRec(None, recType, [mapID, npcID, itemID, playerID, weightValue],
-                                                      [killerName, "", userData])
+                                                      [killerName, lineID, userData])
     
-    msgList = [killerName, playerID, mapID, npcID, itemID, userData]
+    msgList = [killerName, playerID, mapID, lineID, npcID, itemID, userData]
     PlayerControl.WorldNotify(0, 'DropRecord' , msgList)
     return
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
index 876a00b..2146b43 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -525,9 +525,8 @@
     gameMap = GameWorld.GetMap()
     gameMapID = gameMap.GetMapID()
     
-    #如果已经设置过副本功能线路属性,则进入时同步玩家,一般下线重登或者非第一个进入该副本的玩家(如队友)会收到该包
-    if FBCommon.GetHadSetFBPropertyMark() and gameMap.GetMapFBType() != IPY_GameWorld.fbtSingle:
-        PlayerControl.SetFBFuncLineID(curPlayer, FBCommon.GetFBPropertyMark())
+    reqFuncLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
+    PlayerControl.SetFBFuncLineID(curPlayer, reqFuncLineID)
         
     #成长NPC所需数据初始化
     InitFBNPCStrengthenData(curPlayer, gameMap)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index cf6a9b8..1116739 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -446,18 +446,18 @@
 #  @return
 def SetFBPropertyMark(propertyMark, setPlayer=None):
     GameWorld.GetGameFB().SetGameFBDict(ChConfig.Map_FBDict_PropertyMark, propertyMark + 1) # 存储时+1才能判断是否存储过
-    if setPlayer != None:
-        PlayerControl.SetFBFuncLineID(setPlayer, propertyMark)
-        GameWorld.DebugLog("SetFBPropertyMark 设置玩家副本功能线路ID: %s" % propertyMark, setPlayer.GetPlayerID())
-        return
-    
-    playerManager = GameWorld.GetMapCopyPlayerManager()
-    for index in xrange(playerManager.GetPlayerCount()):
-        curPlayer = playerManager.GetPlayerByIndex(index)
-        if not curPlayer.GetPlayerID():
-            continue
-        PlayerControl.SetFBFuncLineID(curPlayer, propertyMark)
-        GameWorld.DebugLog("SetFBPropertyMark 广播玩家副本功能线路ID: %s" % propertyMark, curPlayer.GetPlayerID())
+#    if setPlayer != None:
+#        PlayerControl.SetFBFuncLineID(setPlayer, propertyMark)
+#        GameWorld.DebugLog("SetFBPropertyMark 设置玩家副本功能线路ID: %s" % propertyMark, setPlayer.GetPlayerID())
+#        return
+#    
+#    playerManager = GameWorld.GetMapCopyPlayerManager()
+#    for index in xrange(playerManager.GetPlayerCount()):
+#        curPlayer = playerManager.GetPlayerByIndex(index)
+#        if not curPlayer.GetPlayerID():
+#            continue
+#        PlayerControl.SetFBFuncLineID(curPlayer, propertyMark)
+#        GameWorld.DebugLog("SetFBPropertyMark 广播玩家副本功能线路ID: %s" % propertyMark, curPlayer.GetPlayerID())
     return
 
 ## 是否已经扣除入场券/进入次数等
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py
index c07e615..b2353fc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py
@@ -75,7 +75,6 @@
 def OnChangeMapAsk(ask, tick):
     return IPY_GameWorld.cmeAccept
 
-
 ## 进副本
 #  @param curPlayer
 #  @param tick
@@ -85,17 +84,14 @@
     if curPlayer.GetHP() == 0:
         PlayerControl.PlayerLeaveFB(curPlayer)
         return
-    # 设置副本公共属性的单独处理,防止队员进入后被修改
-    if not FBCommon.GetHadSetFBPropertyMark():
-        lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
-        FBCommon.SetFBPropertyMark(lineID)
-        
-    GameWorld.DebugLog("DoEnterFB...lineID=%s" % FBCommon.GetFBPropertyMark(), playerID)
+
+    lineID = PlayerControl.GetFBFuncLineID(curPlayer) 
+    GameWorld.DebugLog("DoEnterFB...lineID=%s" % lineID, playerID)
     hadDelTicket = FBCommon.GetHadDelTicket(curPlayer)
     if not hadDelTicket:
+        GameWorld.DebugLog('扣门票!')
         FBCommon.SetHadDelTicket(curPlayer)
         canEnterLine = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_BossHome)
-        lineID = FBCommon.GetFBPropertyMark()
         if lineID+1 > canEnterLine:
             costGold = __GetEnterCostMoney(lineID)
             costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, ShareDefine.TYPE_Price_Gold_Paper_Money, costGold)
@@ -176,7 +172,7 @@
 # @remarks 玩家主动离开副本.
 def DoPlayerDead(curPlayer):
     FBCommon.Notify_FB_Over(curPlayer, {FBCommon.Over_isPass:0})
-    lineID = FBCommon.GetFBPropertyMark()
+    lineID = PlayerControl.GetFBFuncLineID(curPlayer) 
     leaveTime = int(FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_BossHome, lineID))
     curPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTime*1000, True)
     return
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_HorsePetBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_HorsePetBoss.py
index 976c16d..8208c7a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_HorsePetBoss.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_HorsePetBoss.py
@@ -105,7 +105,7 @@
     if not state:
         if GameWorld.GetGameFB().GetFBStep() == FB_Step_Fighting:
             GameWorld.GetGameFB().SetGameFBDict(FBDict_IsOver, tick)
-            __DoLogicHorsePetBossOver(0, tick, 0, 0)
+            __DoLogicHorsePetBossOver(0, tick)
     return
 
 ## 进副本
@@ -312,7 +312,7 @@
     return playerHurtList
 
 
-def __DoLogicHorsePetBossOver(isPass, tick, dropPosX, dropPosY):
+def __DoLogicHorsePetBossOver(isPass, tick):
     #结算
     FBCommon.SetFBStep(FB_Step_Over, tick)
     
@@ -327,8 +327,8 @@
     if not playerHurtList:
         GameWorld.Log(' __DoLogicHorsePetBossOver, 伤害榜上没有人!!lineID=%s'%lineID)
         return
-  
-    event = ["HorsePetBoss", False, {}]
+    bossID = CurFBLineBOSSID(lineID)
+    #event = ["HorsePetBoss", False, {}]
     batchPlayerIDList, batchAddItemList, batchParamList, batchDetailList = [], [], [], []
     playerManager = GameWorld.GetMapCopyPlayerManager()
     worldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
@@ -348,9 +348,8 @@
             if itemList:
                 overDict[FBCommon.Over_itemInfo] = FBCommon.GetJsonItemList(itemList)
             if giveItemList:
-                NPCCommon.DoVirtualItemDrop(player, giveItemList, dropPosX, dropPosY)
-                
-                ItemControler.GivePlayerItemOrMail(player, giveItemList, 'QCBOSS1', event)
+                NPCCommon.DoGiveItemByVirtualDrop(player, giveItemList, bossID, mailTypeKey='QCBOSS1')
+                #ItemControler.GivePlayerItemOrMail(player, giveItemList, 'QCBOSS1', event)
             player.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
             FBCommon.NotifyFBOver(player, ChConfig.Def_FBMapID_HorsePetBoss, lineID, isPass, overDict)
         elif giveItemList:
@@ -420,13 +419,11 @@
     if curNPC.GetNPCID() != bossID:
         return
 
-    dropPosX, dropPosY = curNPC.GetPosX(), curNPC.GetPosY()
-    
     #结束 设置BOSS死亡
     FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
     GameWorld.DebugLog('结束 设置BOSS死亡 lineID=%s' % lineID)
     
-    __DoLogicHorsePetBossOver(1, tick, dropPosX, dropPosY)
+    __DoLogicHorsePetBossOver(1, tick)
     GameWorld.GetGameFB().SetGameFBDict(FBDict_IsOver, tick)
     return
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
index 61edf87..17dbb15 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -268,7 +268,8 @@
         if dropItemNPCID:
             serverGroupID = PlayerControl.GetPlayerServerGroupID(curPlayer)
             mapID = GameWorld.GetGameWorld().GetMapID()
-            NPCCommon.SendGameServerGoodItemRecord(mapID, dropItemNPCID, curPlayer.GetName(), 
+            lineID = 0 if GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtNull else PlayerControl.GetFBFuncLineID(curPlayer)
+            NPCCommon.SendGameServerGoodItemRecord(mapID, lineID, dropItemNPCID, curPlayer.GetName(), 
                                                    curPlayer.GetPlayerID(), curItemID, equipInfo, serverGroupID)
             
         # 不需要队伍提示
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 2442525..a2400c3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -622,7 +622,7 @@
     ## 给物品并且做假掉落表现,直接先堆叠给物品,再拆开做虚假掉落表现
     
     mapID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneMapID)
-    #lineID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneLineID)
+    lineID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneLineID)
     if not mapID:
         mapID = GameWorld.GetGameWorld().GetMapID()
         
@@ -651,7 +651,7 @@
             
         if npcID:
             serverGroupID = PlayerControl.GetPlayerServerGroupID(curPlayer)
-            SendGameServerGoodItemRecord(mapID, npcID, curPlayer.GetName(), playerID, itemID, equipInfo, serverGroupID)
+            SendGameServerGoodItemRecord(mapID, lineID, npcID, curPlayer.GetName(), playerID, itemID, equipInfo, serverGroupID)
             
         # 散开掉落
         if isDropDisperse:
@@ -6187,7 +6187,7 @@
     NetPackCommon.SendFakePack(curPlayer, npcInfoPack)
     return
 
-def SendGameServerGoodItemRecord(mapID, npcID, playerName, playerID, itemID, equipInfo=[], serverGroupID=0):
+def SendGameServerGoodItemRecord(mapID, lineID, npcID, playerName, playerID, itemID, equipInfo=[], serverGroupID=0):
     # @param equipInfo: [equipPlace, itemClassLV, itemColor, itemQuality, itemUserData]
 #    GameWorld.DebugLog("检查物品是否发送GameServer: mapID=%s, npcID=%s, playerName=%s, itemID=%s" 
 #                       % (mapID, npcID, playerName, itemID))
@@ -6218,7 +6218,7 @@
     if not needRecord:
         return
     
-    dropEquipMsg = str([playerID, playerName, mapID, npcID, itemID, itemUserData, weightValue, serverGroupID])
+    dropEquipMsg = str([playerID, playerName, mapID, lineID, npcID, itemID, itemUserData, weightValue, serverGroupID])
     GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'BossDropGoodItem', dropEquipMsg, len(dropEquipMsg))
     GameWorld.DebugLog("发送GameServer记录拾取掉落好物品: %s" % dropEquipMsg, playerID)
     return

--
Gitblit v1.8.0