【拍脸】修改

dev_chengFeng
zhangqiang 2021-05-06 18:08:53 +08:00
parent 7ec568e48d
commit 601f5c09b9
4 changed files with 21 additions and 38 deletions

View File

@ -340,7 +340,7 @@ end
function this.OnAddPatFaceData(faceConFigType, starUpGiftNum)
if faceConFigType == FacePanelType.GrowGift or faceConFigType == FacePanelType.UpgradePac or faceConFigType == FacePanelType.MonsterWave or faceConFigType == FacePanelType.MainLevel
or faceConFigType == FacePanelType.TimeLimitSkin then
LogError("此种拍脸已删除 faceConFigType "..faceConFigType)
LogYellow("此种拍脸已改为后端推送 faceConFigType "..faceConFigType)
return
end
if this.isLogin then return end--上来就弹新关卡界面 所以不弹
@ -358,12 +358,13 @@ end
this.patFaceCallList = Stack.New()
function this.OpenPatFacePanel(_patFaceAllData)
--LogGreen("#patFaceAllData 事件 " .. #patFaceAllData)
if #_patFaceAllData > 0 then
if _patFaceAllData and #_patFaceAllData > 0 then
this.patFaceCallList:Clear()
this.patFaceCallList:Push(function()
--Log("结束了!!!")
this.DeleBackPatFaceDaqta()
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSendFinish)
AdventureManager.GetIsMaxTime()
end)
for i = #_patFaceAllData, 1, -1 do
this.patFaceCallList:Push(function()
@ -395,11 +396,7 @@ function this.SetPatFaceDaqta(PatFaceDatas)
end
end
end
if this.isLogin then return end--登录界面不拍
if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不拍
if GuideManager.IsFunctionGuideExist() then return end--功能引导不拍
if UIManager.IsOpen(UIName.SingleRecruitPanel) or UIManager.IsOpen(UIName.TenRecruitPanel) or UIManager.IsOpen(UIName.RecruitPanel) then return end--抽卡界面不拍
if this.backPatFaceAllData then
if this.backPatFaceAllData and this.GetcurCanPatFace() then
this.OpenPatFacePanel(this.backPatFaceAllData)
end
end
@ -411,4 +408,17 @@ function this.DeleBackPatFaceDaqta()
LogYellow("后端推送礼包拍脸 清空 ")
this.backPatFaceAllData = {}
end
function this.GetcurCanPatFace()
if this.isLogin then return false end--登录界面不拍
if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return false end--在关卡里 副本里不拍
if GuideManager.IsFunctionGuideExist() or GuideManager.IsInMainGuide() then return false end--引导不拍
if UIManager.IsOpen(UIName.SingleRecruitPanel) or UIManager.IsOpen(UIName.TenRecruitPanel) or UIManager.IsOpen(UIName.RecruitPanel) then return false end--抽卡界面不拍
if UIManager.IsOpen(UIName.PatFacePanel) then return false end--正在拍脸
return true
end
function this.RefreshPatface()
if this.GetcurCanPatFace() then
this.OpenPatFacePanel(this.GetPatFaceAllDataTabs())
end
end
return this

View File

@ -424,6 +424,7 @@ function FightPointPassMainPanel:OnShow()
-- 刷新一次编队战斗力
FormationManager.RefreshMainFormationPower()
PatFaceManager.RefreshPatface()
end
--寻宝显示
function this.UpdateFindTreasureMaterialNum()

View File

@ -851,10 +851,7 @@ function this:OnShow()
AdventureManager.GetIsMaxTime()
end
end
--主城调了两边 所以做特殊判断
if not UIManager.IsOpen(UIName.PatFacePanel) then
this.RefreshShowPatPaceActivity()
end
-- 设置主城小人名字
if self.playerView then
@ -1340,33 +1337,7 @@ function this.RefreshActivityShow()
end
function this.RefreshShowPatPaceActivity()
local patFaceAllData = PatFaceManager.GetPatFaceAllDataTabs()
if patFaceAllData and not GuideManager.IsFunctionGuideExist() and not GuideManager.IsInMainGuide() then
Log("#patFaceAllData " .. #patFaceAllData)
if #patFaceAllData > 0 then
this.patFaceCallList:Clear()
this.patFaceCallList:Push(function()
Log("结束了!!!")
PatFaceManager.DeleBackPatFaceDaqta()
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSendFinish)
AdventureManager.GetIsMaxTime()
end)
for i = #patFaceAllData, 1, -1 do
this.patFaceCallList:Push(function()
PatFaceManager.SetisFirstLogVal(1, { patFaceAllData[i] })
UIManager.OpenPanel(UIName.PatFacePanel, patFaceAllData[i], function()
local time2 = Timer.New(function()
this.patFaceCallList:Pop()()
end, 0.5)
time2:Start()
end)
end)
end
this.patFaceCallList:Pop()()
else
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSendFinish)
end
end
PatFaceManager.RefreshPatface()
end
-- 外敌数据变化检测主界面npc显示状态

View File

@ -139,6 +139,7 @@ function MonsterCampPanel:OnOpen(...)
-- 初始化界面数据
this.InitShow()
this.ChangePreview()
PatFaceManager.RefreshPatface()
end
function MonsterCampPanel:OnSortingOrderChange()