From becdc2dd881a19c8010ba49df51f035cd12872d0 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Mon, 28 Dec 2020 15:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8A=BD=E5=8D=A1=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E8=BF=9E=E7=BB=AD=E5=8D=81=E8=BF=9E=E6=88=96=E5=8D=95?= =?UTF-8?q?=E6=8A=BD=E4=B9=9F=E6=9C=89=E7=A1=AE=E8=AE=A4=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Operating/OperatingManager.lua | 6 ++-- .../View/GeneralPopup_RecruitConfirm.lua | 2 +- .../Modules/Recruit/SingleRecruitPanel.lua | 28 ++++++++++++------- .../~Lua/Modules/Recruit/TenRecruitPanel.lua | 23 ++++++++++----- 4 files changed, 38 insertions(+), 21 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 6174604981..6b8bf3f41f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -40,9 +40,9 @@ function this.SetBasicValues(giftGoodsList) local rechargeConfigLocal = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId) - LogGreen("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:" - ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:" - ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes) + -- LogGreen("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:" + -- ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:" + -- ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes) if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then else if giftGoodsInfoList[rechargeConfigLocal.Type] then diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua index 0bb87121ef..56c3910061 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua @@ -85,7 +85,7 @@ function this:OnShow(_parent,...) Util.AddOnceClick(this.btn,function() this.btnClick=(this.btnClick and this.btnClick==1) and 0 or 1 - LogPink(this.btnClick) + LogPink(var..":"..this.btnClick) PlayerPrefs.SetInt(var,this.btnClick) go:SetActive(PlayerPrefs.GetInt(var)==1) end) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index 335179b6ce..939f2b2d3d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -82,16 +82,24 @@ function SingleRecruitPanel:BindEvent() return end end - RecruitManager.RecruitRequest(type,function(msg) - if d[1] == 16 and lotterySetting[type].MoneyTimes and lotterySetting[type].MoneyTimes > 0 then - PrivilegeManager.RefreshPrivilegeUsedTimes(lotterySetting[type].MoneyTimes,1)--记录妖晶限购抽卡次数 - end - PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,1)--记录抽卡次数 - for i=1, #msg.drop.Hero do - heroData = msg.drop.Hero[i] - self:UpdataPanelData(heroData) - end - end,maxTimesId) + local recruitOne = function() + RecruitManager.RecruitRequest(type,function(msg) + if d[1] == 16 and lotterySetting[type].MoneyTimes and lotterySetting[type].MoneyTimes > 0 then + PrivilegeManager.RefreshPrivilegeUsedTimes(lotterySetting[type].MoneyTimes,1)--记录妖晶限购抽卡次数 + end + PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,1)--记录抽卡次数 + for i=1, #msg.drop.Hero do + heroData = msg.drop.Hero[i] + self:UpdataPanelData(heroData) + end + end,maxTimesId) + end + local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten) + if state==0 and d[1] == 16 then + UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Single,recruitOne) + else + recruitOne() + end end) Util.AddClick(this.dragView.gameObject, function () if testLiveGO then diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua index ae7ab98ae0..6385234b79 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua @@ -52,13 +52,22 @@ function TenRecruitPanel:BindEvent() return end end - RecruitManager.RecruitRequest(type, function(msg) - if d[1] == 16 and lotterySetting[type].MoneyTimes and lotterySetting[type].MoneyTimes > 0 then - PrivilegeManager.RefreshPrivilegeUsedTimes(lotterySetting[type].MoneyTimes,10)--记录妖晶限购抽卡次数 - end - PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数 - UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, type,2) - end,maxTimesId) + local recruitTen = function() + RecruitManager.RecruitRequest(type, function(msg) + if d[1] == 16 and lotterySetting[type].MoneyTimes and lotterySetting[type].MoneyTimes > 0 then + PrivilegeManager.RefreshPrivilegeUsedTimes(lotterySetting[type].MoneyTimes,10)--记录妖晶限购抽卡次数 + end + PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数 + UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, type,2) + end,maxTimesId) + end + + local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten) + if state==0 and d[1] == 16 then + UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Ten,recruitTen) + else + recruitTen() + end end) end