【招募秘宝】领取完奖励后,重登,中高级奖励显示可领取
parent
5f926ebbce
commit
a1f6ac1362
|
@ -14,9 +14,10 @@ function this.GetRecruitTreasureData(actId,goodsId)
|
|||
end
|
||||
local actData = ActivityGiftManager.GetActivityInfoByType(actId)
|
||||
if actData then
|
||||
for i = 1,#actData.mission do
|
||||
if this.treasureData[actId][actData.mission[i].missionId] then
|
||||
this.treasureData[actId][actData.mission[i].missionId].state = actData.mission[i].state -- -1 完美领取 1 已领取
|
||||
for i = 1,#actData.mission do
|
||||
local index = this.GetMissionIndex(this.treasureData[actId],actData.mission[i].missionId)
|
||||
if index > 0 then
|
||||
this.treasureData[actId][index].state = actData.mission[i].state -- -1 完美领取 1 已领取
|
||||
else
|
||||
LogError(string.format("招募秘宝%s中有一个不存在的missionId%s",actId,actData.mission[i].missionId))
|
||||
end
|
||||
|
@ -66,6 +67,15 @@ function this.GetConfigDataByActId(actId)
|
|||
return data
|
||||
end
|
||||
|
||||
function this.GetMissionIndex(configs,id)
|
||||
for i = 1,#configs do
|
||||
if configs[i].missionId == id then
|
||||
return i
|
||||
end
|
||||
end
|
||||
return -1
|
||||
end
|
||||
|
||||
function this.GetAllRewardData(actId,goodsId)
|
||||
local rewardData = {}
|
||||
local rewardData1 = {}
|
||||
|
|
Loading…
Reference in New Issue