From a7de41458950030b9ed3006db7a695aaf4e905c1 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Sat, 29 May 2021 18:27:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=99=90=E6=97=B6=E6=8A=BD=E5=8D=A1=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8]=20=E6=8A=BD=E5=8D=A1=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E5=B1=95=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DynamicActivity/QianKunBoxBuyTenPanel.lua | 1 - .../DynamicActivity/TimeLimitUpHero.lua | 3 +-- .../Popup/View/GeneralPopup_RecruitReward.lua | 23 +++++++++---------- .../Modules/Recruit/SingleRecruitPanel.lua | 4 ++++ 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua index 37ec248d52..b68dca1380 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua @@ -175,7 +175,6 @@ function QianKunBoxBuyTenPanel:OnOpen(...) end) this.views = {} this.itemDataList = itemDataList - LogError("item len=="..#itemDataList) local dataNum = #itemDataList > 10 and 10 or #itemDataList for i = dataNum, 1, -1 do Util.ClearChild(this.contentList[i].transform) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua index e0af934f92..895418213c 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua @@ -274,7 +274,6 @@ function TimeLimitUpHero:Recruit(actId,type,itemId) --记录妖晶抽卡 if itemId==16 then - LogError("记录妖晶次数") PrivilegeManager.RefreshPrivilegeUsedTimes(self.yaojingMaxTimeId,recrutType)--记录妖晶抽卡次数 end if type == 1 then @@ -394,7 +393,7 @@ function TimeLimitUpHero:RefreshNextLevelReward() Util.GetGameObject(self.slider.gameObject,"Text"):GetComponent("Text").text="300/300" self.sliderText.text="奖励已全部领取" Util.AddOnceClick(self.getBtn,function() - UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecrutReward,self.actType,self.actId) + UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecrutReward,self.actType,self.actId,curHeroId) end) else self.slider.gameObject:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua index 3dc5c6a27a..0d5a28d827 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua @@ -45,21 +45,20 @@ function this:OnShow(_parent,...) -- local maxtimesId = lotterySetting[singleRecruit.Id].MaxTimes curtimes = OperatingManager.TimeLimitedTimes - local wishConfig=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId) - if not wishConfig then - LogError("") - return - end local reward=nil - for i = 1,#wishConfig.UpList do - if wishConfig.UpList[i][1]==heroId then - reward=wishConfig.RewardList[i] - end - end data = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig, "ActivityId", curActivityId) - --替换奖励数据 - for i = 1, #data do + local wishConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId) + if wishConfig then + LogError("curActivityId=="..curActivityId.." heroId=="..heroId) + for i = 1,#wishConfig.UpList do + if wishConfig.UpList[i][1]==heroId then + reward=wishConfig.RewardList[i] + end + end + --替换奖励数据 + for i = 1, #data do data[i].Reward[1][1]=reward[i] + end end this:RefreshRewarid() this.curtimes.text = "当前已招募次数:" .. curtimes diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index 354d956053..14aa100aab 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -153,6 +153,10 @@ function SingleRecruitPanel:BindEvent() end) --确定按钮 Util.AddClick(self.goBtn,function() + if recruitType and recruitType[1]==RecruitType.PrayerSingle then + self:ClosePanel() + return + end if state==1 then this.goBtn:SetActive(false) this.againBtn:SetActive(true)