From b1f95890d39889431aafd14692d751d10dceaffa Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Mon, 31 Aug 2020 13:58:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E5=B0=8A=E9=99=8D=E4=B8=96=20?= =?UTF-8?q?=E9=A2=86=E5=8F=96=E9=A1=BA=E5=BA=8Fbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Popup/SupremeHeroPopup.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua index d51e6d74a9..214d6c4cfe 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua @@ -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(" %s/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], } - this.btnText.text = textList[this.GetRewardState()] + 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()