fix bug
This commit is contained in:
parent
4d5416c5ce
commit
bb93a7e8b4
@ -102,6 +102,7 @@ function SummonManager:onSummonWishClaimRsp(result)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
DataManager.SummonData:summonWishClaim()
|
DataManager.SummonData:summonWishClaim()
|
||||||
|
GFunc.showRewardBox(result.rewards)
|
||||||
-- local newForce = {}
|
-- local newForce = {}
|
||||||
-- for _, reward in pairs(result.rewards) do
|
-- for _, reward in pairs(result.rewards) do
|
||||||
-- local isNew = DataManager.ForceData:getForceIsNew(reward.item.id)
|
-- local isNew = DataManager.ForceData:getForceIsNew(reward.item.id)
|
||||||
|
|||||||
@ -77,7 +77,7 @@ function SummonBallCell:refreshInfo(heroId)
|
|||||||
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
||||||
|
|
||||||
self.countTx:setText("")
|
self.countTx:setText("")
|
||||||
self.infoBtn:setActive(false)
|
self.infoBtn:setActive(true)
|
||||||
self.selectImg:setVisible(false)
|
self.selectImg:setVisible(false)
|
||||||
self.icon:setActive(true)
|
self.icon:setActive(true)
|
||||||
self.heroDec:setActive(true)
|
self.heroDec:setActive(true)
|
||||||
|
|||||||
@ -131,8 +131,8 @@ function SummonMainUI:onLoadRootComplete()
|
|||||||
-- self.heroTips[i].txDesc = uiMap['summon_main_ui.node.hero_'..i..'.tx_hero_desc']
|
-- self.heroTips[i].txDesc = uiMap['summon_main_ui.node.hero_'..i..'.tx_hero_desc']
|
||||||
-- end
|
-- end
|
||||||
self.btnTxs = {
|
self.btnTxs = {
|
||||||
I18N:getGlobalText(I18N.GlobalConst.TASK_DAILY),
|
I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_6),
|
||||||
I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE),
|
I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_7),
|
||||||
}
|
}
|
||||||
self.pageBtns = {}
|
self.pageBtns = {}
|
||||||
self.pageBtnTxs = {}
|
self.pageBtnTxs = {}
|
||||||
@ -179,7 +179,7 @@ function SummonMainUI:onLoadRootComplete()
|
|||||||
local wishCount = DataManager.SummonData:getSummonWishCount(self.page)
|
local wishCount = DataManager.SummonData:getSummonWishCount(self.page)
|
||||||
if wishCount >= wishGuarantee and wishHeroId ~= 0 then
|
if wishCount >= wishGuarantee and wishHeroId ~= 0 then
|
||||||
--发送领取奖励的协议
|
--发送领取奖励的协议
|
||||||
ModuleManager.SummonManager:onSummonWishClaimReq()
|
ModuleManager.SummonManager:onSummonWishClaimReq(self.page)
|
||||||
else
|
else
|
||||||
--打开设置心愿界面
|
--打开设置心愿界面
|
||||||
ModuleManager.SummonManager:showSummonWishUI(self.page)
|
ModuleManager.SummonManager:showSummonWishUI(self.page)
|
||||||
|
|||||||
@ -18,7 +18,11 @@ end
|
|||||||
function SummonOddsUI:onLoadRootComplete()
|
function SummonOddsUI:onLoadRootComplete()
|
||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
uiMap["summon_odds_ui.bg.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_4))
|
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))
|
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.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)
|
self.layout_content = self.content:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT)
|
||||||
|
|||||||
@ -110,6 +110,7 @@ function SummonRewardUI:refreshSummonBtn()
|
|||||||
self.btnSummonAd:setActive(adCount > 0)
|
self.btnSummonAd:setActive(adCount > 0)
|
||||||
self.btnSummonFree:setActive(freeCount > 0)
|
self.btnSummonFree:setActive(freeCount > 0)
|
||||||
self.btnSummonOne:setActive(freeCount <= 0)
|
self.btnSummonOne:setActive(freeCount <= 0)
|
||||||
|
self.btnSummonTen:setActive(true)
|
||||||
if freeCount <= 0 then
|
if freeCount <= 0 then
|
||||||
if count >= 1 then
|
if count >= 1 then
|
||||||
self.txNumOne:setText(1)
|
self.txNumOne:setText(1)
|
||||||
@ -158,6 +159,8 @@ function SummonRewardUI:onRefresh()
|
|||||||
self.btnGet:setActive(false)
|
self.btnGet:setActive(false)
|
||||||
self.btnSummonOne:setActive(false)
|
self.btnSummonOne:setActive(false)
|
||||||
self.btnSummonTen:setActive(false)
|
self.btnSummonTen:setActive(false)
|
||||||
|
self.btnSummonAd:setActive(false)
|
||||||
|
self.btnSummonFree:setActive(false)
|
||||||
self.tranBg:removeClickListener()
|
self.tranBg:removeClickListener()
|
||||||
if #self.rewards == 1 then
|
if #self.rewards == 1 then
|
||||||
self.goOne:setActive(true)
|
self.goOne:setActive(true)
|
||||||
@ -174,8 +177,7 @@ function SummonRewardUI:onRefresh()
|
|||||||
self:checkUnlockMap()
|
self:checkUnlockMap()
|
||||||
self.btnGet:setActive(true)
|
self.btnGet:setActive(true)
|
||||||
if not self.isWish then
|
if not self.isWish then
|
||||||
self.btnSummonOne:setActive(true)
|
self:refreshSummonBtn()
|
||||||
self.btnSummonTen:setActive(true)
|
|
||||||
end
|
end
|
||||||
self.tranBg:addClickListener(function()
|
self.tranBg:addClickListener(function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
@ -207,8 +209,7 @@ function SummonRewardUI:onRefresh()
|
|||||||
self:checkUnlockMap()
|
self:checkUnlockMap()
|
||||||
self.btnGet:setActive(true)
|
self.btnGet:setActive(true)
|
||||||
if not self.isWish then
|
if not self.isWish then
|
||||||
self.btnSummonOne:setActive(true)
|
self:refreshSummonBtn()
|
||||||
self.btnSummonTen:setActive(true)
|
|
||||||
end
|
end
|
||||||
self.tranBg:addClickListener(function()
|
self.tranBg:addClickListener(function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
@ -216,7 +217,6 @@ function SummonRewardUI:onRefresh()
|
|||||||
self.tranBg:setClickAnimation(false)
|
self.tranBg:setClickAnimation(false)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
self:refreshSummonBtn()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function SummonRewardUI:doUITweenShake(delayTime)
|
function SummonRewardUI:doUITweenShake(delayTime)
|
||||||
|
|||||||
@ -150,6 +150,7 @@ end
|
|||||||
function SummonData:summonWishClaim(summonType)
|
function SummonData:summonWishClaim(summonType)
|
||||||
if self.summonDataMap[summonType] then
|
if self.summonDataMap[summonType] then
|
||||||
self.summonDataMap[summonType].wishCount = self.summonDataMap[summonType].wishCount - 100
|
self.summonDataMap[summonType].wishCount = self.summonDataMap[summonType].wishCount - 100
|
||||||
|
self:setDirty()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user