[飘渺之旅]======红点修改提交
parent
b0dfb411b8
commit
e488e98680
|
@ -1293,26 +1293,31 @@ function this.GetJourneyWithWindDayAmount()
|
|||
end
|
||||
--判断当前奖励是否可领取
|
||||
function this.SingleJourneyWithWindRewardNoGet(curRewardTaskData)
|
||||
if curRewardTaskData then
|
||||
local dayNumConFig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,curRewardTaskData.missionId)
|
||||
local curServerDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
|
||||
-- LogYellow(curRewardTaskData.missionId .. " curRewardTaskData.state "..curRewardTaskData.state.." curRewardTaskData.progress "..curRewardTaskData.progress.." JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] "..JourneyWithWindDayAmount[dayNumConFig.Values[1][2]])
|
||||
if curRewardTaskData.state == 0 and dayNumConFig and curServerDay >= dayNumConFig.Values[1][2] and curRewardTaskData.progress >= JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] then
|
||||
return true
|
||||
end
|
||||
if MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD) and MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.GIFT) then
|
||||
if curRewardTaskData then
|
||||
local dayNumConFig = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,curRewardTaskData.missionId)
|
||||
local curServerDay = math.ceil((CalculateSecondsNowTo_N_OClock(0) + GetTimeStamp() - PlayerManager.userCreateTime)/86400)
|
||||
-- LogYellow(curRewardTaskData.missionId .. " curRewardTaskData.state "..curRewardTaskData.state.." curRewardTaskData.progress "..curRewardTaskData.progress.." JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] "..JourneyWithWindDayAmount[dayNumConFig.Values[1][2]])
|
||||
if curRewardTaskData.state == 0 and dayNumConFig and curServerDay >= dayNumConFig.Values[1][2] and curRewardTaskData.progress >= JourneyWithWindDayAmount[dayNumConFig.Values[1][2]] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
--缥缈之旅红点检测
|
||||
function this.JourneyWithWindAllRedPointState()
|
||||
local idJourneyWithWind = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.JourneyWithWind)
|
||||
if idJourneyWithWind and idJourneyWithWind > 0 then
|
||||
local redpointstate = this.JourneyWithWindRewardNoGet()
|
||||
if redpointstate then
|
||||
return true
|
||||
end
|
||||
if this.JourneyWithWindCurDayNoOpen() then
|
||||
return true
|
||||
if MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD) and MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.GIFT) then
|
||||
local idJourneyWithWind = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.JourneyWithWind)
|
||||
if idJourneyWithWind and idJourneyWithWind > 0 then
|
||||
local redpointstate = this.JourneyWithWindRewardNoGet()
|
||||
if redpointstate then
|
||||
return true
|
||||
end
|
||||
if this.JourneyWithWindCurDayNoOpen() then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
|
|
@ -293,6 +293,14 @@ function this:OnRefreshRedPoint()
|
|||
-- 章节红点
|
||||
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()
|
||||
this.expeditionRedPoint:SetActive(hadExplore)
|
||||
this.onlineRedPoint:SetActive(hadOnline)
|
||||
|
|
|
@ -106,6 +106,7 @@ end
|
|||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function JourneyWithWindPanel:OnShow()
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."piaomiaozhilv",1)
|
||||
activityData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.JourneyWithWind)
|
||||
this.ShowDayBtnsData()
|
||||
this.ShowDayData(curDayIndex)
|
||||
|
|
|
@ -107,6 +107,7 @@ function this.ResetLocalData(var)--初始化所有本地的每日一刷--1是五
|
|||
PlayerPrefs.SetInt(PlayerManager.uid.."GeneralPopup_ChangeHeroProConfirm",0)
|
||||
PlayerPrefs.SetInt("IsCheckWeekCard_"..PlayerManager.uid, 0)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."monthCard", 0)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."piaomiaozhilv", 0)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen,0)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue