From a21d28fb83565eb200335509de506f79fb4a8e83 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 23 Oct 2020 19:38:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=9D=A5=E5=8D=81=E6=AC=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pokemon/PokemonSummonTenResultPanel.lua | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonTenResultPanel.lua b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonTenResultPanel.lua index 79f694e3ce..3631d78428 100644 --- a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonTenResultPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonTenResultPanel.lua @@ -5,6 +5,8 @@ local this=PokemonSummonTenResultPanel local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) local gameSetting=ConfigManager.GetConfig(ConfigName.GameSetting) local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig) +local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig) +local itemId=0 local itemNum=0 --抽卡小号道具数量 --活动抽卡类型(动态的数据) local drawtType={ @@ -55,20 +57,32 @@ function PokemonSummonTenResultPanel:BindEvent() self:ClosePanel() end) Util.AddClick(this.openTenAgainButton, function () - local maxtimesId=lotterySetting[this.recruitType].MaxTimes - local freeTimesId=lotterySetting[this.recruitType].FreeTimes - if(BagManager.GetItemCountById(1204)>=10 or BagManager.GetItemCountById(16)>=itemNum) then - self:ClosePanel() - RecruitManager.RecruitRequest(this.recruitType, function(msg) - PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数 - UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel,msg.drop,this.recruitType) - CheckRedPointStatus(RedPointType.QianKunBox) - end,freeTimesId) - else - --UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.DemonCrystal })--应跳到充值界面,现在是用之前的货币换取妖晶 - PopupTipPanel.ShowTip(Language[11139]) - self:ClosePanel() + local maxTimesId = lotterySetting[this.recruitType].maxTimesId + local freeTimesId = lotterySetting[this.recruitType].FreeTimesId + --是否超过每日最大上限 + if PrivilegeManager.GetPrivilegeUsedTimes(maxTimesId) + 10 > privilegeConfig[maxTimesId].Condition[1][2] then + PopupTipPanel.ShowTip(Language[11760]) + return end + --是否妖晶,是否超过每日妖晶最大上限 + if itemId == 16 then + if PrivilegeManager.GetPrivilegeUsedTimes(2006) + 10 > privilegeConfig[2006].Condition[1][2] then + PopupTipPanel.ShowTip("今日妖晶召唤次数不足!") + return + end + end + if BagManager.GetItemCountById(itemId) < itemNum then + PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492]) + return + end + RecruitManager.RecruitRequest(this.recruitType, function(msg) + PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数 + if itemId == 16 then + PrivilegeManager.RefreshPrivilegeUsedTimes(2006,10)--记录妖晶抽卡次数 + end + UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop) + --CheckRedPointStatus(RedPointType.QianKunBox) + end,freeTimesId,itemId,itemNum) end) end @@ -107,8 +121,6 @@ function PokemonSummonTenResultPanel:OnOpen(...) this.content2:SetActive(false) this.content3:SetActive(true) - - local itemId=0 local d d=RecruitManager.GetExpendData(this.recruitType) itemId=d[1]