【排行榜】修复膜拜后页签红点刷新不及时,修复跨服前七天跨服按钮会显示红点
parent
f4912f5772
commit
34a58a310c
|
|
@ -11,6 +11,7 @@ local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
|||
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1),
|
||||
lock = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
||||
}
|
||||
local _TabRedpot = {}
|
||||
local ranks = {}
|
||||
local proud = {}
|
||||
this.playerScrollHead = {}--排行第一头像
|
||||
|
|
@ -64,12 +65,11 @@ function this.TabAdapter(tab, index, status)
|
|||
tabLab:GetComponent("Text").text = GetCurLanguage() ~= 2 and _TabData[index].name or "<size=40>".._TabData[index].name.."</size>"
|
||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||
Util.GetGameObject(tab, "LockImage"):SetActive(status == "lock" )
|
||||
if index == 1 then
|
||||
Util.GetGameObject(tab, "Redpot"):SetActive(RankingManager.RefreshRedPoint1())
|
||||
else
|
||||
Util.GetGameObject(tab, "Redpot"):SetActive(RankingManager.RefreshRedPoint2())
|
||||
end
|
||||
end-- tab可用性检测
|
||||
-- 刷新红点显示
|
||||
_TabRedpot[index] = Util.GetGameObject(tab, "Redpot")
|
||||
this.RefreshTabRedpot(index)
|
||||
end
|
||||
-- tab可用性检测
|
||||
function this.PageTabIsLockCheck(index)
|
||||
if index == 2 then
|
||||
-- 开服前七天, 未跨服都不打开跨服排行榜
|
||||
|
|
@ -80,6 +80,17 @@ function this.PageTabIsLockCheck(index)
|
|||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function this.RefreshTabRedpot(index)
|
||||
if _TabRedpot[index] then
|
||||
if index == 1 then
|
||||
_TabRedpot[index]:SetActive(RankingManager.RefreshRedPoint1())
|
||||
else
|
||||
_TabRedpot[index]:SetActive(RankingManager.RefreshRedPoint2())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--切换视图
|
||||
function this.SwitchView(index)
|
||||
curIndex = index
|
||||
|
|
@ -158,6 +169,8 @@ function this.SingleRankKingListShow(indexm,id)
|
|||
PopupTipPanel.ShowTip(Language[11676]..GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,tonumber(itemData[1])).Name).."×"..itemData[2].."!")
|
||||
this.SwitchView(curIndex)
|
||||
CheckRedPointStatus(RedPointType.RankingSort)
|
||||
-- 刷新红点显示
|
||||
this.RefreshTabRedpot(curIndex)
|
||||
end)
|
||||
end)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -146,11 +146,11 @@ end
|
|||
|
||||
--膜拜红点
|
||||
function this.RefreshRedPoint()
|
||||
local redPoint = this.RefreshRedPoint1()--本服
|
||||
if not redPoint then
|
||||
redPoint = this.RefreshRedPoint2()--跨服
|
||||
end
|
||||
return redPoint
|
||||
local redPoint = this.RefreshRedPoint1()--本服
|
||||
if not redPoint then
|
||||
redPoint = this.RefreshRedPoint2()--跨服
|
||||
end
|
||||
return redPoint
|
||||
end
|
||||
|
||||
--本服膜拜红点
|
||||
|
|
@ -175,6 +175,9 @@ end
|
|||
|
||||
--跨服膜拜红点
|
||||
function this.RefreshRedPoint2()
|
||||
if GetTimeStamp() - PlayerManager.GetServerOpenTime() < 7*24*60*60 or PlayerManager.isCross == 0 then
|
||||
return false
|
||||
end
|
||||
if (ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALLRANKING)) then
|
||||
local proud = RankingManager.GetRankProud()
|
||||
local allFirstRankProud = RankingManager.GetAllFirstRankProud()
|
||||
|
|
|
|||
Loading…
Reference in New Issue