diff --git a/lua/app/common/local_data.lua b/lua/app/common/local_data.lua index f64e7f54..8ff0f703 100644 --- a/lua/app/common/local_data.lua +++ b/lua/app/common/local_data.lua @@ -525,11 +525,11 @@ function LocalData:setTutorialSkip(value) end function LocalData:getFuncOpenPopSkip() - return self:getInt(self:getRoleKey(LOCAL_DATA_KEY.FUNC_OPEN_POP), 0) + return self:getInt(LOCAL_DATA_KEY.FUNC_OPEN_POP, 0) end function LocalData:setFuncOpenPopSkip(value) - self:setInt(self:getRoleKey(LOCAL_DATA_KEY.FUNC_OPEN_POP), value) + self:setInt(LOCAL_DATA_KEY.FUNC_OPEN_POP, value) end function LocalData:getFuncOpenShowList() diff --git a/lua/app/ui/summon/summon_main_ui.lua b/lua/app/ui/summon/summon_main_ui.lua index 57056295..384ab3f8 100755 --- a/lua/app/ui/summon/summon_main_ui.lua +++ b/lua/app/ui/summon/summon_main_ui.lua @@ -87,6 +87,9 @@ function SummonMainUI:onLoadRootComplete() self.touchNode:setActive(false) self.touchNodeDescTx:setActive(false) self.touchNode:addClickListener(function() + if not self.canSkip1 then + return + end self.showIdx = 999 end) self.btnSummonFree:addClickListener(function() @@ -143,6 +146,7 @@ function SummonMainUI:onLoadRootComplete() local isQuick = DataManager.SummonData:getSkipAniFlag() self.skipNodeSelect:setActive(isQuick) GFunc.centerImgAndTx(self.skipNodeCheck, self.skipNodeTx, 5) + self.skipNode:setActive(false) -- self.btnTxs = { -- I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_6), -- I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_7), @@ -241,6 +245,7 @@ end --刷新 function SummonMainUI:onRefresh() + self:refreshSkip() self:refreshSummonBtn() self:refreshSummonDesc() -- self:refreshBtnRedPoint() @@ -248,6 +253,20 @@ function SummonMainUI:onRefresh() self:updateTime() end +function SummonMainUI:refreshSkip() + if not self.canSkip1 then + local totalCount = DataManager.SummonData:getSummonCount(self.page) + self.canSkip1 = totalCount >= GFunc.getConstIntValue("summon_skip_1") + end + if not self.canSkip2 then + local totalCount = DataManager.SummonData:getSummonCount(self.page) + self.canSkip2 = totalCount >= GFunc.getConstIntValue("summon_skip_2") + end + + self.touchNodeDescTx:setActive(self.canSkip1) + self.skipNode:setActive(self.canSkip2) +end + -- function SummonMainUI:refreshPageBtn() -- for i = 1, 2 do -- if self.page == i then @@ -429,6 +448,7 @@ function SummonMainUI:onSummonEnd() self.heroNode:removeAllChildren() self.uiSpineObj:setActive(true) self.uiSpineObj:playAnim("idle", true, true) + self:refreshSkip() ModuleManager.SummonManager:showSummonRewardUI({ rewards = self.summonResult, callback = function(count, isAd) @@ -482,7 +502,7 @@ function SummonMainUI:onSummonRsp(result, newHero) end self.aniSeq:AppendInterval(1.5) self.aniSeq:AppendCallback(function() - self.touchNodeDescTx:setActive(true) + self.touchNodeDescTx:setActive(self.canSkip1) self.showIdx = 1 self:showHero() end)