diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 49f858f115..2aa6d1f398 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -937,6 +937,7 @@ RedPointType = { XiaoYaoYouRedPoint=10009, --显示祈愿 TimeLimitWish = 10010, + TimeLimitWishStore=10011, --灵兽 PokemonMainCity = 790,--灵兽主界面 Pokemon_UpLv = 791,--灵兽升级 @@ -2718,6 +2719,7 @@ DirectBuyType = { ZHENQIBAOGE = 23, --珍奇宝阁 XINRENSHANGCHENG = 30, --新人商城 linglongShagnshi = 40, + XIANSHIMIBAO = 51, --限时招募秘宝 } --新月卡类型定义 MONTH_CARD_TYPE = { diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua index 2ca0d0c702..1d3e2e3cef 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua @@ -61,6 +61,8 @@ function TimeLimitUpHero:InitComponent() self.dragView=Util.GetGameObject(self.mask1,"dragView") self.btn_hero=Util.GetGameObject(self.gameObject,"btngroup/btn_hero") self.lsth = Util.GetGameObject(self.gameObject,"btngroup/zqbg") + self.zqbgRed = Util.GetGameObject(self.gameObject,"btngroup/zqbg/red") + BindRedPointObject(RedPointType.TimeLimitWishStore,self.zqbgRed) self.heroIcon=Util.GetGameObject(self.btn_hero,"Icon"):GetComponent("Image") self.callTimeImg=Util.GetGameObject(self.gameObject,"callTimeImg"):GetComponent("Image") self.callTimeTxt=Util.GetGameObject(self.gameObject,"callTimeImg/Text"):GetComponent("Text") @@ -76,6 +78,7 @@ function TimeLimitUpHero:InitComponent() self.mask2 = Util.GetGameObject(self.gameObject,"Bg2/mask2") self.mask2Img = Util.GetGameObject(self.mask2,"curObj/Image"):GetComponent("Image") + end --绑定事件(用于子类重写) @@ -114,7 +117,6 @@ function TimeLimitUpHero:BindEvent() JumpManager.GoJump(40068) end) Util.AddOnceClick(self.lsth, function() - LogError("111111111") JumpManager.GoJump(40071) end) end @@ -187,7 +189,8 @@ function TimeLimitUpHero:OnShow(_sortingOrder) self:RefreshHeroData() self:RefreshGetHeroTimes() self:TimeCountDown() - self:RefreshNextLevelReward() + self:RefreshNextLevelReward() + CheckRedPointStatus(RedPointType.TimeLimitWishStore) end local lastLiveName function TimeLimitUpHero:RefreshHeroData() @@ -313,6 +316,10 @@ function TimeLimitUpHero:RefreshGetHeroTimes() Util.AddOnceClick(m.btn,sureFunc) end end +function TimeLimitUpHero:OnFocus() + CheckRedPointStatus(RedPointType.TimeLimitWishStore) +end + function TimeLimitUpHero:Recruit(actId,type,itemId) local recrutType =type==1 and 1 or 10 @@ -476,7 +483,7 @@ function TimeLimitUpHero:OnClose() self.timer:Stop() self.timer = nil end - + ClearRedPointObject(RedPointType.TimeLimitWishStore,self.zqbgRed) if UIManager.IsOpen(UIName.GeneralPopup) then UIManager.ClosePanel(UIName.GeneralPopup) end diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 8a7fa6c4b5..6a9caf675a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -646,6 +646,7 @@ function this.GetWishDrawRedPointStatus() RecruitManager.freeUseTimeList[freeTimesId]=freeTime return freeTime and freeTime >= 1 end + end function this.GetTianDiHongLuRedPointStatus() @@ -832,6 +833,25 @@ function this.CheckMonthGiftPageRedPoint() return false end +function this.CheckTimeLimitHeroStoreRedPoint() + local boughtNum = 0 + local limitNum = 0 + 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 + 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 1d7e7c5187..7f2287a412 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -348,6 +348,7 @@ function this.InitRedPointAllRelate() --命格 RPData:SetParent(RedPointType.Gem,RedPointType.Practice_main) + RPData:SetParent(RedPointType.TimeLimitWishStore,RedPointType.TimeLimitWish) --战力冲刺 RPData:SetParent(RedPointType.PowerRiceGool,RedPointType.PowerRice) RPData:SetParent(RedPointType.eastSeaFindGod1,RedPointType.eastSeaFindGod) @@ -524,6 +525,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.QianKunBox,OperatingManager.GetQiankunBoxRedPointStatus) -- RPData:AddCheckFunc(RedPointType.DynamicActTask, OperatingManager.CheckDynamicActTaskRed) RPData:AddCheckFunc(RedPointType.DynamicActTask_MeiRi, OperatingManager.CheckDynamicActTaskRed)