Branch_oumei
zhangjiannan 2025-10-15 17:39:29 +08:00
parent b38339626b
commit cf22230e31
1 changed files with 28 additions and 26 deletions

View File

@ -630,34 +630,36 @@ if not itemConfig[_itemData.id] then
"X1_xinpian_xinpianyizhuangbei"))
end
Util.AddOnceClick(Util.GetGameObject(_go.transform, "btn_sure"), function()
local idList = {}
table.insert(idList, _itemData.id)
local heroId = ""
if curHeroData then
heroId = curHeroData.dynamicId
local list = GiftManager.GetHeroGifts(heroId)
if #list >= 12 then
PopupTipPanel.ShowTip("礼物数量已达上限!")
return
end
else
heroId = "0"
local list = GiftManager.GetPlayerGifts()
if #list >= 12 then
PopupTipPanel.ShowTip("礼物数量已达上限!")
return
end
end
NetManager.GiftEquipWearRequest(1, heroId, idList, function()
self:ClosePanel()
if heroId == "0" then
GiftManager.SetPlayerGift(idList)
--HeroManager.ChangeAllHeroGiftLV()
if _itemData.isUp == 1 then
local idList = {}
table.insert(idList, _itemData.id)
local heroId = ""
if curHeroData then
heroId = curHeroData.dynamicId
local list = GiftManager.GetHeroGifts(heroId)
if #list >= 12 then
PopupTipPanel.ShowTip("礼物数量已达上限!")
return
end
else
GiftManager.SetHeroGift(self.curHeroData.dynamicId, idList, 1)
heroId = "0"
local list = GiftManager.GetPlayerGifts()
if #list >= 12 then
PopupTipPanel.ShowTip("礼物数量已达上限!")
return
end
end
self.RefreshWindowData()
end)
NetManager.GiftEquipWearRequest(1, heroId, idList, function()
self:ClosePanel()
if heroId == "0" then
GiftManager.SetPlayerGift(idList)
--HeroManager.ChangeAllHeroGiftLV()
else
GiftManager.SetHeroGift(self.curHeroData.dynamicId, idList, 1)
end
self.RefreshWindowData()
end)
end
end)
end