From 0161e0158811c3807f7b011ac30d287adc52be80 Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Sun, 24 Dec 2023 10:59:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E6=84=BF=E8=A3=85=E5=A4=87=E7=8F=8D?= =?UTF-8?q?=E5=A5=87=E5=AE=9D=E9=98=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Common/GlobalDefine.lua | 1 + .../Modules/Operating/OperatingManager.lua | 34 +++++++++++++++++++ .../~Lua/Modules/Player/RedpotManager.lua | 2 ++ .../Modules/Recruit/RecruitEquipPanelNew.lua | 10 +++++- 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index ca706b7160..3f9c6b93fd 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -969,6 +969,7 @@ RedPointType = { TimeLimitWish = 10010, --奇珍宝阁红点 TimeLimitWishStore=10011, + WishEquipStore=10012, --心愿法宝抽卡商店 --灵兽 PokemonMainCity = 790,--灵兽主界面 Pokemon_UpLv = 791,--灵兽升级 diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 6688c05ffd..bee5c725e2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -929,6 +929,40 @@ function this.CheckTimeLimitHeroStoreRedPoint() end + +function this.CheckWishEquipStoreRedPoint() + local boughtNum = 0 + local limitNum = 0 + + local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish) + if isOpen==false then + return false + end + local activityId = ActivityGiftManager.IsActivityTypeOpen(20015) + if not activityId then + return false + end + local shopData = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift) + for i = 1, #shopData do + if rechargeConfig[shopData[i].goodsId].ShowType == DirectBuyType.XIANSHIMIBAO then + boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, shopData[i].goodsId) + limitNum = rechargeConfig[shopData[i].goodsId].Limit + local isCanBuy = limitNum - boughtNum >0 + if isCanBuy and rechargeConfig[shopData[i].goodsId].Price <= 0 then + return true + end + end + end + local red=DynamicActivityManager.CheckMingWangRed() + if red then + return true + end + return false + + +end + + --为限时神装写的(只有一个) function this.GetTimeLimitSkinInfoList() local giftList={} diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index 3910cc1845..fef9dd9572 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -357,6 +357,7 @@ function this.InitRedPointAllRelate() RPData:SetParent(RedPointType.Gem_2,RedPointType.Gem) RPData:SetParent(RedPointType.playerGift,RedPointType.Practice_main) RPData:SetParent(RedPointType.TimeLimitWish,RedPointType.Recruit) + RPData:SetParent(RedPointType.WishEquipStore,RedPointType.Recruit) -- RPData:SetParent(RedPointType.TimeLimitWishStore,RedPointType.TimeLimitWish)--奇珍宝阁相关红点屏蔽 --战力冲刺 RPData:SetParent(RedPointType.PowerRiceGool,RedPointType.PowerRice) @@ -539,6 +540,7 @@ function this.RegisterRedCheckFunc() -- RPData:AddCheckFunc(RedPointType.TimeLimited,OperatingManager.GetTimeLimitRedPointStatus) RPData:AddCheckFunc(RedPointType.TimeLimitWish,OperatingManager.GetWishDrawRedPointStatus) RPData:AddCheckFunc(RedPointType.TimeLimitWishStore,OperatingManager.CheckTimeLimitHeroStoreRedPoint) + RPData:AddCheckFunc(RedPointType.WishEquipStore,OperatingManager.CheckWishEquipStoreRedPoint) RPData:AddCheckFunc(RedPointType.QianKunBox,OperatingManager.GetQiankunBoxRedPointStatus) -- RPData:AddCheckFunc(RedPointType.DynamicActTask, OperatingManager.CheckDynamicActTaskRed) RPData:AddCheckFunc(RedPointType.DynamicActTask_MeiRi, OperatingManager.CheckDynamicActTaskRed) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitEquipPanelNew.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitEquipPanelNew.lua index 2dacb2156d..1cbaafff10 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitEquipPanelNew.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitEquipPanelNew.lua @@ -53,8 +53,9 @@ function RecruitEquipPanelNew:InitComponent() self.wishPre = Util.GetGameObject(self.wish,"upHeroPre") self.lsth = Util.GetGameObject(self.gameObject,"btngroup/zqbg") - self.lsth.gameObject:SetActive(false) + self.lsth.gameObject:SetActive(ActivityGiftManager.IsActivityTypeOpen(20015)~=nil) self.zqbgRed = Util.GetGameObject(self.gameObject,"btngroup/zqbg/red") + BindRedPointObject(RedPointType.WishEquipStore,self.zqbgRed) self.zqbgEffect = Util.GetGameObject(self.gameObject,"btngroup/zqbg/Fx_Circle 1") -- self.tip = Util.GetGameObject(self.panel, "tip/text"):GetComponent("Text") self.tenTip = Util.GetGameObject(self.panel, "TenTip") @@ -95,6 +96,11 @@ function RecruitEquipPanelNew:InitComponent() end end +function RecruitEquipPanelNew:OnFocus() + CheckRedPointStatus(RedPointType.WishEquipStore) +end + + function RecruitEquipPanelNew:BindEvent() Util.AddOnceClick(self.lsth, function() local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish) @@ -173,6 +179,7 @@ function RecruitEquipPanelNew:OnShow(sortingOrder) local SkeletonGraphic = self.liveNode:GetComponent("SkeletonGraphic") SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end + CheckRedPointStatus(RedPointType.WishEquipStore) end local progresss=0 @@ -326,6 +333,7 @@ function RecruitEquipPanelNew:OnDestroy() self.timer:Stop() self.timer = nil end + ClearRedPointObject(RedPointType.WishEquipStore,self.zqbgRed) for i = 1,3 do if self.upHeroPreList[i] then SubUIManager.Close(self.upHeroPreList[i].item)