优化显示
This commit is contained in:
parent
c4af5f7e5e
commit
1979075235
@ -43,6 +43,7 @@ local LOCAL_DATA_KEY = {
|
|||||||
NOT_POP_TODAY = "NOT_POP_TODAY",
|
NOT_POP_TODAY = "NOT_POP_TODAY",
|
||||||
FOURTEEN_DAY_TODAY_EXCHANGE = "FOURTEEN_DAY_TODAY_EXCHANGE",
|
FOURTEEN_DAY_TODAY_EXCHANGE = "FOURTEEN_DAY_TODAY_EXCHANGE",
|
||||||
ACT_BOSS_RUSH_EXCHANGE = "ACT_BOSS_RUSH_EXCHANGE",
|
ACT_BOSS_RUSH_EXCHANGE = "ACT_BOSS_RUSH_EXCHANGE",
|
||||||
|
ACT_PVP_SHOW_HELP = "ACT_PVP_SHOW_HELP",
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalData.KEYS = LOCAL_DATA_KEY
|
LocalData.KEYS = LOCAL_DATA_KEY
|
||||||
@ -492,4 +493,14 @@ function LocalData:recordTodayBossRushExchangeWatched()
|
|||||||
self:setInt(LOCAL_DATA_KEY.ACT_BOSS_RUSH_EXCHANGE, Time:getBeginningOfServerToday())
|
self:setInt(LOCAL_DATA_KEY.ACT_BOSS_RUSH_EXCHANGE, Time:getBeginningOfServerToday())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function LocalData:getActPvpShowHelpTag(actId)
|
||||||
|
actId = actId or 0
|
||||||
|
return self:getInt(LOCAL_DATA_KEY.ACT_PVP_SHOW_HELP .. actId, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
function LocalData:recordActPvpShowHelpTag(actId)
|
||||||
|
actId = actId or 0
|
||||||
|
self:setInt(LOCAL_DATA_KEY.ACT_PVP_SHOW_HELP .. actId, 1)
|
||||||
|
end
|
||||||
|
|
||||||
return LocalData
|
return LocalData
|
||||||
@ -175,6 +175,7 @@ function ActPvpManager:rspRefreshHero(result)
|
|||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
DataManager.ActPvpData:addFlushCount()
|
DataManager.ActPvpData:addFlushCount()
|
||||||
DataManager.ActPvpData:updateSelectInfo(result.pair_id, result.next_select_four_id)
|
DataManager.ActPvpData:updateSelectInfo(result.pair_id, result.next_select_four_id)
|
||||||
|
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {refreshHero = true})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,10 @@ function ActPvpMainUI:getPrefabPath()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ActPvpMainUI:onLoadRootComplete()
|
function ActPvpMainUI:onLoadRootComplete()
|
||||||
|
if not DataManager.ActPvpData:getActPvpShowHelpTag() then
|
||||||
|
DataManager.ActPvpData:recordActPvpShowHelpTag()
|
||||||
|
ModuleManager.ActPvpManager:showHelpUI()
|
||||||
|
end
|
||||||
self:_display()
|
self:_display()
|
||||||
self:_addListeners()
|
self:_addListeners()
|
||||||
self:_bind()
|
self:_bind()
|
||||||
|
|||||||
@ -76,6 +76,7 @@ function ActPvpSelectUI:_display()
|
|||||||
unit.nextBg2Match = uiMap[prefix .. ".next_node.bg_2.match_img"]
|
unit.nextBg2Match = uiMap[prefix .. ".next_node.bg_2.match_img"]
|
||||||
unit.selectBtn = uiMap[prefix .. ".select_btn"]
|
unit.selectBtn = uiMap[prefix .. ".select_btn"]
|
||||||
unit.selectDesc = uiMap[prefix .. ".select_btn.tx_desc"]
|
unit.selectDesc = uiMap[prefix .. ".select_btn.tx_desc"]
|
||||||
|
unit.clickMask = uiMap[prefix .. ".info.click_mask"]
|
||||||
self.bigHeroInfos[i] = unit
|
self.bigHeroInfos[i] = unit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -162,6 +163,8 @@ function ActPvpSelectUI:_addListeners()
|
|||||||
self.aniSeq:AppendCallback(function()
|
self.aniSeq:AppendCallback(function()
|
||||||
self:_display()
|
self:_display()
|
||||||
end)
|
end)
|
||||||
|
elseif params and params.refreshHero then
|
||||||
|
self:_display()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -188,6 +191,9 @@ function ActPvpSelectUI:refreshSelectInfo()
|
|||||||
local heroEntity = DataManager.HeroData:getEntity({id = heroId, level = DataManager.ActPvpData:getHeroLv()})
|
local heroEntity = DataManager.HeroData:getEntity({id = heroId, level = DataManager.ActPvpData:getHeroLv()})
|
||||||
self.heroEntities[inedx] = heroEntity
|
self.heroEntities[inedx] = heroEntity
|
||||||
unit.node:setVisible(true)
|
unit.node:setVisible(true)
|
||||||
|
unit.clickMask:addClickListener(function()
|
||||||
|
ModuleManager.HeroManager:showHeroDetailUI(heroId, true)
|
||||||
|
end)
|
||||||
unit.simpleHeroCell:refresh(heroEntity)
|
unit.simpleHeroCell:refresh(heroEntity)
|
||||||
unit.simpleHeroCell:getBaseObject():setActive(false)
|
unit.simpleHeroCell:getBaseObject():setActive(false)
|
||||||
unit.info:setSprite(GConst.ATLAS_PATH.COMMON, INFO_BG[heroEntity:getQlt()])
|
unit.info:setSprite(GConst.ATLAS_PATH.COMMON, INFO_BG[heroEntity:getQlt()])
|
||||||
|
|||||||
@ -111,9 +111,9 @@ function ActPvpData:getIsOpen()
|
|||||||
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
-- if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到
|
if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到
|
||||||
-- return false
|
return false
|
||||||
-- end
|
end
|
||||||
local time = Time:getServerTime()
|
local time = Time:getServerTime()
|
||||||
return self.endTime > time and time > self.startTime
|
return self.endTime > time and time > self.startTime
|
||||||
end
|
end
|
||||||
@ -441,6 +441,9 @@ function ActPvpData:canGetRankReward()
|
|||||||
if not self:isFinalDay() then
|
if not self:isFinalDay() then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
if self.selfRank and self.selfRank <= 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
return not self.gotRankRewards
|
return not self.gotRankRewards
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -677,4 +680,20 @@ function ActPvpData:getBountyRp()
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ActPvpData:getActPvpShowHelpTag()
|
||||||
|
if self.showHelpTag == nil then
|
||||||
|
self.showHelpTag = LocalData:getActPvpShowHelpTag(self.activity_id or ACT_ID) == 1
|
||||||
|
end
|
||||||
|
return self.showHelpTag
|
||||||
|
end
|
||||||
|
|
||||||
|
function ActPvpData:recordActPvpShowHelpTag()
|
||||||
|
if self.showHelpTag then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
self.showHelpTag = true
|
||||||
|
LocalData:recordActPvpShowHelpTag(self.activity_id or ACT_ID)
|
||||||
|
end
|
||||||
|
|
||||||
return ActPvpData
|
return ActPvpData
|
||||||
Loading…
x
Reference in New Issue
Block a user