[飘渺之旅]======红点修改提交

dev_chengFeng
wangzhenxing 2022-07-25 15:37:56 +08:00
parent b0dfb411b8
commit e488e98680
4 changed files with 30 additions and 15 deletions

View File

@ -1293,26 +1293,31 @@ function this.GetJourneyWithWindDayAmount()
end end
--判断当前奖励是否可领取 --判断当前奖励是否可领取
function this.SingleJourneyWithWindRewardNoGet(curRewardTaskData) function this.SingleJourneyWithWindRewardNoGet(curRewardTaskData)
if curRewardTaskData then if MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD) and MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.GIFT) then
local dayNumConFig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,curRewardTaskData.missionId) if curRewardTaskData then
local curServerDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400) local dayNumConFig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,curRewardTaskData.missionId)
-- LogYellow(curRewardTaskData.missionId .. " curRewardTaskData.state "..curRewardTaskData.state.." curRewardTaskData.progress "..curRewardTaskData.progress.." JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] "..JourneyWithWindDayAmount[dayNumConFig.Values[1][2]]) local curServerDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
if curRewardTaskData.state == 0 and dayNumConFig and curServerDay >= dayNumConFig.Values[1][2] and curRewardTaskData.progress >= JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] then -- LogYellow(curRewardTaskData.missionId .. " curRewardTaskData.state "..curRewardTaskData.state.." curRewardTaskData.progress "..curRewardTaskData.progress.." JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] "..JourneyWithWindDayAmount[dayNumConFig.Values[1][2]])
return true if curRewardTaskData.state == 0 and dayNumConFig and curServerDay >= dayNumConFig.Values[1][2] and curRewardTaskData.progress >= JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] then
end return true
end
end
end end
return false return false
end end
--缥缈之旅红点检测 --缥缈之旅红点检测
function this.JourneyWithWindAllRedPointState() function this.JourneyWithWindAllRedPointState()
local idJourneyWithWind = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.JourneyWithWind) if MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD) and MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.GIFT) then
if idJourneyWithWind and idJourneyWithWind > 0 then local idJourneyWithWind = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.JourneyWithWind)
local redpointstate = this.JourneyWithWindRewardNoGet() if idJourneyWithWind and idJourneyWithWind > 0 then
if redpointstate then local redpointstate = this.JourneyWithWindRewardNoGet()
return true if redpointstate then
end return true
if this.JourneyWithWindCurDayNoOpen() then end
return true if this.JourneyWithWindCurDayNoOpen() then
return true
end
end end
end end
return false return false

View File

@ -293,6 +293,14 @@ function this:OnRefreshRedPoint()
-- 章节红点 -- 章节红点
local hadChpater = ActivityGiftManager.CheckChapterRed() local hadChpater = ActivityGiftManager.CheckChapterRed()
-- 缥缈之旅红点 -- 缥缈之旅红点
if MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD) and MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.GIFT) then
local hadJourneyWithWind = ActivityGiftManager.JourneyWithWindAllRedPointState()
this.btnJourneyWithWindRedPoint:SetActive(hadJourneyWithWind)
else
local aaa=PlayerPrefs.GetInt(PlayerManager.uid.."piaomiaozhilv")
this.btnJourneyWithWindRedPoint:SetActive(aaa==0)
end
local hadJourneyWithWind = ActivityGiftManager.JourneyWithWindAllRedPointState() local hadJourneyWithWind = ActivityGiftManager.JourneyWithWindAllRedPointState()
this.expeditionRedPoint:SetActive(hadExplore) this.expeditionRedPoint:SetActive(hadExplore)
this.onlineRedPoint:SetActive(hadOnline) this.onlineRedPoint:SetActive(hadOnline)

View File

@ -106,6 +106,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function JourneyWithWindPanel:OnShow() function JourneyWithWindPanel:OnShow()
PlayerPrefs.SetInt(PlayerManager.uid.."piaomiaozhilv",1)
activityData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.JourneyWithWind) activityData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.JourneyWithWind)
this.ShowDayBtnsData() this.ShowDayBtnsData()
this.ShowDayData(curDayIndex) this.ShowDayData(curDayIndex)

View File

@ -107,6 +107,7 @@ function this.ResetLocalData(var)--初始化所有本地的每日一刷--1是五
PlayerPrefs.SetInt(PlayerManager.uid.."GeneralPopup_ChangeHeroProConfirm",0) PlayerPrefs.SetInt(PlayerManager.uid.."GeneralPopup_ChangeHeroProConfirm",0)
PlayerPrefs.SetInt("IsCheckWeekCard_"..PlayerManager.uid, 0) PlayerPrefs.SetInt("IsCheckWeekCard_"..PlayerManager.uid, 0)
PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 0) PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 0)
PlayerPrefs.SetInt(PlayerManager.uid.."piaomiaozhilv", 0)
PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen,0) PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen,0)
end end