【优化五星成长礼包、心魔试炼礼包】

dev_chengFeng
guowei 2020-12-24 13:52:28 +08:00
parent 171e9a4690
commit df79f56b72
8 changed files with 34 additions and 27 deletions

View File

@ -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
--添加事件监听(用于子类重写)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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 ()

View File

@ -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

View File

@ -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()