qinglongserect commit

dev_chengFeng
jiaoyangna 2020-08-19 14:12:42 +08:00
parent f439a78b34
commit 60095d336d
3 changed files with 23 additions and 11 deletions

View File

@ -109,6 +109,7 @@ end
this.refresh = function() this.refresh = function()
this:topBar() this:topBar()
this:showTaskList() this:showTaskList()
CheckRedPointStatus(RedPointType.QinglongSerectTreasure)
end end
--topBar按钮状态 --topBar按钮状态

View File

@ -146,6 +146,7 @@ function this.refresh(type)
this:SetSelect() this:SetSelect()
this:ShowTime(type) this:ShowTime(type)
this:showTaskList(type) this:showTaskList(type)
CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail)
end end
@ -169,7 +170,7 @@ function this:SingleTask(go, rewardSingleData)
local titleText = Util.GetGameObject(activityRewardGo, "content"):GetComponent("Text") local titleText = Util.GetGameObject(activityRewardGo, "content"):GetComponent("Text")
titleText.text = sConFigData.show titleText.text = sConFigData.show
local rewardText = Util.GetGameObject(activityRewardGo, "reward"):GetComponent("Text") local rewardText = Util.GetGameObject(activityRewardGo, "reward"):GetComponent("Text")
rewardText.text = sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])] .."/次" rewardText.text = sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name .."/次"
local getRewardProgress = Util.GetGameObject(activityRewardGo.gameObject, "getRewardProgress"):GetComponent("Text") local getRewardProgress = Util.GetGameObject(activityRewardGo.gameObject, "getRewardProgress"):GetComponent("Text")
local state = sConFigData.state local state = sConFigData.state
local value = sConFigData.taskValue[2][1] local value = sConFigData.taskValue[2][1]
@ -183,7 +184,7 @@ function this:SingleTask(go, rewardSingleData)
lingquButton:GetComponent("Image").sprite = Util.LoadSprite(type[state].sprite) lingquButton:GetComponent("Image").sprite = Util.LoadSprite(type[state].sprite)
text.text = type[state].text text.text = type[state].text
if state == 1 then if state == 1 then
text.text = sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])] text.text = sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name
end end
Util.AddOnceClick(lingquButton, function() Util.AddOnceClick(lingquButton, function()
if state == 1 then if state == 1 then

View File

@ -58,15 +58,17 @@ function this.UpdateTreasureState()
end end
end end
local TreasureRewardState = ActivityGiftManager.GetActivityTypeInfo(8) local TreasureRewardState = ActivityGiftManager.GetActivityTypeInfo(8)
--state -2 未达成 -1 普通和额外全部领取 0未领取 1激活秘宝可以再次领取 if TreasureRewardState then
if TreasureRewardState.mission then --state -2 未达成 -1 普通和额外全部领取 0未领取 1激活秘宝可以再次领取
for k,v in ipairs(TreasureRewardState.mission) do if TreasureRewardState.mission then
if level >= v.missionId then for k,v in ipairs(TreasureRewardState.mission) do
rewardData[v.missionId].state = v.state if level >= v.missionId then
else rewardData[v.missionId].state = v.state
rewardData[v.missionId].state = -2 else
end rewardData[v.missionId].state = -2
end end
end
end
end end
end end
@ -149,6 +151,10 @@ function this.GetQinglongTaskData(_curtype)
end end
function this.GetQinglongSerectTreasureRedPot() function this.GetQinglongSerectTreasureRedPot()
local id =ActivityGiftManager.GetActivityIdByType(8)
if not ActivityGiftManager.GetActivityOpenStatus(id) then
return false
end
local state = this.GetTreasureState() local state = this.GetTreasureState()
for i, v in pairs(rewardData) do for i, v in pairs(rewardData) do
if i ~= 0 then if i ~= 0 then
@ -161,6 +167,10 @@ function this.GetQinglongSerectTreasureRedPot()
end end
function this.GetSerectTreasureTrailRedPot() function this.GetSerectTreasureTrailRedPot()
local id =ActivityGiftManager.GetActivityIdByType(8)
if not ActivityGiftManager.GetActivityOpenStatus(id) then
return false
end
for i = 1,2 do for i = 1,2 do
local task = this.GetQinglongTaskData(i) local task = this.GetQinglongTaskData(i)
for i, v in pairs(task) do for i, v in pairs(task) do