From 47723b47452eadfaccd2a2813a2c8877a9ebbcf1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 24 十一月 2025 11:58:59 +0800
Subject: [PATCH] 332 【主界面】座骑系统-服务端(默认坐骑外观ID取ID大于0的)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 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 67b8319..5feda41 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
@@ -231,6 +231,16 @@
         if conds[0] != taskConds[0]:
             return
         
+    # 挑战主线关
+    elif taskType == ChConfig.TaskType_MainLevelChallenge:
+        taskConds = ipyData.GetTaskConds()
+        if not conds or len(conds) != len(taskConds):
+            return
+        if conds[0] < taskConds[0]:
+            #GameWorld.DebugLog("挑战小于的不算完成: %s < TaskCond:%s" % (conds[0], taskConds[0]))
+            return
+        #GameWorld.DebugLog("挑战大于等于都算完整: %s >= TaskCond:%s" % (conds[0], taskConds[0]))
+        
     return True
 
 def SetTaskValue(curPlayer, taskIpyData, value=0, isNotify=True):
@@ -306,13 +316,22 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskValue % taskGroup, 0)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskState % taskGroup, 0)
     
-    for itemID, itemCount, isAuctionItem in awardItemList:
-        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
-        
+    # 支持定制属性物品
+    isAuctionItem = 0
+    notifyAwardList = []
+    appointInfo = {}
+    for itemID, itemCount, appointID in awardItemList:
+        setAttrDict = {ShareDefine.Def_CItemKey_AppointID:appointID} if appointID else {}
+        if not ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, event=["Task", False, {}], setAttrDict=setAttrDict):
+            continue
+        notifyAwardList.append([itemID, itemCount, isAuctionItem])
+        appointInfo[itemID] = appointID
+    ItemControler.NotifyGiveAwardInfo(curPlayer, notifyAwardList, "Task", dataEx={"appointInfo":appointInfo})
+    
     if not __giveNewTask(curPlayer, taskGroup):
         SyncTaskInfo(curPlayer, [taskGroup])
         
-    GameFuncComm.DoFuncOpenLogic(curPlayer, [taskID])
+    GameFuncComm.DoFuncOpenLogic(curPlayer)
     return
 
 def SyncTaskInfo(curPlayer, taskGroupList=None):

--
Gitblit v1.8.0