From ba67d86ccc7dde96a4fe2bb2ae3abfbd0aacc561 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 03 十一月 2025 12:00:10 +0800
Subject: [PATCH] 237 【福利内容】每日任务/每周任务/章节奖励-服务端(增加每日任务类型 6 ~ 10)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLLMJ.py | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLLMJ.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLLMJ.py
index 197a470..cec5841 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLLMJ.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLLMJ.py
@@ -62,20 +62,34 @@
mjLV, zhanchui = GetMJLVInfo(curPlayer)
if not mjLV:
return
- nextIpyData = IpyGameDataPY.GetIpyGameDataNotLog("LLMJ", mjLV + 1)
- if not nextIpyData:
- #GameWorld.DebugLog("历练秘笈已满级不再累加战锤: mjLV=%s" % (mjLV))
+ maxIpyData = IpyGameDataPY.IPY_Data().GetLLMJByIndex(-1) # 最多累加到最后一级
+ if not maxIpyData:
return
- updZhanchui = zhanchui + addCnt
+ maxZhanchui = maxIpyData.GetCostWarhammer()
+ if zhanchui >= maxZhanchui:
+ #GameWorld.DebugLog("历练秘笈累加战锤已达上限: mjLV=%s,zhanchui=%s >= %s" % (mjLV, zhanchui, maxZhanchui))
+ return
+ updZhanchui = min(zhanchui + addCnt, maxZhanchui)
+ GameWorld.DebugLog("累加历练秘笈战锤: mjLV=%s,addCnt=%s,updZhanchui=%s,maxZhanchui=%s" % (mjLV, addCnt, updZhanchui, maxZhanchui))
+ SetMJLVInfo(curPlayer, mjLV, updZhanchui)
+ SyncLLMJInfo(curPlayer)
+ return
+
+def OnLLMJLVUp(curPlayer):
+ ## 秘笈升级
+ mjLV, zhanchui = GetMJLVInfo(curPlayer)
+ if not mjLV:
+ return
+ nextIpyData = IpyGameDataPY.GetIpyGameData("LLMJ", mjLV + 1)
+ if not nextIpyData:
+ return
nextZhanchui = nextIpyData.GetCostWarhammer()
- GameWorld.DebugLog("累加历练秘笈战锤: mjLV=%s,addCnt=%s,updZhanchui=%s,nextZhanchui=%s" % (mjLV, addCnt, updZhanchui, nextZhanchui))
-
- while nextIpyData and updZhanchui >= nextZhanchui:
+ while nextIpyData and zhanchui >= nextZhanchui:
mjLV += 1 # 升级
nextIpyData = IpyGameDataPY.GetIpyGameDataNotLog("LLMJ", mjLV + 1)
nextZhanchui = nextIpyData.GetCostWarhammer() if nextIpyData else 0
GameWorld.DebugLog("历练秘笈升级: %s,nextZhanchui=%s" % (mjLV, nextZhanchui))
- SetMJLVInfo(curPlayer, mjLV, updZhanchui)
+ SetMJLVInfo(curPlayer, mjLV, zhanchui)
SyncLLMJInfo(curPlayer)
return
--
Gitblit v1.8.0