From 8d6c2d3adfc433e8349946df606e045049c3bd94 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 28 Aug 2020 14:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=AE=9D=E7=89=A9=E3=80=91=E9=87=91?= =?UTF-8?q?=E5=B8=81=E4=B8=8D=E8=B6=B3=EF=BC=8C=E4=B8=80=E9=94=AE=E5=90=88?= =?UTF-8?q?=E6=88=90=E6=B2=A1=E6=9C=89=E5=90=88=E7=90=86=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Compound/view/CompoundPanel_Treasure.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Compound/view/CompoundPanel_Treasure.lua b/Assets/ManagedResources/~Lua/Modules/Compound/view/CompoundPanel_Treasure.lua index 0e671f68db..61aabc78d9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Compound/view/CompoundPanel_Treasure.lua +++ b/Assets/ManagedResources/~Lua/Modules/Compound/view/CompoundPanel_Treasure.lua @@ -227,6 +227,7 @@ end --一种装备一种装备的循环检测 金币能合成的数量 与 背包装备能合成的数量 取最小值 然后扣除临时消耗道具 --最后所有装备存在curPosEquips 与 之前背包 bagPosEquips 作比较 看合成了什么装备 删除了什么装备 和计算消耗材料 function this.AutoCompound(_position) + local goldIsEnough = true --表数据 local curPosEquips = EquipTreasureManager.GetAllTabletTreasuresByRaceAndType(_position)--,curSelectEquip.equipType) --实际数据 @@ -304,6 +305,8 @@ function this.AutoCompound(_position) --LogGreen("合成curPosEquipsData[equipData.equipType][equipData.quantity]之后:"..curPosEquipsData[equipData.equipType][equipData.quantity]) end end + else + goldIsEnough = false end end local origiData = EquipTreasureManager.GeEquipTreasureDatas(_position) @@ -313,12 +316,16 @@ function this.AutoCompound(_position) --LogGreen("m:"..m.." origiData[i][n]:"..origiData[i][n]) if m > origiData[i][n] then local config = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.JewelConfig,"Location",i,"Level",n,"Race",_position) + local num = m - origiData[i][n] --LogGreen("config.id:"..config.Id.." num:"..m - origiData[i][n]) - table.insert(endReward,{config.Id,m - origiData[i][n]}) + table.insert(endReward,{config.Id,num}) end end end - if LengthOfTable(endReward) < 1 then + if not goldIsEnough and LengthOfTable(endReward) < 1 then + PopupTipPanel.ShowTip("金币不足,无法合成") + return + elseif LengthOfTable(endReward) < 1 then PopupTipPanel.ShowTip(Language[12258]) return end