【宝物】金币不足,一键合成没有合理提示
parent
259e0a1209
commit
8d6c2d3adf
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue