天尊降世 领取顺序bug修复

dev_chengFeng
ZhangBiao 2020-08-31 13:58:49 +08:00
parent f4cae94b1e
commit b1f95890d3
1 changed files with 10 additions and 4 deletions

View File

@ -112,7 +112,8 @@ function SupremeHeroPopup:BindEvent()
--完成按钮
Util.AddClick(this.doneBtn,function()
if actIsOpen then
if this.GetRewardState() == 2 then
local data = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.SupremeHero)
if this.GetRewardState() == 2 and data.mission[3].state == 1 then
NetManager.GetActivityRewardRequest(0, ActivityTypeDef.SupremeHero, function (drop)
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1)
for i = 1, #missionData do
@ -190,14 +191,19 @@ function this.InitShow()
local color = finishedNum < total and "#FF0000FF" or "#F4D98AFF"
this.taskProgress.text = string.format(" <color=%s>%s</color>/3", color, finishedNum)
Util.SetGray(this.doneBtn, this.GetRewardState() ~= 2)
this.doneBtn:GetComponent("Button").enabled = this.IsMissionDone()
local data = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.SupremeHero)
Util.SetGray(this.doneBtn, (this.GetRewardState() ~= 2) or data.mission[3].state ~= 1)
this.doneBtn:GetComponent("Button").enabled = (this.IsMissionDone() and data.mission[3].state == 1)
local textList = {
[1] = Language[10366],
[2] = Language[10022],
[3] = Language[10350],
}
if (this.IsMissionDone() and data.mission[3].state ~= 1) then
this.btnText.text = textList[1]
else
this.btnText.text = textList[this.GetRewardState()]
end
-- 设置图标显示
this.SetIconAndTitle()