From bbb3873b4776c8480553ca51f0be99b62fd9c6f8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 24 一月 2019 16:15:38 +0800
Subject: [PATCH] 6061 【后端】【1.5.100】掉落表现优化(诛仙boss堆叠物品散开掉落)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py                                  |   18 +++++++++++++++---
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
index 5e00d42..31ae509 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
@@ -416,7 +416,7 @@
         gameFB.SetPlayerGameFBDict(firstPlayerID, FBPlayerDict_Rank, 1)
         if not dropPosX or not dropPosY:
             dropPosX, dropPosY = firstPlayer.GetPosX(), firstPlayer.GetPosY()
-        prizeItemList = GiveZhuXianBossAward(firstPlayer, lineID, dropItemMapInfo=[dropPosX, dropPosY, True])
+        prizeItemList = GiveZhuXianBossAward(firstPlayer, lineID, dropItemMapInfo=[dropPosX, dropPosY, True, True])
         if not prizeItemList:
             # 没有掉落时直接通知结算,防止卡副本
             firstPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
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 f388d6c..a082088 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -508,7 +508,19 @@
         
     ## 直接掉地板上
     if dropItemMapInfo:
-        dropPosX, dropPosY, isOnlySelfSee = dropItemMapInfo
+        dropPosX, dropPosY, isOnlySelfSee = dropItemMapInfo[:3]
+        isDropDisperse = dropItemMapInfo[3] if len(dropItemMapInfo) > 3 else False # 堆叠的物品是否散开掉落
+        if isDropDisperse:
+            dropItemList = []
+            for itemInfo in prizeItemList:
+                if isinstance(itemInfo, list):
+                    itemID, itemCount, isBind = itemInfo
+                    for _ in xrange(itemCount):
+                        dropItemList.append([itemID, 1, isBind])
+                else:
+                    dropItemList.append(itemInfo)
+        else:
+            dropItemList = prizeItemList
         index = 0
         playerID = curPlayer.GetPlayerID()
         gameMap = GameWorld.GetMap()
@@ -520,10 +532,10 @@
                 #玩家不可移动这个点
                 continue
             
-            if index > len(prizeItemList) - 1:
+            if index > len(dropItemList) - 1:
                 break
             
-            curItem = prizeItemList[index]
+            curItem = dropItemList[index]
             index += 1
             if isinstance(curItem, list):
                 itemID, itemCount, isBind = curItem

--
Gitblit v1.8.0