This commit is contained in:
puxuan 2025-08-21 18:25:36 +08:00
parent 4d5416c5ce
commit bb93a7e8b4
6 changed files with 16 additions and 10 deletions

View File

@ -102,6 +102,7 @@ function SummonManager:onSummonWishClaimRsp(result)
return
end
DataManager.SummonData:summonWishClaim()
GFunc.showRewardBox(result.rewards)
-- local newForce = {}
-- for _, reward in pairs(result.rewards) do
-- local isNew = DataManager.ForceData:getForceIsNew(reward.item.id)

View File

@ -77,7 +77,7 @@ function SummonBallCell:refreshInfo(heroId)
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
self.countTx:setText("")
self.infoBtn:setActive(false)
self.infoBtn:setActive(true)
self.selectImg:setVisible(false)
self.icon:setActive(true)
self.heroDec:setActive(true)

View File

@ -131,8 +131,8 @@ function SummonMainUI:onLoadRootComplete()
-- self.heroTips[i].txDesc = uiMap['summon_main_ui.node.hero_'..i..'.tx_hero_desc']
-- end
self.btnTxs = {
I18N:getGlobalText(I18N.GlobalConst.TASK_DAILY),
I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE),
I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_6),
I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_7),
}
self.pageBtns = {}
self.pageBtnTxs = {}
@ -179,7 +179,7 @@ function SummonMainUI:onLoadRootComplete()
local wishCount = DataManager.SummonData:getSummonWishCount(self.page)
if wishCount >= wishGuarantee and wishHeroId ~= 0 then
--发送领取奖励的协议
ModuleManager.SummonManager:onSummonWishClaimReq()
ModuleManager.SummonManager:onSummonWishClaimReq(self.page)
else
--打开设置心愿界面
ModuleManager.SummonManager:showSummonWishUI(self.page)

View File

@ -18,7 +18,11 @@ end
function SummonOddsUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren()
uiMap["summon_odds_ui.bg.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_4))
if self.page == 1 then
uiMap["summon_odds_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_5))
else
uiMap["summon_odds_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_3))
end
self.content = uiMap["summon_odds_ui.bg.target_node.bg.scrollrect.viewport.content"]
self.layout_content = self.content:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT)

View File

@ -110,6 +110,7 @@ function SummonRewardUI:refreshSummonBtn()
self.btnSummonAd:setActive(adCount > 0)
self.btnSummonFree:setActive(freeCount > 0)
self.btnSummonOne:setActive(freeCount <= 0)
self.btnSummonTen:setActive(true)
if freeCount <= 0 then
if count >= 1 then
self.txNumOne:setText(1)
@ -158,6 +159,8 @@ function SummonRewardUI:onRefresh()
self.btnGet:setActive(false)
self.btnSummonOne:setActive(false)
self.btnSummonTen:setActive(false)
self.btnSummonAd:setActive(false)
self.btnSummonFree:setActive(false)
self.tranBg:removeClickListener()
if #self.rewards == 1 then
self.goOne:setActive(true)
@ -174,8 +177,7 @@ function SummonRewardUI:onRefresh()
self:checkUnlockMap()
self.btnGet:setActive(true)
if not self.isWish then
self.btnSummonOne:setActive(true)
self.btnSummonTen:setActive(true)
self:refreshSummonBtn()
end
self.tranBg:addClickListener(function()
self:closeUI()
@ -207,8 +209,7 @@ function SummonRewardUI:onRefresh()
self:checkUnlockMap()
self.btnGet:setActive(true)
if not self.isWish then
self.btnSummonOne:setActive(true)
self.btnSummonTen:setActive(true)
self:refreshSummonBtn()
end
self.tranBg:addClickListener(function()
self:closeUI()
@ -216,7 +217,6 @@ function SummonRewardUI:onRefresh()
self.tranBg:setClickAnimation(false)
end)
end
self:refreshSummonBtn()
end
function SummonRewardUI:doUITweenShake(delayTime)

View File

@ -150,6 +150,7 @@ end
function SummonData:summonWishClaim(summonType)
if self.summonDataMap[summonType] then
self.summonDataMap[summonType].wishCount = self.summonDataMap[summonType].wishCount - 100
self:setDirty()
end
end