From 1ea0e353d47a78209a18f619374da252a0080940 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 19 四月 2024 19:13:43 +0800
Subject: [PATCH] 10054 【后端】任务系统(增加任务类型支持 6~16;优化修改任务值配置时上线进行修正进度值或任务状态;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
index b5d3f56..b6c2bd1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -333,6 +333,35 @@
         
     return
 
+def GetPlayerEquipItemCount(curPlayer, classLV, itemColor, includeHigh=True):
+    ## 获取玩家穿戴的装备数量
+    
+    haveCnt = 0
+    classlVList = [classLV] if classLV else range(1, IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')+1)
+    equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
+    for classLV in classlVList:
+        ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True, False)
+        if not ipyDataList:
+            continue
+        for ipyData in ipyDataList:
+            gridIndex = ipyData.GetGridIndex()
+            curEquip = equipPack.GetAt(gridIndex)
+            if not ItemCommon.CheckItemCanUse(curEquip):
+                continue
+            if itemColor != None:
+                if includeHigh:
+                    if curEquip.GetItemColor() < itemColor:
+                        continue
+                else:
+                    if curEquip.GetItemColor() != itemColor:
+                        continue
+                    
+            # 可扩展套装
+            
+            haveCnt += 1
+            
+    return haveCnt
+
 ## 刷新所有装备对人物属性的改变
 #  @param self 类实例
 #  @return 返回值无意义

--
Gitblit v1.8.0