活动修改提交
parent
9763762e88
commit
6d79dcab9a
|
@ -23,34 +23,35 @@ end
|
|||
function this.SheJiCheckRedPoint()
|
||||
local ActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.Celebration)--活动数据
|
||||
local canGetRewardList={}
|
||||
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])
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -815,17 +815,27 @@ end
|
|||
function this.InitLeiJiChongZhiData(_type)
|
||||
local id = 0
|
||||
local type = _type
|
||||
if type == ActivityTypeDef.AccumulativeRechargeExper then
|
||||
id = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.AccumulativeRechargeExper)
|
||||
LogGreen("type")
|
||||
if type then
|
||||
id = ActivityGiftManager.IsActivityTypeOpen(type)
|
||||
if (not id) or id == 0 then
|
||||
return nil
|
||||
end
|
||||
elseif type == ActivityTypeDef.DynamicAct_recharge then
|
||||
id = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.DynamicAct_recharge)
|
||||
else
|
||||
id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.AccumulativeRechargeExper)
|
||||
if (not id) or id == 0 then
|
||||
return nil
|
||||
id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.type)
|
||||
if (not id) or id == 0 then
|
||||
return nil
|
||||
end
|
||||
else
|
||||
local tempConfig = ConfigManager.GetConfigData(ConfigName.GlobalActivity,id)
|
||||
if tempConfig and tempConfig.ShowArt == 1 then
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
this.LeiJiChongZhiData = {}
|
||||
local allListData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig, "ActivityId", id)
|
||||
local allMissionData = ActivityGiftManager.GetActivityTypeInfo(type)
|
||||
|
|
Loading…
Reference in New Issue