From de0b9be884c069c9d519b9961a1d46e806b5e4f8 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 30 Jun 2021 11:36:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A6=96=E5=85=85=E5=92=8C?= =?UTF-8?q?=E8=87=B3=E5=B0=8A=E9=99=8D=E4=B8=96=E7=9A=84=20=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Main/MainPanel.lua | 4 -- .../Popup/RewardItemSingleShowPopup.lua | 39 ++++++++++++++++++- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index fc82eeb90e..e5e7a19de0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -942,10 +942,6 @@ function this:OnShow() this.RefreshGiftBtnShow() -- 刷新一次编队战斗力 FormationManager.RefreshMainFormationPower() - - - -- 主界面time创建 - endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.SupremeHero) this.TimeFormat() if not this._TimeCounter then this._TimeCounter = Timer.New(this.TimeFormat, 1, -1, true) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua index 25a04e886f..352d7334cc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua @@ -325,8 +325,43 @@ function RewardItemSingleShowPopup:OnShow() for i = 1, #jumpDataList do if not RECHARGEABLE and (JumpConfig[jumpDataList[i]] == JumpType.firstRecharge or JumpConfig[jumpDataList[i]] == JumpType.ZhiZunJiangShi) then--(是否开启充值) else - local tempView = SubUIManager.Open(SubUIConfig.JumpViewNew, this.equipProGrid.transform, jumpDataList[i],heroConfig,self) - table.insert(this.jumpViewList,tempView) + local isShow = true + if JumpConfig[jumpDataList[i]] == JumpType.firstRecharge then + local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FirstRecharge) + if id and id > 0 then + local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",id) + for i = 1,#configs do + if configs[i].Reward[1][1] == heroConfig.Id then + local mission = ActivityGiftManager.GetActivityInfo(ActivityTypeDef.FirstRecharge, configs[i].Id) + if mission.state ~= 1 then + isShow = true + else + isShow = false + end + break + end + end + else + isShow = false + end + elseif JumpConfig[jumpDataList[i]] == JumpType.ZhiZunJiangShi then + local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.SupremeHero) + if id and id > 0 then + if ActivityGiftManager.GetRewardState(42)~=3 then + local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.SupremeHero) + if endTime - PlayerManager.serverTime > 0 then + isShow = true + else + isShow = false + end + else + isShow = false + end + end + if isShow then + local tempView = SubUIManager.Open(SubUIConfig.JumpViewNew, this.equipProGrid.transform, jumpDataList[i],heroConfig,self) + table.insert(this.jumpViewList,tempView) + end end end this.scroll:GetComponent("RectTransform").sizeDelta = Vector2.New(912.8,717.6)