From 489fd12db21076f6d6b0535e353a4123664e0ca0 Mon Sep 17 00:00:00 2001 From: yuanshuai <243578945@qq.com> Date: Wed, 7 Sep 2022 14:08:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=BB=E5=99=A8=E9=98=81=20bug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Hero/HeroManager.lua | 11 ++++++----- .../~Lua/Modules/RoleInfo/EquipTreasureManager.lua | 7 ++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index e87d8c0458..aa7bd9849e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -4500,20 +4500,21 @@ function this.CheckIsUpTreasure(Did,index) isMax = curEquipData.refineLv == curEquipData.maxRefineLv items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.refineConfig) elseif index == 3 then - isMax=curEquipData.treeLv==curEquipData.maxTreeLv + isMax=curEquipData.treeLv>=curEquipData.maxTreeLv if isMax then return false end local lvUpCost= ConfigManager.GetConfigData(ConfigName.GodHoodTreeLevel,curEquipData.treeLv).LvupCost isMatEnough=BagManager.GetItemCountById(lvUpCost[1])>=lvUpCost[2] else - isMax = (curEquipData.lv == curEquipData.maxLv) and (curEquipData.refineLv==curEquipData.maxRefineLv) + isMax = (curEquipData.lv == curEquipData.maxLv) and (curEquipData.refineLv==curEquipData.maxRefineLv) and (curEquipData.treeLv>=curEquipData.maxTreeLv) items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.refineConfig) if not isMatEnough then items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.strongConfig) - isMatEnough = isMatEnough and - --not (HarmonyManager.IsInfo(curEquipData.upHeroDid) and HarmonyManager.GetSingleAdditions(indexType) ~= -1) - not (HarmonyManager.IsInfo(curEquipData.upHeroDid)) + if not isMatEnough then + items,isMatEnough = this.GetHoodTreeUpCost(curEquipData.treeLv) + isMatEnough = isMatEnough and not (HarmonyManager.IsInfo(curEquipData.upHeroDid)) + end end end local teamHero=FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua index 8a76b2010b..988620214c 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua @@ -277,7 +277,7 @@ function this.GeEquipTreasureDatas(_index) end for i, v in pairs(allTreasures) do - if v.upHeroDid == "" and v.lv == 0 and v.refineLv == 0 and v.race == _index then + if v.upHeroDid == "" and v.lv == 0 and v.refineLv == 0 and v.treeLv == 0 and v.race == _index then if not equips[v.equipType] then equips[v.equipType] = {} end @@ -300,6 +300,7 @@ function this.GetBagCompoundEquipDatasByequipSData(equipSData) v.equipType == equipSData.equipType and v.upHeroDid == "" and v.quantity == equipSData.quantity - 1 and v.lv == 0 and v.refineLv == 0 and + v.treeLv == 0 and v.id == equipSData.Id - 1 then table.insert(equips, v) @@ -313,7 +314,7 @@ function this.GetCanCompoundTreasureNumByTreasureId(_id, _type) local equips = {} for i, v in pairs(allTreasures) do --获取没有穿戴,没有精炼/强化,低一个品质(表里低一个品质的id-1) - if v.equipType == _type and v.upHeroDid == "" and v.lv == 0 and v.refineLv == 0 and v.id == _id then + if v.equipType == _type and v.upHeroDid == "" and v.lv == 0 and v.refineLv == 0 and v.treeLv == 0 and v.id == _id then table.insert(equips, v) end end @@ -367,7 +368,7 @@ function this.GetEnoughRefineTreasure(_id, _idDyn) else isUpHero = true end - if v.id == _id and v.idDyn ~= _idDyn and v.lv == 0 and v.refineLv == 0 and isUpHero == false then + if v.id == _id and v.idDyn ~= _idDyn and v.lv == 0 and v.refineLv == 0 and v.treeLv == 0 and isUpHero == false then list[i] = v num = num + 1 end