From 274f315d2bd751e0b4039cd7cb96e1a93b2365db Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Tue, 22 Jun 2021 10:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=9C=A3=E8=B4=AD=E4=B9=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/UpStar/UpStarPre.lua | 43 +------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/UpStar/UpStarPre.lua b/Assets/ManagedResources/~Lua/Modules/UpStar/UpStarPre.lua index 97d793cecd..760c557b44 100644 --- a/Assets/ManagedResources/~Lua/Modules/UpStar/UpStarPre.lua +++ b/Assets/ManagedResources/~Lua/Modules/UpStar/UpStarPre.lua @@ -31,7 +31,6 @@ end --绑定事件(用于子类重写) function UpStarPre:BindEvent() Util.AddOnceClick(self.btnBuy.gameObject, function() - LogGreen("self.data.state:"..self.data.state) if self.data.state == 0 then PopupTipPanel.ShowTip("神将达指定星级后解锁") return @@ -51,46 +50,6 @@ function UpStarPre:BindEvent() end) end ---购买点击事件 -function UpStarPre:BuyAction(costId, costNum, shopType, itemId) - local haveNum = BagManager.GetItemCountById(costId) - local costName = ConfigManager.GetConfigData(ConfigName.ItemConfig, costId).Name - --Log("需要消耗的道具ID" .. costId) - if haveNum < costNum then - NotEnoughPopup:Show(costId) - else - local func = function(shopType, itemId) - ShopManager.RequestBuyShopItem(shopType, itemId, 1, function() - self.parent:RefreshData(nil,false,false) - CheckRedPointStatus(RedPointType.DailyGift) - CheckRedPointStatus(RedPointType.GrowthPackage) - if shopType==20 and (itemId==1107 or itemId==1110 or itemId==1111 or itemId==1108 )then - PlayerPrefs.SetString(PlayerManager.uid..PlayerManager.serverInfo.server_id.."supermeMan",666) - end - end) - end - local isPopUp = RedPointManager.PlayerPrefsGetStr(PlayerManager.uid .. shopType) - local currentTime = os.date("%Y%m%d", PlayerManager.serverTime) - if (isPopUp ~= currentTime and costNum ~= 0) then - local str = string.format(Language[11360], costNum, costName) - MsgPanel.ShowTwo(str, function() - end, function(isShow) - if (isShow) then - local currentTime = os.date("%Y%m%d", PlayerManager.serverTime) - RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. shopType, currentTime) - end - func(shopType, itemId) - end, - Language[10731], - Language[10732], - nil, - true) - else - func(shopType, itemId) - end - end -end - --添加事件监听(用于子类重写) function UpStarPre:AddListener() end @@ -180,7 +139,7 @@ function UpStarPre:SetBtn() self.price.text = MoneyUtil.GetMoneyUnitNameWithMoney(self.data.giftConfig.Price) self.buyInfo.text = string.format("限购%s次",self.data.giftConfig.Limit) - if self.data.giftData.buyTimes > 0 then + if self.data.giftData and self.data.giftData.buyTimes > 0 then self.buyInfo.text = "" self.price.text = "已购买" self.btnBuy.enabled = false