From 6c413acde628cb24547ccad17e3c6359c86964cc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 10 二月 2026 10:00:38 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(优化成员基础信息变更时同步,除战力同步CD60秒,其他属性CD2秒;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBeauty.py |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 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 03484fb..a280305 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
@@ -410,11 +412,12 @@
     if unlockWay == UnlockWaySkin_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))
+        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))
             return
-        ItemControler.DelItemCountByID(curPlayer, needItemID, needItemCnt)
+        ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, needItemCnt, "Beauty")
         
     else:
         GameWorld.DebugLog("红颜皮肤不需要激活! beautyID=%s,skinID=%s" % (beautyID, skinID))
@@ -467,11 +470,13 @@
     needItemCnt = ipyData.GetUpNeedCnt()
     if not needItemID or not needItemCnt:
         return
-    itemCount = ItemControler.GetItemCountByID(curPlayer, needItemID)
-    if itemCount < needItemCnt:
-        GameWorld.DebugLog("红颜时装升星物品不足! skinID=%s,needItemID=%s,itemCount=%s < %s" % (skinID, needItemID, itemCount, needItemCnt))
+    
+    costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, needItemID, needItemCnt)
+    lackCnt = needItemCnt - bindCnt - unBindCnt
+    if lackCnt > 0:
+        GameWorld.DebugLog("红颜时装升星物品不足! skinID=%s,needItemID=%s,needItemCnt=%s,lackCnt=%s" % (skinID, needItemID, needItemCnt, lackCnt))
         return
-    ItemControler.DelItemCountByID(curPlayer, needItemID, needItemCnt)
+    ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, needItemCnt, "Beauty")
     
     nextStar = curStar + 1
     GameWorld.DebugLog("红颜时装升星! skinID=%s,nextStar=%s" % (skinID, nextStar), playerID)
@@ -598,13 +603,13 @@
         if ipyDataList:
             for ipyData in ipyDataList:
                 skinID = ipyData.GetSkinID()
-                skinInfo = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BeautySkinInfo % skinID)
+                #skinInfo = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BeautySkinInfo % skinID)
                 if skinIDList != None:
                     if skinID not in skinIDList:
                         continue
-                else:
-                    if not skinInfo:
-                        continue
+                #else:
+                #    if not skinInfo:
+                #        continue
                 beautySkin = ChPyNetSendPack.tagSCBeautySkin()
                 beautySkin.SkinID = skinID
                 beautySkin.State = 1 if IsBeautySkinCanUse(curPlayer, beautyID, skinID, ipyData) else 0

--
Gitblit v1.8.0