From 8debc2ea91c321eb92df47bb685fc9510ccc95bf Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 14 一月 2026 17:28:32 +0800
Subject: [PATCH] 302 【公会】BOSS讨伐-服务端(布阵不受最大层数限制,最大层数仅对实际效果层数有效;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 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 e31417f..4900629 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py
@@ -145,11 +145,13 @@
     if unlockWay == UnlockWay_Item:
         needItemID = unlockValue
         needItemCnt = unlockNeedCnt
-        itemCount = ItemControler.GetItemCountByID(curPlayer, needItemID)
-        if itemCount < needItemCnt:
-            GameWorld.DebugLog("激活红颜物品不足! beautyID=%s,needItemID=%s,itemCount=%s < %s" % (beautyID, needItemID, itemCount, needItemCnt), playerID)
+        
+        costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, needItemID, needItemCnt)
+        lackCnt = needItemCnt - bindCnt - unBindCnt
+        if lackCnt > 0:
+            GameWorld.DebugLog("激活红颜物品不足! beautyID=%s,needItemID=%s,needItemCnt=%s,lackCnt=%s" % (beautyID, needItemID, needItemCnt, lackCnt), playerID)
             return
-        ItemControler.DelItemCountByID(curPlayer, needItemID, needItemCnt)
+        ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, needItemCnt, "Beauty")
         
     elif unlockWay == UnlockWay_TaskID:
         taskID = unlockValue
@@ -211,6 +213,18 @@
     RefreshBeautyAttr(curPlayer)
     SyncBeautyInfo(curPlayer, [beautyID])
     return
+
+def GetBeautyActCnt(curPlayer):
+    ## 红颜已激活总数
+    actCnt = 0
+    ipyDataMgr = IpyGameDataPY.IPY_Data()
+    for index in range(ipyDataMgr.GetBeautyCount()):
+        ipyData = ipyDataMgr.GetBeautyByIndex(index)
+        beautyID = ipyData.GetBeautyID()
+        if not GetBeautyState(curPlayer, beautyID):
+            continue
+        actCnt += 1
+    return actCnt
 
 #// B2 20 红颜好感度升级 #tagCSBeautyLVUP
 #
@@ -299,7 +313,7 @@
     SyncBeautyInfo(curPlayer, [beautyID])
     
     # 有升级额外处理
-    if updLV > updLV:
+    if updLV > curLV:
         RefreshBeautyAttr(curPlayer)
         
     return
@@ -520,7 +534,9 @@
         effPerLVAdd = ipyData.GetEffPerLVAdd()
         if effType:
             effValue = effValue + effPerLVAdd * talentLV
-            effTypeDict[effType] = [effValue, effTypeValue]
+            if effType not in effTypeDict:
+                effTypeDict[effType] = [0, effTypeValue]
+            effTypeDict[effType][0] = effTypeDict[effType][0] + effValue
             #GameWorld.DebugLog("红颜特殊效果: beautyID=%s,effType=%s,talentLV=%s,%s" % (beautyID, effType, talentLV, effTypeDict), playerID)
             
         # 时装

--
Gitblit v1.8.0