From 46dbf29a22bd25d8e9c6ea4c34fea35a4828d712 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 31 十二月 2025 12:13:01 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(武将重置突破支持消耗货币;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
index 033c204..a5cddd1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py
@@ -1231,6 +1231,7 @@
quality = heroIpyData.GetQuality()
lvCostMoney = 0
+ breakCostMoney = 0
awakeCostMoney = 0
moneyType = IpyGameDataPY.GetFuncCfg("HeroRebirth", 1)
if awakeReset and awakeLV:
@@ -1238,11 +1239,14 @@
awakeCostMoney = qualityAwakeIpyData.GetRebirthCostMoney() if qualityAwakeIpyData else 0
if lvReset:
- lvCostMoney = int(eval(IpyGameDataPY.GetFuncCompileCfg("HeroRebirth", 3)))
+ lvCostMoney = int(max(0, eval(IpyGameDataPY.GetFuncCompileCfg("HeroRebirth", 3))))
- costMoneyTotal = lvCostMoney + awakeCostMoney
- GameWorld.DebugLog("武将重生: itemIndex=%s,heroID=%s,quality=%s,heroLV=%s,breakLV=%s,awakeLV=%s,costMoneyTotal=%s(%s+%s),lvReset=%s,breakReset=%s,awakeReset=%s"
- % (itemIndex, heroID, quality, heroLV, breakLV, awakeLV, costMoneyTotal, lvCostMoney, awakeCostMoney, lvReset, breakReset, awakeReset))
+ if breakReset:
+ breakCostMoney = int(max(0, eval(IpyGameDataPY.GetFuncCompileCfg("HeroRebirth2", 1))))
+
+ costMoneyTotal = lvCostMoney + awakeCostMoney + breakCostMoney
+ GameWorld.DebugLog("武将重生: itemIndex=%s,heroID=%s,quality=%s,heroLV=%s,breakLV=%s,awakeLV=%s,costMoneyTotal=%s(lv:%s+b:%s+a:%s),lvReset=%s,breakReset=%s,awakeReset=%s"
+ % (itemIndex, heroID, quality, heroLV, breakLV, awakeLV, costMoneyTotal, lvCostMoney, breakCostMoney, awakeCostMoney, lvReset, breakReset, awakeReset))
if moneyType and costMoneyTotal and not PlayerControl.HaveMoney(curPlayer, moneyType, costMoneyTotal):
return
--
Gitblit v1.8.0