From 6f39d0dbfb8d019f16ad69151189cb4dc1f0af96 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 04 七月 2019 20:43:10 +0800
Subject: [PATCH] 7839 【后端】【主干】仙盟boss两只boss开出配置,分开配置 仙盟boss掉落表现加上橙装假掉落

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py |   17 ++++++++++-------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py                                    |    3 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py                                    |   17 ++++++++++++++++-
 PySysDB/PySysDBPY.h                                                                                                     |    1 +
 4 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 6cd2bb0..fd54c1e 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1799,6 +1799,7 @@
 
 struct tagFamilyBossAward
 {
+	DWORD		_BossID;	//BossID
 	list		WorldLV;	//世界等级
 	list		Rank;	//排名
 	list		Award1;	//奖励 [[独立概率万分率,[物品ID,数量,是否拍品]],..]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py
index 55ba478..865ea0f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py
@@ -387,12 +387,13 @@
             familyID = hurtInfo[0]
             memberIDList = hurtInfo[1][2]
             memberCnt = len(memberIDList)
-            familyAuctionItemList, menberItemList = __GetFamilyBossAward(rank, worldLV)
+            familyAuctionItemList, menberItemList = __GetFamilyBossAward(bossID, rank, worldLV)
             GameWorld.Log('rank=%s,worldLV=%s,familyAuctionItemList=%s,menberItemList=%s,memberCnt=%s' % (rank, worldLV, familyAuctionItemList, menberItemList, memberCnt), familyID)
-            
+            extraVirtualItemList = [] #额外展示假掉落的物品
             overDict = {FBCommon.Over_rank:rank, 'memberCnt':len(memberIDList)}
             if memberCnt >= needMemberCnt and familyAuctionItemList:  #仙盟拍品
                 familyAuctionItemDict[familyID] = [memberIDList, familyAuctionItemList]
+                extraVirtualItemList = familyAuctionItemList
                 overDict['AuctionItem'] = FBCommon.GetJsonItemList(familyAuctionItemList)
             if menberItemList:  #成员奖励
                 overDict[FBCommon.Over_itemInfo] = FBCommon.GetJsonItemList(menberItemList)
@@ -402,7 +403,7 @@
                 member = playerManager.FindPlayerByID(memberID)
                 if member:
                     if menberItemList:
-                        NPCCommon.DoGiveItemByVirtualDrop(member, menberItemList, bossID, dropPosX, dropPosY, mailTypeKey='LeagueBOSS1')
+                        NPCCommon.DoGiveItemByVirtualDrop(member, menberItemList, bossID, dropPosX, dropPosY, False, 'LeagueBOSS1', extraVirtualItemList)
                         #ItemControler.GivePlayerItemOrMail(member, menberItemList, 'LeagueBOSS1', event)
                     member.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
                     FBCommon.NotifyFBOver(member, ChConfig.Def_FBMapID_AllFamilyBoss, lineID, isPass, overDict)
@@ -431,13 +432,15 @@
     return
 
 
-def __GetFamilyBossAward(rank, worldLV):
+def __GetFamilyBossAward(bossID, rank, worldLV):
     familyAuctionItemList, menberItemList = [], []
     awardRateList = []
     awardPieRateDict = {}
-    ipyMgr = IpyGameDataPY.IPY_Data()
-    for i in xrange(ipyMgr.GetFamilyBossAwardCount()):
-        ipyData = ipyMgr.GetFamilyBossAwardByIndex(i)
+    ipyDataList = IpyGameDataPY.GetIpyGameDataList('FamilyBossAward', bossID)
+    if not ipyDataList:
+        return familyAuctionItemList, menberItemList
+    
+    for ipyData in ipyDataList:
         worldLVList = ipyData.GetWorldLV()
         if worldLV < worldLVList[0] or worldLV > worldLVList[1]:
             continue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 1d22f27..0f433a0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1395,6 +1395,7 @@
                         ),
 
                 "FamilyBossAward":(
+                        ("DWORD", "BossID", 1),
                         ("list", "WorldLV", 0),
                         ("list", "Rank", 0),
                         ("list", "Award1", 0),
@@ -4342,12 +4343,14 @@
 class IPY_FamilyBossAward():
     
     def __init__(self):
+        self.BossID = 0
         self.WorldLV = []
         self.Rank = []
         self.Award1 = []
         self.Award2 = {}
         return
         
+    def GetBossID(self): return self.BossID # BossID
     def GetWorldLV(self): return self.WorldLV # 世界等级
     def GetRank(self): return self.Rank # 排名
     def GetAward1(self): return self.Award1 # 奖励 [[独立概率万分率,[物品ID,数量,是否拍品]],..]
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 054ad18..0ad6b8a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -606,7 +606,7 @@
                               dropNPCID=npcID, isOnlySelfSee=isOnlySelfSee)
     return
 
-def DoGiveItemByVirtualDrop(curPlayer, giveItemList, npcID, dropPosX=0, dropPosY=0, isDropDisperse=True, mailTypeKey="ItemNoPickUp"):
+def DoGiveItemByVirtualDrop(curPlayer, giveItemList, npcID, dropPosX=0, dropPosY=0, isDropDisperse=True, mailTypeKey="ItemNoPickUp", extraVirtualItemList=[]):
     ## 给物品并且做假掉落表现,直接先堆叠给物品,再拆开做虚假掉落表现
     
     mapID = PlayerControl.GetCustomMapID(curPlayer)
@@ -640,6 +640,21 @@
             virtualItemDropList.append([itemID, dropItemDataStr])
         
     # 先通知掉落,再给物品,因为前端表现弹框需要这个顺序需求
+    if extraVirtualItemList: #只显示假掉落
+        for itemInfo in extraVirtualItemList:
+            itemID, itemCount, isAuctionItem = itemInfo
+            curItem = ItemControler.GetOutPutItemObj(itemID, itemCount, isAuctionItem, curPlayer=curPlayer)
+            if not curItem:
+                continue
+            dropItemDataStr = ChItem.GetMapDropItemDataStr(curItem)
+            # 散开掉落
+            if isDropDisperse:
+                for _ in xrange(itemCount):
+                    virtualItemDropList.append([itemID, dropItemDataStr])
+            else:
+                virtualItemDropList.append([itemID, dropItemDataStr])
+            curItem.Clear()
+            
     gameMap = GameWorld.GetMap()
     index = 0
     for posX, posY in ChConfig.Def_DropItemAreaMatrix:

--
Gitblit v1.8.0