From b41e5ed0b6e192c45ba27c57a59380376b1b198d Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 28 Oct 2021 16:38:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90ID1018877=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E5=A5=BD=E6=84=9F=E5=BA=A6=E9=80=8D=E9=81=A5=E6=B8=B8=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=91=E4=BA=91=E6=B8=B8=E5=80=BC=E6=B6=88=E8=80=97?= =?UTF-8?q?=E8=BF=98=E5=89=A95=E7=82=B9=E4=B8=8D=E8=B6=B3=E4=BB=A5?= =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E6=93=8D=E4=BD=9C=EF=BC=8C=E4=BD=86=E6=98=AF?= =?UTF-8?q?=E7=BA=A2=E7=82=B9=E6=B2=A1=E6=9C=89=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Likability/LikeAbilityPanel.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Likability/LikeAbilityPanel.lua b/Assets/ManagedResources/~Lua/Modules/Likability/LikeAbilityPanel.lua index 5678bf86fe..b231d45a6b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Likability/LikeAbilityPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Likability/LikeAbilityPanel.lua @@ -142,6 +142,7 @@ function LikeAbilityPanel:OnShow() self.btnXiaoYaoLock.gameObject:SetActive(false) end self.btnXiaoYaoText.text=string.format("%d/%d",BagManager.GetItemCountById(UpViewRechargeType.YunYouVle),PrivilegeManager.GetPrivilegeNumber(39)) + CheckRedPointStatus(RedPointType.XiaoYaoYouRedPoint) end function LikeAbilityPanel:UpdateTopLayoutPanel() From 413d98fe8239f4609806f0e9ba27b461c0c72bc5 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 28 Oct 2021 17:28:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90ID1010609=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E5=95=86=E5=BA=97=E4=BC=98=E5=8C=96=E3=80=91=E9=AD=82=E5=8D=B0?= =?UTF-8?q?=E5=95=86=E5=BA=97=E5=87=BA=E7=8E=B0=E7=BA=A2=E8=89=B2=E9=AD=82?= =?UTF-8?q?=E5=8D=B0=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=8C=E6=AC=A1=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/View/ShopView.lua | 58 ++++++++++++++----- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/Assets/ManagedResources/~Lua/View/ShopView.lua b/Assets/ManagedResources/~Lua/View/ShopView.lua index b8661e727b..5b81606f8a 100644 --- a/Assets/ManagedResources/~Lua/View/ShopView.lua +++ b/Assets/ManagedResources/~Lua/View/ShopView.lua @@ -75,6 +75,29 @@ function this:InitComponent() self.RechargeScrollView.elastic = false end end + +local RefreshShop = function(isPopUp,currentTime,isAutoRecover,shopType) + if (isPopUp ~= currentTime) and not isAutoRecover then + local shopInfo = ShopManager.GetShopInfoByType(shopType) + local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2] + local refreshNum = PrivilegeManager.GetPrivilegeUsedTimes(shopInfo.RefreshPrivilege) + local costNum = CalculateCostCount(refreshNum, abcd) + local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) + local costName = GetLanguageStrById(itemConfig[costId].Name) + local str = string.format(Language[12030], 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 + ShopManager.RequestRefreshShop(shopType, false) + end, Language[10731], Language[10732],nil,true) + else + ShopManager.RequestRefreshShop(shopType, false) + end +end + --绑定事件(用于子类重写) function this:BindEvent() local localSelf = self @@ -84,25 +107,28 @@ function this:BindEvent() local currentTime = os.date("%Y%m%d", PlayerManager.serverTime) local shopType = localSelf.ShopType local isAutoRecover = ShopManager.IsAutoRecoverCount(shopType) - if (isPopUp ~= currentTime) and not isAutoRecover then - local shopInfo = ShopManager.GetShopInfoByType(shopType) - local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2] - local refreshNum = PrivilegeManager.GetPrivilegeUsedTimes(shopInfo.RefreshPrivilege) - local costNum = CalculateCostCount(refreshNum, abcd) - local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) - local costName = GetLanguageStrById(itemConfig[costId].Name) - local str = string.format(Language[12030], 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 .. localSelf.ShopType, currentTime) + if shopType == SHOP_TYPE.SOUL_PRINT_SHOP then + local itemlist = ShopManager.CheckShopItemList(self.ShopData.storeItem) + local isShow = false + for k,v in pairs(itemlist) do + local goods = ShopManager.GetShopItemGoodsInfo(v.id) + local con = ConfigManager.GetConfigData(ConfigName.ItemConfig,goods[1][1]) + if con.Quantity >= 6 then + isShow = true end - ShopManager.RequestRefreshShop(shopType, false) - end, Language[10731], Language[10732],nil,true) + end + if isShow then + MsgPanel.ShowTwo("当前商店存在红色魂印,刷新后将会消失,是否确认刷新?", function() + end, function() + RefreshShop(isPopUp,currentTime,isAutoRecover,shopType) + end, Language[10731], Language[10732],nil,false) + else + RefreshShop(isPopUp,currentTime,isAutoRecover,shopType) + end else - ShopManager.RequestRefreshShop(localSelf.ShopType, false) + RefreshShop(isPopUp,currentTime,isAutoRecover,shopType) end + -- 重置商店刷新按钮点击状态 ShopManager.SetShopRefreshBtnClickStatus(localSelf.ShopType, true)