From a0dd1dc92bb2f6eb7067a624df20a9c326ecde87 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 06 二月 2026 22:14:54 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(修改A619,A523封包结构;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 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 65ba483..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
@@ -212,6 +214,18 @@
     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
 #
 #struct    tagCSBeautyLVUP

--
Gitblit v1.8.0