From 549a8b666e258ae45b8e2c2d6cf6ac988f85850e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 02 九月 2025 19:44:57 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(修复报错;寻宝物品权重为0不产出;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
index c068b95..67b8319 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
@@ -25,6 +25,7 @@
 import GameFuncComm
 import ShareDefine
 import ChConfig
+import FBCommon
 
 def GetTaskIDList(taskGroup):
     ## 获取某个任务分组所有任务ID列表
@@ -144,12 +145,12 @@
     if taskType == ChConfig.TaskType_LV:
         taskValue = curPlayer.GetLV()
         
-    elif taskType == ChConfig.TaskType_FBPass:
-        if len(conds) != 2:
+    elif taskType == ChConfig.TaskType_MainLevel:
+        if not conds:
             return 0
-        mapID, lineID = conds
-        passLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBPassLineID % mapID)
-        taskValue = 1 if passLineID >= lineID else 0
+        mapID = ChConfig.Def_FBMapID_Main
+        lineID = conds[0]
+        taskValue = 1 if FBCommon.IsFBPass(curPlayer, mapID, lineID) else 0
         
     elif taskType == ChConfig.TaskType_TreeLV:
         taskValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV)
@@ -157,6 +158,24 @@
     elif taskType == ChConfig.TaskType_RealmLV:
         taskValue = curPlayer.GetOfficialRank()
         
+    elif taskType == ChConfig.TaskType_EquipColor:
+        if not conds:
+            return 0
+        needColor = conds[0]
+        equipCnt = 0
+        equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
+        for equipPlace in ChConfig.Def_MainEquipPlaces:
+            equipIndex = equipPlace - 1
+            if equipIndex < 0 or equipIndex >= equipPack.GetCount():
+                continue
+            curEquip = equipPack.GetAt(equipIndex)
+            if not curEquip or curEquip.IsEmpty():
+                continue
+            itemColor = curEquip.GetItemColor()
+            if itemColor >= needColor:
+                equipCnt += 1
+        taskValue = equipCnt
+        
     return taskValue
 
 def UpdTaskValue(curPlayer, taskType):

--
Gitblit v1.8.0