diff --git a/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua index 2b4962ebf4..b8cd2bd92f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua @@ -25,6 +25,11 @@ end function AdventureExploreRewardPanel:BindEvent() Util.AddClick(this.btnBack, function() self:ClosePanel() + --Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.UpgradePac) + -- if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then + + -- PlayerManager.IsGetFiveStarHero = false + -- end Game.GlobalEvent:AddEvent(GameEvent.PatFace.PatFaceSend end) end --添加事件监听(用于子类重写) diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua index 0dc872dae3..929a9a9c8d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua @@ -128,25 +128,17 @@ function this.PatFaceSpecialMonitor(v,patFaceAllData,type,starUpGiftNum) end elseif v.Type == 5 then--星级成长礼特殊处理 if starUpGiftNum then - Log("星级成长礼特殊处理 starUpGiftNum == v.Star "..starUpGiftNum .." ".. v.Star) - --Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceHaveGrowGift)--激活一次发一个 - if starUpGiftNum >= v.Star then - -- local conFigData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, v.ShopId) - -- if conFigData == nil then return end - -- local shopItemData = OperatingManager.GetGiftGoodsInfo(conFigData.Type,v.ShopId) - -- --shopItemData.startTime 大于零代表第一次开 需要拍脸 下次未购买并在时间内再次获得 shopItemData.startTime为零 - -- --shopItemData.buyTimes <= 0 今天没有购买才会弹 - -- --if shopItemData then - -- -- Log(" PatFaceManager startTime buyTimes "..shopItemData.startTime.." "..shopItemData.buyTimes) - -- --else - -- -- Log("shopItemData 为nil") - -- --end - -- if shopItemData and shopItemData.startTime > 0 and shopItemData.buyTimes <= 0 and type == 2 then - -- if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸 - -- table.insert(patFaceAllData,v) - -- end - -- end - if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸 + if starUpGiftNum == v.Star then + local pat = false + local configData = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",8) + for i = 1, #configData do + local id = configData[i].Id + local giftInfo = OperatingManager.GetGiftGoodsInfo(5,id) + if giftInfo and giftInfo.dynamicBuyTimes == 1 then + pat = true + end + end + if pat and RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸 table.insert(patFaceAllData,v) end end @@ -168,6 +160,7 @@ function this.PatFaceSpecialMonitor(v,patFaceAllData,type,starUpGiftNum) end elseif v.Type == 7 then--东海寻仙 if FindFairyManager.GetActivityTime() > 0 then + if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then table.insert(patFaceAllData,v) end @@ -300,6 +293,7 @@ end --事件触发拍脸 (如五星成长礼) function this.OnAddPatFaceData(faceConFigType, starUpGiftNum) if this.isLogin then return end--上来就弹新关卡界面 所以不弹 + if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不弹 patFaceAllData = {} local allTypeFaceConFig = ConfigManager.GetAllConfigsDataByKey(ConfigName.LoginPosterConfig,"Type",faceConFigType) diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua b/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua index 91b9cf6c6a..9c803a0144 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua @@ -317,11 +317,11 @@ end --第五种显示 五星成长礼 local timeOb5 function PatFacePanel:OnShowOb5Data() - if OperatingManager.IsShowFiveStarPatch then + -- if OperatingManager.IsShowFiveStarPatch then OperatingManager.upGradePackagePanelType = 2 UIManager.OpenPanel(UIName.UpGradePackagePanel,function() self:ClosePanel() end) - OperatingManager.IsShowFiveStarPatch = false - end + -- OperatingManager.IsShowFiveStarPatch = false + -- end end function PatFacePanel:OnShowOb6Data() patFaceFindFairy.OnShow(self,patFaceSingleData) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index fea4bfded9..849939bb80 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -1161,7 +1161,7 @@ function this:OnShow() -- UIManager.ClosePanel(UIName.RewardItemSingleShowPopup) --end CheckRedPointStatus(RedPointType.RankingSort) - if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then + if PlayerManager.IsGetFiveStarHero then --and OperatingManager.IsShowFiveStarPatch then Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) PlayerManager.IsGetFiveStarHero = false end diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 070285266b..e2753991c7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -41,9 +41,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/RewardItemPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua index 8fff3cd1b9..0acfe9e20a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua @@ -90,6 +90,10 @@ function RewardItemPopup:BindEvent() if isPlayerAniEnd then PlaySoundWithoutClick(SoundConfig.Sound_UICancel) self:ClosePanel() + if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then + Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) + PlayerManager.IsGetFiveStarHero = false + end end end) Util.AddClick(this.btnMapBack, function () diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index a1b9630991..4565491f93 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -60,7 +60,7 @@ function SingleRecruitPanel:BindEvent() Util.AddClick(self.sureBtn, function() -- isFirst=true self:ClosePanel() - if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then + if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) PlayerManager.IsGetFiveStarHero = false end diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua index a71c614c5c..c02e446943 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua @@ -30,6 +30,10 @@ function TenRecruitPanel:BindEvent() Util.AddClick(self.sureBtn, function() -- UIManager.OpenPanel(UIName.RecruitPanel) + if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then + Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) + PlayerManager.IsGetFiveStarHero = false + end self:ClosePanel() end) Util.AddClick(self.againBtn, function()