fix bug
This commit is contained in:
parent
104c78db10
commit
bb135f8630
@ -1160,7 +1160,7 @@ local monster_daily_challenge = {
|
|||||||
["monster_exp"]=22000
|
["monster_exp"]=22000
|
||||||
},
|
},
|
||||||
[61502]={
|
[61502]={
|
||||||
["monster_base"]=30007,
|
["monster_base"]=30003,
|
||||||
["is_boss"]=1,
|
["is_boss"]=1,
|
||||||
["hp"]=1800000,
|
["hp"]=1800000,
|
||||||
["atk"]=72000000,
|
["atk"]=72000000,
|
||||||
|
|||||||
@ -25,12 +25,12 @@ function HeroListCell:refresh(index, heroList, stageFormation, allHeroCount, act
|
|||||||
end)
|
end)
|
||||||
if activeCount > 0 and index == 1 then
|
if activeCount > 0 and index == 1 then
|
||||||
self.title:setVisible(true)
|
self.title:setVisible(true)
|
||||||
self.title:setSprite(GConst.ATLAS_PATH.COMMON, "common_board_105")
|
self.title:setSprite(GConst.ATLAS_PATH.COMMON, "hero_bg_3")
|
||||||
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_6))
|
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_6))
|
||||||
self:getBaseObject():setSizeDeltaY(H.HAS_TITLE)
|
self:getBaseObject():setSizeDeltaY(H.HAS_TITLE)
|
||||||
elseif index == math.ceil(activeCount / 4) + 1 then
|
elseif index == math.ceil(activeCount / 4) + 1 then
|
||||||
self.title:setVisible(true)
|
self.title:setVisible(true)
|
||||||
self.title:setSprite(GConst.ATLAS_PATH.COMMON, "common_board_116")
|
self.title:setSprite(GConst.ATLAS_PATH.COMMON, "hero_bg_3")
|
||||||
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_7))
|
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_7))
|
||||||
self:getBaseObject():setSizeDeltaY(H.HAS_TITLE)
|
self:getBaseObject():setSizeDeltaY(H.HAS_TITLE)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -59,9 +59,13 @@ function IdleDropUI:onLoadRootComplete()
|
|||||||
uiMap["idle_drop_ui.bg.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_1) .. I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_2, idleMaxTime // 3600))
|
uiMap["idle_drop_ui.bg.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_1) .. I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_2, idleMaxTime // 3600))
|
||||||
self.quickBtn = uiMap["idle_drop_ui.bg.quick_btn"]
|
self.quickBtn = uiMap["idle_drop_ui.bg.quick_btn"]
|
||||||
self.quickBtn:addClickListener(function()
|
self.quickBtn:addClickListener(function()
|
||||||
ModuleManager.IdleManager:showIdleQuickDropUI()
|
ModuleManager.IdleManager:getIdleQuickRewrad(false)
|
||||||
end)
|
end)
|
||||||
uiMap["idle_drop_ui.bg.quick_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_QUICK))
|
uiMap["idle_drop_ui.bg.quick_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_QUICK))
|
||||||
|
local cost = DataManager.IdleData:getQuickIdleCost()[1]
|
||||||
|
local costNum = GFunc.getRewardNum(cost)
|
||||||
|
uiMap["idle_drop_ui.bg.quick_btn.bg.text"]:setText(costNum)
|
||||||
|
|
||||||
self.getBtn = uiMap["idle_drop_ui.bg.get_btn"]
|
self.getBtn = uiMap["idle_drop_ui.bg.get_btn"]
|
||||||
self.getBtn:addClickListener(function()
|
self.getBtn:addClickListener(function()
|
||||||
self.lastRefreshTime = Time:getServerTime()
|
self.lastRefreshTime = Time:getServerTime()
|
||||||
@ -72,6 +76,12 @@ function IdleDropUI:onLoadRootComplete()
|
|||||||
self:closeUI()
|
self:closeUI()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self.adBtn = uiMap["idle_drop_ui.bg.ad_btn"]
|
||||||
|
self.adBtnImg = uiMap["idle_drop_ui.bg.ad_btn.img"]
|
||||||
|
self.adBtn:addClickListener(function()
|
||||||
|
ModuleManager.IdleManager:getIdleQuickRewrad(true)
|
||||||
|
end)
|
||||||
|
|
||||||
uiMap["idle_drop_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CLOSE_DESC))
|
uiMap["idle_drop_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CLOSE_DESC))
|
||||||
uiMap["idle_drop_ui.bg.bg1.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_3))
|
uiMap["idle_drop_ui.bg.bg1.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_3))
|
||||||
uiMap["idle_drop_ui.bg.bg1.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_3))
|
uiMap["idle_drop_ui.bg.bg1.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_3))
|
||||||
@ -255,6 +265,18 @@ function IdleDropUI:refreshBtns()
|
|||||||
self.quickBtn:setTouchEnable(false)
|
self.quickBtn:setTouchEnable(false)
|
||||||
self:removeQuickBtnRedPoint()
|
self:removeQuickBtnRedPoint()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local adRemainTimes = DataManager.IdleData:getQuickIdleAdRemainTimes()
|
||||||
|
if adRemainTimes <= 0 then
|
||||||
|
adRemainTimes = 0
|
||||||
|
self.adBtn:setTouchEnable(false)
|
||||||
|
self.adBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1")
|
||||||
|
self.adBtn:removeRedPoint()
|
||||||
|
else
|
||||||
|
self.adBtn:setTouchEnable(true)
|
||||||
|
self.adBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_orange_1")
|
||||||
|
self.adBtn:addRedPoint(60, 30, 0.5)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function IdleDropUI:refreshCD()
|
function IdleDropUI:refreshCD()
|
||||||
|
|||||||
@ -169,6 +169,8 @@ function MainComp:refreshChapter(force)
|
|||||||
local chapterId = DataManager.ChapterData:getChapterId()
|
local chapterId = DataManager.ChapterData:getChapterId()
|
||||||
self.chapterList = DataManager.ChapterData:getChapterList(self.chapterPage)
|
self.chapterList = DataManager.ChapterData:getChapterList(self.chapterPage)
|
||||||
if self.currChapterId ~= chapterId or force then
|
if self.currChapterId ~= chapterId or force then
|
||||||
|
self.chapterPage = DataManager.ChapterData:getChapterPage(chapterId)
|
||||||
|
self.chapterStage = DataManager.ChapterData:getChapterStage(chapterId)
|
||||||
self:refreshChapterBg()
|
self:refreshChapterBg()
|
||||||
self:refreshFightBtn()
|
self:refreshFightBtn()
|
||||||
self:doBossAction()
|
self:doBossAction()
|
||||||
|
|||||||
@ -262,6 +262,14 @@ function MainCityUI:initBottomUI()
|
|||||||
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, false) then
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, false) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
elseif i == 4 then -- 商城有开启条件
|
||||||
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, false) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
elseif i == 5 then -- 商城有开启条件
|
||||||
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, false) then
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if self.selectedIndex == i then
|
if self.selectedIndex == i then
|
||||||
return
|
return
|
||||||
|
|||||||
@ -8,14 +8,14 @@ end
|
|||||||
|
|
||||||
function IdleData:init(data)
|
function IdleData:init(data)
|
||||||
data = data or GConst.EMPTY_TABLE
|
data = data or GConst.EMPTY_TABLE
|
||||||
self.data.dropTime = (data.claim_at or 0) // 1000
|
self.data.dropTime = (data.claim_at or 0)
|
||||||
self.data.adCount = data.ad_count or 0
|
self.data.adCount = data.ad_count or 0
|
||||||
self.data.energyCount = data.energy_count or 0
|
self.data.energyCount = data.energy_count or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function IdleData:onGetIdleShowRewrad(data)
|
function IdleData:onGetIdleShowRewrad(data)
|
||||||
data = data or GConst.EMPTY_TABLE
|
data = data or GConst.EMPTY_TABLE
|
||||||
self.data.dropTime = (data.claim_at or 0) // 1000
|
self.data.dropTime = (data.claim_at or 0)
|
||||||
self.data.adCount = data.ad_count or 0
|
self.data.adCount = data.ad_count or 0
|
||||||
self.data.energyCount = data.energy_count or 0
|
self.data.energyCount = data.energy_count or 0
|
||||||
self:updateIdleRewards(data.items)
|
self:updateIdleRewards(data.items)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user