fix bug
This commit is contained in:
parent
e39ad3b2c6
commit
e2b12a917d
@ -244,6 +244,7 @@ GConst.ATLAS_PATH = {
|
|||||||
UI_ACT_PVP = "assets/arts/atlas/ui/act_pvp.asset",
|
UI_ACT_PVP = "assets/arts/atlas/ui/act_pvp.asset",
|
||||||
UI_TALENT = "assets/arts/atlas/ui/talent.asset",
|
UI_TALENT = "assets/arts/atlas/ui/talent.asset",
|
||||||
UI_SUMMON = "assets/arts/atlas/ui/summon.asset",
|
UI_SUMMON = "assets/arts/atlas/ui/summon.asset",
|
||||||
|
ICON_SUMMON = "assets/arts/atlas/icon/hero_summon.asset",
|
||||||
}
|
}
|
||||||
|
|
||||||
GConst.TOUCH_EVENT = {
|
GConst.TOUCH_EVENT = {
|
||||||
|
|||||||
@ -1988,6 +1988,9 @@ function GFunc.getHeroQltImg(qlt)
|
|||||||
return GConst.ATLAS_PATH.HERO, "hero_quality_" .. qlt
|
return GConst.ATLAS_PATH.HERO, "hero_quality_" .. qlt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GFunc.getHeroIcon(icon)
|
||||||
|
return GConst.ATLAS_PATH.ICON_HERO, tostring(icon)
|
||||||
|
end
|
||||||
|
|
||||||
function GFunc.getHeroQltStr(qlt)
|
function GFunc.getHeroQltStr(qlt)
|
||||||
return I18N:getGlobalText("QLT_DESC_" .. qlt)
|
return I18N:getGlobalText("QLT_DESC_" .. qlt)
|
||||||
|
|||||||
@ -19,7 +19,7 @@ end
|
|||||||
function TaskManager:onTaskDailyStageRewardReq(dailyTaskId)
|
function TaskManager:onTaskDailyStageRewardReq(dailyTaskId)
|
||||||
local parmas = {}
|
local parmas = {}
|
||||||
parmas.id = 0
|
parmas.id = 0
|
||||||
parmas.type = 1
|
-- parmas.type = 1
|
||||||
self:sendMessage(ProtoMsgType.FromMsgEnum.TaskDailyStageRewardReq, parmas, {}, self.onTaskDailyStageRewardRsp, BIReport.ITEM_GET_TYPE.TASK_DAILY_REFRESH)
|
self:sendMessage(ProtoMsgType.FromMsgEnum.TaskDailyStageRewardReq, parmas, {}, self.onTaskDailyStageRewardRsp, BIReport.ITEM_GET_TYPE.TASK_DAILY_REFRESH)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -27,6 +27,10 @@ function TaskManager:onTaskDailyStageRewardRsp(result)
|
|||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
if result.task_daily then
|
if result.task_daily then
|
||||||
DataManager.DailyTaskData:initDaily(result.task_daily)
|
DataManager.DailyTaskData:initDaily(result.task_daily)
|
||||||
|
DataManager.DailyTaskData:setDirty()
|
||||||
|
end
|
||||||
|
if result.rewards then
|
||||||
|
GFunc.showRewardBox(result.rewards)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -55,6 +55,10 @@ function DailyChallengeUI:onLoadRootComplete()
|
|||||||
self.fightBtn:addClickListener(function ()
|
self.fightBtn:addClickListener(function ()
|
||||||
ModuleManager.DailyChallengeManager:startChallenge()
|
ModuleManager.DailyChallengeManager:startChallenge()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self:bind(DataManager.DailyChallengeData, "isDirty", function()
|
||||||
|
self:onRefresh()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyChallengeUI:updateTime()
|
function DailyChallengeUI:updateTime()
|
||||||
|
|||||||
@ -233,6 +233,7 @@ function HeroDetailUI:refreshPageBtn()
|
|||||||
self.rightBtn:setActive(false)
|
self.rightBtn:setActive(false)
|
||||||
for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
self.pageBtns[i]:setActive(false)
|
self.pageBtns[i]:setActive(false)
|
||||||
|
self.pageRedImgs[i]:setActive(false)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.leftBtn:setActive(self:isShowLeftArrow())
|
self.leftBtn:setActive(self:isShowLeftArrow())
|
||||||
|
|||||||
@ -299,6 +299,12 @@ function MainComp:refreshRedPoint()
|
|||||||
else
|
else
|
||||||
self.arenaBtn:removeRedPoint()
|
self.arenaBtn:removeRedPoint()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if DataManager.DailyChallengeData:showRedPoint() then
|
||||||
|
self.dailyChallengeBtn:addRedPoint(-70, 26, 1)
|
||||||
|
else
|
||||||
|
self.dailyChallengeBtn:removeRedPoint()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainComp:getArenaBtnPosition()
|
function MainComp:getArenaBtnPosition()
|
||||||
|
|||||||
@ -32,10 +32,9 @@ function SummonBallCell:refresh(wishHeroId, heroId, callback, select)
|
|||||||
end
|
end
|
||||||
local cfg = DataManager.HeroData:getHeroConfig(heroId)
|
local cfg = DataManager.HeroData:getHeroConfig(heroId)
|
||||||
|
|
||||||
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, cfg.icon)
|
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, tostring(cfg.icon))
|
||||||
-- self.heroBg:setSprite(GConst.ATLAS_PATH.HERO, GConst.FRAME_QLT[cfg.qlt])
|
self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, "summon_card_" .. cfg.qlt)
|
||||||
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. cfg.qlt)
|
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, "summon_card_mark_" .. cfg.qlt)
|
||||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
|
||||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
||||||
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
||||||
|
|
||||||
|
|||||||
@ -72,6 +72,7 @@ function SummonMainUI:onLoadRootComplete()
|
|||||||
|
|
||||||
self.btnWish = uiMap["summon_main_ui.node.btn_wish"] --心愿
|
self.btnWish = uiMap["summon_main_ui.node.btn_wish"] --心愿
|
||||||
self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.unlock.tx_guarantee"] --心愿
|
self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.unlock.tx_guarantee"] --心愿
|
||||||
|
self.btnWishIcon = uiMap["summon_main_ui.node.btn_wish.unlock.img_wish_icon"] --心愿
|
||||||
|
|
||||||
-- self.toggleJump = uiMap["summon_main_ui.jump_tween"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TOGGLE)
|
-- self.toggleJump = uiMap["summon_main_ui.jump_tween"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TOGGLE)
|
||||||
-- self.isJumpTween = self.toggleJump.isOn
|
-- self.isJumpTween = self.toggleJump.isOn
|
||||||
@ -338,6 +339,16 @@ function SummonMainUI:refreshWishBtn()
|
|||||||
local wishCount = DataManager.SummonData:getSummonWishCount(self.page)
|
local wishCount = DataManager.SummonData:getSummonWishCount(self.page)
|
||||||
local needCount = DataManager.SummonData:getSummonWishGuarantee2(self.page)
|
local needCount = DataManager.SummonData:getSummonWishGuarantee2(self.page)
|
||||||
self.btnWishTx:setText(wishCount .. "/" .. needCount)
|
self.btnWishTx:setText(wishCount .. "/" .. needCount)
|
||||||
|
|
||||||
|
local wishHeroId = DataManager.SummonData:getSummonWishHeroId(self.page)
|
||||||
|
local cfg = DataManager.HeroData:getHeroConfig(wishHeroId)
|
||||||
|
if cfg then
|
||||||
|
self.btnWishIcon:setSprite(GFunc.getHeroIcon(cfg.icon))
|
||||||
|
self.btnWish:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[cfg.qlt])
|
||||||
|
else
|
||||||
|
self.btnWishIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha")
|
||||||
|
self.btnWish:setSprite(GConst.ATLAS_PATH.ICON_ITEM, "frame_1")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--检查单抽红点
|
--检查单抽红点
|
||||||
|
|||||||
@ -299,4 +299,14 @@ function DailyChallengeData:markPopTask()
|
|||||||
LocalData:setChallengeTaskPopTime(self.popTaskTime)
|
LocalData:setChallengeTaskPopTime(self.popTaskTime)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--@region 红点
|
||||||
|
function DailyChallengeData:showRedPoint()
|
||||||
|
for i = 1, 3 do
|
||||||
|
if DataManager.DailyChallengeData:canClaimTask(i) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
--@endregion
|
||||||
return DailyChallengeData
|
return DailyChallengeData
|
||||||
@ -67,7 +67,7 @@ function DailyTaskData:initDaily(daily)
|
|||||||
-- 活跃度
|
-- 活跃度
|
||||||
self.dayPoint = daily.point or 0
|
self.dayPoint = daily.point or 0
|
||||||
-- 活跃度领奖
|
-- 活跃度领奖
|
||||||
self.progRewardData = daily.stage_reward_claimed or {}
|
self.progRewardData = daily.stage_claimed or {}
|
||||||
|
|
||||||
-- 任务配置
|
-- 任务配置
|
||||||
self.dailyTaskIds = {}
|
self.dailyTaskIds = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user