宝物bug修改

dev_chengFeng
jiaoyangna 2020-07-09 10:53:15 +08:00
parent ccfb9132f3
commit f9c49d00e3
2 changed files with 19 additions and 7 deletions

View File

@ -426,8 +426,8 @@ function this.SetPropertyShow(_infos)
Util.GetGameObject(obj,"leftTxt"):GetComponent("Text").text=string.format("%s+%s",proper.Info,value.currValue)
Util.GetGameObject(obj,"rightTxt"):GetComponent("Text").text= isMax and Language[11089] or value.nextValue
else
Util.GetGameObject(obj,"leftTxt"):GetComponent("Text").text=proper.Info.."+"..value.currValue/1000 .."%"
Util.GetGameObject(obj,"rightTxt"):GetComponent("Text").text=isMax and Language[11089] or value.nextValue/1000 .."%"
Util.GetGameObject(obj,"leftTxt"):GetComponent("Text").text=proper.Info.."+"..value.currValue/100 .."%"
Util.GetGameObject(obj,"rightTxt"):GetComponent("Text").text=isMax and Language[11089] or value.nextValue/100 .."%"
end
obj.gameObject:SetActive(true)
index=index+1

View File

@ -627,12 +627,17 @@ function this:OnClickAllBtn()
this:SetSelectBtn()
local itemData = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession)
this:SortEquipDatas(itemData)
local count = 0
for i=1,#itemData do
count = count + itemData[i].num
end
--加上宝器数据
local curAllEquipTreasure = EquipTreasureManager.GetAllTreasures(curHeroData.heroConfig.PropertyName)
--宝器排序
for i = 1, #curAllEquipTreasure do
table.insert(itemData, curAllEquipTreasure[i])
end
this.itemNumText.text = Language[10188] .. count + LengthOfTable(curAllEquipTreasure)
this:SetItemData(itemData)
end
@ -642,6 +647,11 @@ function this:OnClickTabBtn(_index)
if _index < 5 then
local allEquip = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession, _index)
this:SortEquipDatas(allEquip)
local count = 0
for i=1,#allEquip do
count = count + allEquip[i].num
end
this.itemNumText.text = Language[10188] .. count
this:SetItemData(allEquip)
else
local allEquipTreasure
@ -661,15 +671,14 @@ function this:OnClickTabBtn(_index)
end
end
)
this:SetItemData(allEquipTreasure)
this.itemNumText.text = Language[10188] .. LengthOfTable(allEquipTreasure)
this:SetItemData(allEquipTreasure)
end
end
--设置背包列表数据
local curHeroCanUpEquipTabs = {}
function this:SetItemData(_itemDatas)
--LogError(" " ..LengthOfTable(_itemDatas) )
this.itemNumText.text = Language[10188] .. LengthOfTable(_itemDatas)
function this:SetItemData(_itemDatas)
if LengthOfTable(_itemDatas) == 0 then
this.emptyObj.gameObject:SetActive(true)
else
@ -710,6 +719,7 @@ function this.SingleItemDataShow(_go, _itemData)
local jewerConfig = ConfigManager.TryGetConfigData(ConfigName.JewelConfig, _itemData.id)
local pos = 0
if jewerConfig then
Util.GetGameObject(_go.transform, "num").gameObject:SetActive(false)
if jewerConfig.Location == 1 then
pos = 5
else
@ -717,6 +727,9 @@ function this.SingleItemDataShow(_go, _itemData)
pos = 6
end
end
else
Util.GetGameObject(_go.transform, "num").gameObject:SetActive(true)
Util.GetGameObject(_go.transform, "num"):GetComponent("Text").text = _itemData.num
end
local lvObj = Util.GetGameObject(_go.transform, "lv"):GetComponent("Text")
local refineObj = Util.GetGameObject(_go.transform, "refine"):GetComponent("Text")
@ -741,7 +754,6 @@ function this.SingleItemDataShow(_go, _itemData)
else
refineObj.gameObject:SetActive(false)
end
Util.GetGameObject(_go.transform, "num").gameObject:SetActive(false)
-- 0.查看属性 1.穿戴 2.卸下 3.交换
--宝物界面
Util.AddOnceClick(