From 57a7f963e83329c191e135c8102b0614dea6d5b4 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 19 十二月 2018 14:09:36 +0800
Subject: [PATCH] 5368 【后端】【1.4】聚魂功能开发

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

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 91ae3d5..8971a63 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -47,7 +47,7 @@
 import BossHurtMng
 import PlayerSuperMarket
 import GameLogic_FamilyInvade
-#import GameLogic_MunekadoTrial
+import GameLogic_GatherSoul
 import FormulaControl
 import PlayerMagicWeapon
 import PlayerBossReborn
@@ -4184,9 +4184,16 @@
                 ownerType, ownerID = hurtType, hurtID
                 itemCnt = moneyValue if itemID == moneyID else 1
                 isBind = dropIDBindDict.get(itemID, 1)
-                
+            
             curItem = self.__CreateDropItem(curNPC, itemID, itemCnt, isBind)
             if not curItem:
+                continue
+            
+            if mapID == ChConfig.Def_FBMapID_GatherSoul:#聚魂副本特殊处理
+                GameLogic_GatherSoul.KillGatherSoulNPCDropAward(itemID, itemCnt, isBind)
+                dropItemDataStr = ChItem.GetMapDropItemDataStr(curItem)
+                self.SendVirtualItemDrop(ownerPlayer, itemID, resultX, resultY, dropItemDataStr)
+                curItem.Clear()
                 continue
             
             if isDropInItemPack:
@@ -4196,17 +4203,22 @@
                 if ItemControler.DoLogic_PutItemInPack(ownerPlayer, curItem, True, True,
                                                        event=["NPCDrop", False, {"npcID":npcID}]):
                     #通知客户端
-                    vItemDrop = ChPyNetSendPack.tagMCVirtualItemDrop()
-                    vItemDrop.ItemTypeID = itemID
-                    vItemDrop.PosX = resultX
-                    vItemDrop.PosY = resultY
-                    vItemDrop.UserData = dropItemDataStr
-                    vItemDrop.UserDataLen = len(vItemDrop.UserData)
-                    NetPackCommon.SendFakePack(ownerPlayer, vItemDrop)
+                    self.SendVirtualItemDrop(ownerPlayer, itemID, resultX, resultY, dropItemDataStr)
+                    
             else:
                 self.__MapCreateItem(curItem, resultX, resultY, ownerType, ownerID)
         return
     
+    def SendVirtualItemDrop(self, player, itemID, posX, posY, userDataStr):
+        #通知客户端
+        vItemDrop = ChPyNetSendPack.tagMCVirtualItemDrop()
+        vItemDrop.ItemTypeID = itemID
+        vItemDrop.PosX = posX
+        vItemDrop.PosY = posY
+        vItemDrop.UserData = userDataStr
+        vItemDrop.UserDataLen = len(vItemDrop.UserData)
+        NetPackCommon.SendFakePack(player, vItemDrop)
+        return
     #---------------------------------------------------------------------
     ## NPC被杀死逻辑处理
     #  @param self 类实例

--
Gitblit v1.8.0