From c63ffd10aecb12b2e09dae603cf9a0f824f6482c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 10 十二月 2025 15:46:15 +0800
Subject: [PATCH] 16 卡牌服务端(合成目标物品与材料物品不在同一背包时支持合成;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py |   40 +++++++++++++---------------------------
 1 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py
index 3fe8f91..d1b6242 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py
@@ -239,21 +239,15 @@
     quality = ipyData.GetBeautyQuality()
     curLV, curExp = GetBeautyLVInfo(curPlayer, beautyID)
     
-    isCommItem = True # 是否使用的常规通用物品
     commItemIDList = IpyGameDataPY.GetFuncEvalCfg("BeautyLVUP", 1)
     commExpList = IpyGameDataPY.GetFuncEvalCfg("BeautyLVUP", 2)
     if itemID in commItemIDList:
         index = commItemIDList.index(itemID)
         perExp = commExpList[index] if len(commExpList) > index else 0
     else:
-        isCommItem = False
-        unlockWay = ipyData.GetUnlockWay()
-        unlockValue = ipyData.GetUnlockValue()
-        if unlockWay != UnlockWay_Item:
-            GameWorld.DebugLog("非道具激活的不支持专属信物ID升级! beautyID=%s,unlockWay=%s" % (beautyID, unlockWay), playerID)
-            return
-        if itemID != unlockValue:
-            GameWorld.DebugLog("非该红颜专属信物ID! beautyID=%s,itemID=%s != %s" % (beautyID, itemID, unlockValue), playerID)
+        exclusiveItemID = ipyData.GetExclusiveItemID()
+        if itemID != exclusiveItemID:
+            GameWorld.DebugLog("非该红颜专属信物ID! beautyID=%s,itemID=%s != %s" % (beautyID, itemID, exclusiveItemID), playerID)
             return
         perExp = IpyGameDataPY.GetFuncCfg("BeautyLVUP", 3)
         
@@ -280,24 +274,16 @@
         if costItemCount < 1:
             return
         
-        if isCommItem:
-            costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, itemID, costItemCount)
-            lackCnt = costItemCount - bindCnt - unBindCnt
-            if lackCnt > 0:
-                costItemCount -= lackCnt
-                GameWorld.DebugLog("消耗道具不足,有多少消耗多少! itemID=%s,costItemCount=%s,bindCnt=%s,unBindCnt=%s,lackCnt=%s" 
-                                   % (itemID, costItemCount, bindCnt, unBindCnt, lackCnt))
-            # 扣除消耗
-            if costItemCount > 0:
-                ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, "Beauty")
-        else:
-            itemCount = ItemControler.GetItemCountByID(curPlayer, itemID)
-            if itemCount < costItemCount:
-                costItemCount = itemCount
-                
-            if costItemCount > 0:
-                ItemControler.SetItemCountByID(curPlayer, itemID, itemCount - costItemCount)
-                
+        costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, itemID, costItemCount)
+        lackCnt = costItemCount - bindCnt - unBindCnt
+        if lackCnt > 0:
+            costItemCount -= lackCnt
+            GameWorld.DebugLog("消耗道具不足,有多少消耗多少! itemID=%s,costItemCount=%s,bindCnt=%s,unBindCnt=%s,lackCnt=%s" 
+                               % (itemID, costItemCount, bindCnt, unBindCnt, lackCnt))
+        # 扣除消耗
+        if costItemCount > 0:
+            ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, "Beauty")
+            
     addExp = costItemCount * perExp
     updExp = curExp + addExp
     GameWorld.DebugLog("红颜加经验: beautyID=%s,quality=%s,curLV=%s,curExp=%s,addExp=%s,updExp=%s/%s,itemID=%s,costItemCount=%s,perExp=%s" 

--
Gitblit v1.8.0