【ID1010975】

【优化】超值返利每日首次登陆有红点提示
dev_chengFeng
jiaoyangna 2021-12-29 17:10:48 +08:00
parent 577752e71d
commit f0a4cec767
7 changed files with 33 additions and 0 deletions

View File

@ -1026,6 +1026,8 @@ RedPointType = {
recruitTreasure_two = 7012,
recruitTreasure_three = 7013,
LingMaiMiJing = 920,--灵脉秘境
chaozhifanli = 90001,
}
RedPointStatus = {

View File

@ -1353,6 +1353,12 @@ function TimeToDHM(second)
return string.format(Language[11390],day, hour, minute)
end
--- 将一段时间转换为天
function TimeToD(second)
local day = math.floor(second / (24 * 3600))
return day,string.format("%s天",day)
end
--- 将一段时间转换为天时
function TimeToDH(second)
local day = math.floor(second / (24 * 3600))

View File

@ -123,6 +123,12 @@ function PremiumRebatePanel:ShowSingleHero(go,_data,index)
local btnText = Util.GetGameObject(go, "btnGet/Text"):GetComponent("Text")
local btnImg = Util.GetGameObject(go, "btnGet"):GetComponent("Image")
local missionConfigData = this.actConfigData[index]
if missionConfigData then
go.gameObject:SetActive(false)
return
else
go.gameObject:SetActive(true)
end
title.text = missionConfigData.ContentsShow
if not this.itemViewList[go] then
this.itemViewList[go] = {}

View File

@ -608,6 +608,7 @@ function this.IsActivityOpenByJumpIndex(pageIndex, jumpIndex)
end
-- 玩家是否有资格开启
function this.IsQualifiled(id)
-- 相同类型活动解锁类型相同,所以只判断第一个
@ -843,4 +844,16 @@ function this.XunBaoMiZongRedCheck()
end
end
function this.CheckRedPointPremium()
local day = TimeToD(GetTimeStamp())
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.chaozhifanli) then
if PlayerPrefs.GetInt("chaozhifanli"..PlayerManager.uid) ~= day then
return true
else
return false
end
end
return false
end
return this

View File

@ -1073,6 +1073,9 @@ function this:TabBtnAction(id,actType,data)
UIManager.OpenPanel(UIName.ArenaTrialPanel)
elseif id == ActivityTypeDef.chaozhifanli then
UIManager.OpenPanel(UIName.PremiumRebatePanel)
local day = TimeToD(GetTimeStamp())
PlayerPrefs.SetInt("chaozhifanli"..PlayerManager.uid,day)
CheckRedPointStatus(RedPointType.chaozhifanli)
end
elseif actType == 2 then
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then

View File

@ -354,6 +354,7 @@ function this.RefreshUpdateIndication(buffer)
PlayerManager.ResetLocalData(1)--初始化所有本地的每日一刷--1是五点推送、2是登陆检测
GuildTranscriptManager.SetCanSweep1()
DeathPosManager.InitData()--十绝阵跨天状态刷新
CheckRedPointStatus(RedPointType.chaozhifanli)
end
function this.ZeroRefreshUpdateIndication()

View File

@ -647,6 +647,8 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.recruitTreasure_three,RecruitTreasureManager.GetRedPointStatus)
--命格
RPData:AddCheckFunc(RedPointType.Gem,GemManager.RedPointCheck,FUNCTION_OPEN_TYPE.Gem)
RPData:AddCheckFunc(RedPointType.chaozhifanli,DynamicActivityManager.CheckRedPointPremium)
end
-- 向红点绑定物体