DynamicActivityManager = {} local this = DynamicActivityManager this.curLevel = 0 function this.Initialize() end function this.SheJiGetRankData(type,activityId,fun) local allRankData,myRankData RankingManager.InitData(type,function () allRankData,myRankData = RankingManager.GetRankingInfo() if fun then fun(allRankData,myRankData) end end,activityId) end function this.SetCurLevel(level) this.curLevel = level end function this.SheJiCheckRedPoint() local ActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.Celebration)--活动数据 local canGetRewardList={} if ActInfo then local curScore = ActInfo.mission[1].progress local actReward = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",ActInfo.activityId) local setting = ConfigManager.GetConfigDataByKey(ConfigName.GodSacrificeSetting,"ActivityId",ActInfo.activityId) --检测宝箱是否有可领取 for i = 1, #ActInfo.mission do local curLevel = curScore/actReward[1].Values[2][1] if ActInfo.mission[i].state == 0 and curLevel >= i then table.insert(canGetRewardList,ActInfo.mission[i]) end end local canGet = false --检测中央大锅是否可领取 if GetTimeStamp() > ActInfo.value and GetTimeStamp() < (ActInfo.value + setting.LastTime * 60) then --领过--进入倒计时 canGet = false elseif GetTimeStamp() > ActInfo.value and GetTimeStamp() > (ActInfo.value + setting.LastTime * 60) then --没到时间--进入倒计时 canGet = false else --可领取 canGet = true end if #canGetRewardList > 0 or canGet then return true else return false end end end return this