From 8a0a247299265f7a2ba4ef3af1594ca5bd696d9c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 14 七月 2025 10:55:50 +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 efac7e6..e0515cf 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHero.py @@ -234,10 +234,14 @@ if heroLV >= LVMax: GameWorld.DebugLog("该武将已满级!LVMax=%s" % (LVMax), playerID) return - qualityIpyData = IpyGameDataPY.GetIpyGameData("HeroQuality", quality) - if not qualityIpyData: + qualityLVIpyData = IpyGameDataPY.GetIpyGameData("HeroQualityLV", quality, heroLV) + if not qualityLVIpyData: return - costItemInfo = qualityIpyData.GetUPCostItem() + nextHeroLV = heroLV + 1 + if not IpyGameDataPY.GetIpyGameData("HeroQualityLV", quality, nextHeroLV): + GameWorld.DebugLog("不存在该武将等级: quality=%s,nextHeroLV=%s" % (quality, nextHeroLV), playerID) + return + costItemInfo = qualityLVIpyData.GetUPCostItem() if not costItemInfo: return costItemID, costItemCount = costItemInfo @@ -250,7 +254,7 @@ return ItemCommon.ReduceItem(curPlayer, itemPack, itemIndexList, costItemCount, True, "HeroLVUP") - updHeroLV = heroLV + 1 + updHeroLV = nextHeroLV GameWorld.DebugLog("武将升级: itemIndex=%s,heroID=%s,updHeroLV=%s" % (itemIndex, heroID, updHeroLV), playerID) heroItem.SetUserAttr(ShareDefine.Def_IudetHeroLV, updHeroLV) -- Gitblit v1.8.0