From 6a6ba3ddbe0f03cf9c268c8afae393ef53a15816 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 20 十月 2025 15:07:22 +0800
Subject: [PATCH] 232 【付费内容】历练秘笈-服务端(手动升级)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 3 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLLMJ.py | 30 ++++++++++++++++++++++--------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 2 +-
3 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 84a85ca..4c93c4b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4929,7 +4929,7 @@
(
Def_RewardType_Activity, # 活跃度奖励 0
Def_RewardType_DailyTask, # 每日任务奖励 1
-Def_RewardType_ChampionFamilyDailyReward, # 仙盟联赛冠军仙盟每日俸禄奖励 2
+Def_RewardType_LLMJLVUp, # 历练秘笈升级 2
Def_RewardType_XMZZWinCnt, # 仙魔之争胜利场数奖励 3
Def_RewardType_FamilyDayAward, # 仙盟每日福利奖励 4
Def_RewardType_LVAward, # 玩家等级奖励5
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 97b296f..39dad57 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -3276,6 +3276,9 @@
# 广告奖励
elif rewardType == ChConfig.Def_RewardType_ADAward:
OnGetADAward(curPlayer, dataEx)
+ # 历练秘笈升级
+ elif rewardType == ChConfig.Def_RewardType_LLMJLVUp:
+ PlayerLLMJ.OnLLMJLVUp(curPlayer)
# 每日免费直购礼包
elif rewardType == ChConfig.Def_RewardType_DayFreeGoldGift:
PlayerDailyGiftbag.OnGetDailyFreeGiftbag(curPlayer)
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