From a1ea5474ffd2b081668f9a0cef8d069aa78db85d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 12 十二月 2025 20:53:42 +0800
Subject: [PATCH] 389 流向记录(战斗服务器不记录流向)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_ItemCompound.py |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_ItemCompound.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_ItemCompound.py
index 54125ab..ad2c82b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_ItemCompound.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_ItemCompound.py
@@ -110,13 +110,19 @@
         return
     
     itemPack = curPlayer.GetItemManager().GetPack(packType)
+    unfixedItemPack, fixedItemPack = None, None # 目标物品与材料可能在不同背包,区分开
     itemExpireTime = 0
     # 检查不固定消耗道具
     if unfixedItemIDList:
         unfixedItem = GameWorld.GetGameData().GetItemByTypeID(unfixedItemIDList[0])
         if not unfixedItem:
             return
-        unfixedItemCostInfo = __CheckUnfixedItem(curPlayer, compoundID, makeItemData, itemPack, unfixedItemIndexList, 
+        unfixedPackType = ChConfig.GetItemPackType(unfixedItem, IPY_GameWorld.rptItem)
+        unfixedItemPack = curPlayer.GetItemManager().GetPack(unfixedPackType)
+        GameWorld.DebugLog("unfixedPackType=%s" % (unfixedPackType), playerID)
+        if not unfixedItemPack:
+            return
+        unfixedItemCostInfo = __CheckUnfixedItem(curPlayer, compoundID, makeItemData, unfixedItemPack, unfixedItemIndexList, 
                                                  unfixedItemIDList, needUnfixedItemCount)
         if not unfixedItemCostInfo:
             return
@@ -126,7 +132,15 @@
         
     # 检查固定消耗道具
     if fixedItemIDList:
-        fixedItemInfo = __CheckFixedItem(playerID, compoundID, itemPack, fixedItemIndexList, fixedItemIDList, fixedItemCountList, compoundCnt)
+        fixedItem = GameWorld.GetGameData().GetItemByTypeID(fixedItemIDList[0])
+        if not fixedItem:
+            return
+        fixedPackType = ChConfig.GetItemPackType(fixedItem, IPY_GameWorld.rptItem)
+        fixedItemPack = curPlayer.GetItemManager().GetPack(fixedPackType)
+        GameWorld.DebugLog("fixedPackType=%s" % (fixedPackType), playerID)
+        if not fixedItemPack:
+            return
+        fixedItemInfo = __CheckFixedItem(playerID, compoundID, fixedItemPack, fixedItemIndexList, fixedItemIDList, fixedItemCountList, compoundCnt)
         if not fixedItemInfo:
             return
         fixedItemIndexDict, fixedItemNeedCntDict, compoundBindCnt, expireTime = fixedItemInfo
@@ -156,7 +170,7 @@
     # 扣不固定消耗物品
     if unfixedItemIDList:
         bindUnfixedIndexList, unbindUnfixedIndexList = unfixedItemCostList
-        hasBind = ItemCommon.ReduceItem(curPlayer, itemPack, bindUnfixedIndexList + unbindUnfixedIndexList, needUnfixedItemCount, 
+        hasBind = ItemCommon.ReduceItem(curPlayer, unfixedItemPack, bindUnfixedIndexList + unbindUnfixedIndexList, needUnfixedItemCount, 
                                         False, ChConfig.ItemDel_ItemCompound, drDict)
         makeItemBind = True if hasBind else makeItemBind
         
@@ -167,9 +181,9 @@
             bindFixedIndexList, unbindFixedIndexList = fixedItemIndexDict[fixedItemID]
             if delBindCnt:
                 makeItemBind = True
-                ItemCommon.ReduceItem(curPlayer, itemPack, bindFixedIndexList, delBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
+                ItemCommon.ReduceItem(curPlayer, fixedItemPack, bindFixedIndexList, delBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
             if delUnBindCnt:
-                ItemCommon.ReduceItem(curPlayer, itemPack, unbindFixedIndexList, delUnBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
+                ItemCommon.ReduceItem(curPlayer, fixedItemPack, unbindFixedIndexList, delUnBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
     
     # 扣提升概率道具
     if incRateItemCostList:
@@ -476,6 +490,7 @@
         curSingleItem.Clear()
         return
     
+    ItemControler.NotifyGiveAwardInfo(curPlayer, {newItemID:itemCount}, "Compound")
     return userData
 
 #// A3 13 物品拆解 #tagCMItemDecompound

--
Gitblit v1.8.0