From c88420e07b5bf5128d72df1b8a99ca3727eae911 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 25 十一月 2025 19:02:20 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(优化演武场挑战券达到存储上限时消耗后重新统计挑战券掉落战锤消耗;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
index b4c3dcd..729cf68 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -25,6 +25,7 @@
 import IpyGameDataPY
 import GameFuncComm
 import PlayerOnline
+import PlayerTask
 import GameWorld
 import ObjPool
 
@@ -119,6 +120,8 @@
     # 有升级额外处理
     if updHorseLV > horseLV:
         RefreshHorseAttr(curPlayer)
+        
+    PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_HorseLVUP, costItemCount)
     return
 
 #// B2 02 坐骑进阶 #tagCSHorseClassUP
@@ -392,6 +395,8 @@
     for index in range(ipyDataMgr.GetHorseSkinCount()):
         ipyData = ipyDataMgr.GetHorseSkinByIndex(index)
         horseSkinID = ipyData.GetSkinID()
+        if horseSkinID <= 0:
+            continue
         if ipyData.GetUnlockWay() != 1:
             continue
         if ipyData.GetUnlockValue() > 0:
@@ -406,14 +411,16 @@
     if state:
         return True
     
-#    if not ipyData:
-#        ipyData = IpyGameDataPY.GetIpyGameData("HorseSkin", horseSkinID)
-#    if ipyData:
-#        unlockWay = ipyData.GetUnlockWay()
-#        if unlockWay == 1:
-#            classLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
-#            if classLV >= ipyData.GetUnlockValue():
-#                return True
+    if not ipyData:
+        ipyData = IpyGameDataPY.GetIpyGameData("HorseSkin", horseSkinID)
+    if ipyData:
+        unlockWay = ipyData.GetUnlockWay()
+        if unlockWay == 1:
+            if not ipyData.GetUnlockValue():
+                return True
+            #classLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
+            #if classLV >= ipyData.GetUnlockValue():
+            #    return True
             
     return False
 

--
Gitblit v1.8.0