fix bug
This commit is contained in:
parent
1aea0564b5
commit
0e0e36522d
@ -128,6 +128,7 @@ function ChapterManager:endFightFinish(result)
|
|||||||
|
|
||||||
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.STAGE, newRewards, reqData.combatReport, mysteryBoxIdx, nil, true)
|
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.STAGE, newRewards, reqData.combatReport, mysteryBoxIdx, nil, true)
|
||||||
DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx)
|
DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx)
|
||||||
|
DataManager.ChapterData:clearChapterBoxState()
|
||||||
-- 处理金猪,要在章节更新之后
|
-- 处理金猪,要在章节更新之后
|
||||||
DataManager.GoldPigData:addGoldPigCount()
|
DataManager.GoldPigData:addGoldPigCount()
|
||||||
|
|
||||||
|
|||||||
@ -1,21 +1,24 @@
|
|||||||
local DailyChallengeUI = class("DailyChallengeUI", BaseUI)
|
local DailyChallengeUI = class("DailyChallengeUI", BaseUI)
|
||||||
|
|
||||||
-- function DailyChallengeUI:getIsOpen()
|
|
||||||
-- return DataManager.DailyChallengeData:isOpen()
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- function DailyChallengeUI:getEntranceName()
|
|
||||||
-- return I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- function DailyChallengeUI:getShowEntranceRedPoint()
|
|
||||||
-- return DataManager.DailyChallengeData:isMeetChallenge()
|
|
||||||
-- end
|
|
||||||
|
|
||||||
function DailyChallengeUI:isFullScreen()
|
function DailyChallengeUI:isFullScreen()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function DailyChallengeUI:getCurrencyParams()
|
||||||
|
if self.currencyParams == nil then
|
||||||
|
self.currencyParams = {
|
||||||
|
itemIds = {
|
||||||
|
GConst.ItemConst.ITEM_ID_GOLD,
|
||||||
|
GConst.ItemConst.ITEM_ID_GEM,
|
||||||
|
GConst.ItemConst.ITEM_ID_VIT
|
||||||
|
},
|
||||||
|
showType = GConst.CURRENCY_TYPE.HORIZONTAL
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return self.currencyParams
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function DailyChallengeUI:getPrefabPath()
|
function DailyChallengeUI:getPrefabPath()
|
||||||
return "assets/prefabs/ui/daily_challenge/daily_challenge_ui.prefab"
|
return "assets/prefabs/ui/daily_challenge/daily_challenge_ui.prefab"
|
||||||
end
|
end
|
||||||
@ -45,8 +48,8 @@ function DailyChallengeUI:onLoadRootComplete()
|
|||||||
table.insert(self.taskMasks, uiMap["daily_challenge_ui.task.icon_task2.mask"])
|
table.insert(self.taskMasks, uiMap["daily_challenge_ui.task.icon_task2.mask"])
|
||||||
table.insert(self.taskMasks, uiMap["daily_challenge_ui.task.icon_task3.mask"])
|
table.insert(self.taskMasks, uiMap["daily_challenge_ui.task.icon_task3.mask"])
|
||||||
|
|
||||||
self.buffObj = uiMap["daily_challenge_ui.buffs.buff.btn_buff"]
|
self.buffBtn = uiMap["daily_challenge_ui.buffs.buff"]
|
||||||
self.debuffObj = uiMap["daily_challenge_ui.buffs.debuff.btn_debuff"]
|
self.debuffBtn = uiMap["daily_challenge_ui.buffs.debuff"]
|
||||||
self.bossSpine = uiMap["daily_challenge_ui.spine_node"]
|
self.bossSpine = uiMap["daily_challenge_ui.spine_node"]
|
||||||
self.countdownTx = uiMap["daily_challenge_ui.countdown.time_tx"]
|
self.countdownTx = uiMap["daily_challenge_ui.countdown.time_tx"]
|
||||||
|
|
||||||
@ -172,12 +175,12 @@ end
|
|||||||
|
|
||||||
function DailyChallengeUI:refreshBuff()
|
function DailyChallengeUI:refreshBuff()
|
||||||
local buffIds = DataManager.DailyChallengeData:getTodayBuffIds()
|
local buffIds = DataManager.DailyChallengeData:getTodayBuffIds()
|
||||||
self.buffObj:addClickListener(function()
|
self.buffBtn:addClickListener(function()
|
||||||
ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[1]), self.buffObj)
|
ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[1]), self.buffBtn)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self.debuffObj:addClickListener(function()
|
self.debuffBtn:addClickListener(function()
|
||||||
ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[2]), self.debuffObj)
|
ModuleManager.TipsManager:showDescTips(DataManager.DailyChallengeData:getBuffDesc(buffIds[2]), self.debuffBtn)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -247,9 +250,9 @@ function DailyChallengeUI:refreshDiffBtn()
|
|||||||
local chapterStage = DataManager.ChapterData:getChapterStage(diffChapter + 1)
|
local chapterStage = DataManager.ChapterData:getChapterStage(diffChapter + 1)
|
||||||
local str
|
local str
|
||||||
if cfg.max_chapter <= chapterId then
|
if cfg.max_chapter <= chapterId then
|
||||||
str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "<color=#5BFF5F>" .. I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_8) .. "</color>")
|
str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "<color=#87FF9E>(" .. I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_8) .. ")</color>")
|
||||||
else
|
else
|
||||||
str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "<color=#FF5D5D>" .. I18N:getGlobalText(I18N.GlobalConst.CHAPTER_WAVE_REAWRD_1) .. "</color>")
|
str = I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_3, chapterPage, chapterStage, "<color=#FF8787>(" .. I18N:getGlobalText(I18N.GlobalConst.CHAPTER_WAVE_REAWRD_1) .. ")</color>")
|
||||||
end
|
end
|
||||||
self.upDiffBtnDescTx:setText(str)
|
self.upDiffBtnDescTx:setText(str)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -30,10 +30,10 @@ function SummonUnlockUI:onLoadRootComplete()
|
|||||||
self:checkUnlockMap()
|
self:checkUnlockMap()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self.heroNode = uiMap["summon_unlock_ui.hero_node"]
|
self.heroNode = uiMap["summon_unlock_ui.hero_bg.hero_node"]
|
||||||
self.nameTx = uiMap["summon_unlock_ui.name_tx"]
|
self.nameTx = uiMap["summon_unlock_ui.name_tx"]
|
||||||
self.matchTx = uiMap["summon_unlock_ui.match_tx"]
|
self.matchTx = uiMap["summon_unlock_ui.match_node.match_tx"]
|
||||||
self.matchImg = uiMap["summon_unlock_ui.match_tx.match_img"]
|
self.matchImg = uiMap["summon_unlock_ui.match_node.match_tx.match_img"]
|
||||||
self.qltBg = uiMap["summon_unlock_ui.qlt_bg"]
|
self.qltBg = uiMap["summon_unlock_ui.qlt_bg"]
|
||||||
self.qltBgTx = uiMap["summon_unlock_ui.qlt_bg.qlt_tx"]
|
self.qltBgTx = uiMap["summon_unlock_ui.qlt_bg.qlt_tx"]
|
||||||
self.uiSpine = uiMap["summon_unlock_ui.ui_spine_obj"]
|
self.uiSpine = uiMap["summon_unlock_ui.ui_spine_obj"]
|
||||||
@ -48,6 +48,7 @@ function SummonUnlockUI:onRefresh()
|
|||||||
local heroEntity = DataManager.HeroData:getHeroById(self.heroId)
|
local heroEntity = DataManager.HeroData:getHeroById(self.heroId)
|
||||||
local matchType = heroEntity:getMatchType()
|
local matchType = heroEntity:getMatchType()
|
||||||
local qlt = heroEntity:getQlt()
|
local qlt = heroEntity:getQlt()
|
||||||
|
self.nameTx:setText(heroEntity:getName())
|
||||||
self.matchTx:setText(ModuleManager.HeroManager:getMatchTypeName(matchType))
|
self.matchTx:setText(ModuleManager.HeroManager:getMatchTypeName(matchType))
|
||||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, ModuleManager.HeroManager:getMatchTypeIcon(matchType))
|
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, ModuleManager.HeroManager:getMatchTypeIcon(matchType))
|
||||||
self.qltBg:setSprite(GFunc.getHeroQltImg(qlt))
|
self.qltBg:setSprite(GFunc.getHeroQltImg(qlt))
|
||||||
|
|||||||
@ -154,6 +154,10 @@ function ChapterData:getChapterBoxNum(chapterId, index)
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ChapterData:clearChapterBoxState()
|
||||||
|
self.boxCanGetState = nil
|
||||||
|
end
|
||||||
|
|
||||||
function ChapterData:getChapterBoxCanGet()
|
function ChapterData:getChapterBoxCanGet()
|
||||||
if self.boxCanGetState == nil then
|
if self.boxCanGetState == nil then
|
||||||
self:calcChapterBoxCanGet()
|
self:calcChapterBoxCanGet()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user