miduo_client/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua

640 lines
25 KiB
Lua
Raw Normal View History

GuideManager = {}
2020-05-09 13:31:21 +08:00
local this = GuideManager
local GuideConfig = ConfigManager.GetConfig(ConfigName.GuideConfig)
2020-05-25 19:16:23 +08:00
local GlobalSystemConfig = ConfigManager.GetConfig(ConfigName.GlobalSystemConfig)
2020-05-09 13:31:21 +08:00
local openDic = {}
local json = require 'cjson'
local _CarbonGuildList = {}
local _IsFuncGuild = false
2020-05-25 19:16:23 +08:00
local _FuncGuideList = {}
2020-05-09 13:31:21 +08:00
--初始化
function this.Initialize()
2020-05-25 19:16:23 +08:00
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.OnFunctionOpen)
2020-06-03 19:09:01 +08:00
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
2020-05-09 13:31:21 +08:00
end
2020-06-03 19:09:01 +08:00
function this.OnLevelChange()
-- 首充引导特殊处理到十级开放
2020-08-26 15:51:36 +08:00
if PlayerManager.level == 10 then
table.insert(_FuncGuideList, 100200)
this.CheckFuncGuide()
end
2020-06-03 19:09:01 +08:00
end
2020-05-25 19:16:23 +08:00
--
function this.OnFunctionOpen(funcId)
2020-07-29 17:50:15 +08:00
LogGreen(funcId.."funcId")
2020-05-25 19:16:23 +08:00
if not AppConst.isGuide then
2020-07-29 17:50:15 +08:00
LogGreen("不在引导内")
2020-05-25 19:16:23 +08:00
return
2020-05-09 13:31:21 +08:00
end
2020-07-29 17:50:15 +08:00
LogGreen(tostring(AppConst.isGuide))
2020-05-25 19:16:23 +08:00
local guideId = GlobalSystemConfig[funcId].GuideId
if guideId and guideId ~= 0 then
table.insert(_FuncGuideList, guideId)
2020-05-09 13:31:21 +08:00
end
2020-05-25 19:16:23 +08:00
--
this.CheckFuncGuide()
2020-05-09 13:31:21 +08:00
end
2020-05-25 19:16:23 +08:00
-- 初始化引导数据
2020-05-09 13:31:21 +08:00
function this.InitData(guideData)
--this.RefreshTriggerListen(1701, 35, { 17,})
--只有勾了新手引导,才会读取引导数据,否则置为-1
if not AppConst.isGuide then
openDic[GuideType.Force] = -1
NetManager.SaveGuideDataRequest(GuideType.Force, -1)
return
end
for i = 1, #guideData do
local guide = guideData[i]
openDic[guide.type] = guide.id
if guide.id ~= -1 and guide.type ~= GuideType.Check then
2020-05-09 13:31:21 +08:00
local openType = GuideConfig[guide.id].OpenType
local openArgs = GuideConfig[guide.id].OpenArgs
this.RefreshTriggerListen(guide.id, openType, openArgs)
end
end
2020-05-25 19:16:23 +08:00
2020-06-08 13:57:30 +08:00
-- 测试功能引导用
--Timer.New(function()
-- this.OnFunctionOpen(67)
--end, 1):Start()
2020-05-25 19:16:23 +08:00
end
-- 检测功能引导
function GuideManager.CheckFuncGuide()
if not GuideManager.IsInMainGuide() and not _IsFuncGuild and #_FuncGuideList > 0 then
local guideId = _FuncGuideList[1]
GuideManager.ShowGuide(guideId)
table.remove(_FuncGuideList, 1)
end
end
--- 外部调用检测副本引导的方法
function GuideManager.CheckCarbonGuild(carbonType)
-- 判断当前
if CarbonManager.difficulty ~= carbonType then return end
-- 判断是否时第一次进入某类型副本
if MapManager.IsPlayedByMapType(carbonType) then return end
-- 设置已经进入过此类型副本(感觉放在这里不好,但是为了统一处理先放在这里)
MapManager.SetMapTypePlayed(carbonType)
-- 找到符合条件的引导数据
for _, config in ipairs(_CarbonGuildList) do
if config.OpenArgs[1] == carbonType then
this.ShowGuide(config.Id)
end
2020-05-09 13:31:21 +08:00
end
2020-05-25 19:16:23 +08:00
2020-05-09 13:31:21 +08:00
end
2020-05-25 19:16:23 +08:00
-- 获取当前引导节点
2020-05-09 13:31:21 +08:00
function this.GetCurId(type)
return openDic[type]
end
--判定是否在强制引导阶段
function this.IsInMainGuide()
2020-05-25 19:16:23 +08:00
return openDic[GuideType.Force] and openDic[GuideType.Force] ~= -1
end
-- 判断功能引导是否存在
function this.IsFunctionGuideExist()
return _IsFuncGuild
2020-05-09 13:31:21 +08:00
end
--更新下一步引导
2020-05-25 19:16:23 +08:00
function this.CheckNextGuideListen(nextId)
2020-05-09 13:31:21 +08:00
if GuideConfig[nextId] then
local type = GuideConfig[nextId].Type
if openDic[type] then
openDic[type] = nextId
this.RefreshTriggerListen(nextId, GuideConfig[nextId].OpenType, GuideConfig[nextId].OpenArgs)
end
end
end
2020-05-25 19:16:23 +08:00
function this.ShowGuide(id, ...)
-- 引导数据打点
2020-06-23 18:36:24 +08:00
DataCenterManager.CommitClickStatus(Language[10839], tostring(id))
ThinkingAnalyticsManager.Track("guild", {
step_id = id,
2020-07-28 16:12:29 +08:00
guild_start_time = math.floor(GetTimeStamp()),
})
2020-08-22 15:31:14 +08:00
if AppConst.isSDKLogin then
-- SDKMgr:NewRoleTutorial(tostring(id) ,tostring(math.floor(GetTimeStamp())) ,tostring(math.floor(GetTimeStamp())),
-- PlayerManager.serverInfo.server_id,PlayerManager.serverInfo.name,PlayerManager.nickName,tostring(PlayerManager.uid))
2020-08-22 15:31:14 +08:00
--发送埋点数据
if id == -1 then
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FinishGuide,0)
end
end
2020-05-25 19:16:23 +08:00
-- 引导结束回调
local function onGuideClose()
if GuideConfig[id].Type == GuideType.Force then
if not this.IsInMainGuide() then
-- 强制引导结束检测是否需要功能引导
this.CheckFuncGuide()
end
elseif GuideConfig[id].Type == GuideType.Function then
-- 关闭功能引导
_IsFuncGuild = false
-- 检测是否还需要功能引导
this.CheckFuncGuide()
end
end
2020-06-03 19:09:01 +08:00
2020-05-25 19:16:23 +08:00
-- 监听下一步引导
if GuideConfig[id].Next ~= 0 then
2020-05-25 19:16:23 +08:00
this.CheckNextGuideListen(GuideConfig[id].Next)
end
-- 开始功能引导
if GuideConfig[id].Type == GuideType.Function then
_IsFuncGuild = true
end
2020-06-03 19:09:01 +08:00
-- 显示当前引导
UIManager.OpenPanel(UIName.GuidePanel, id, onGuideClose, ...)
2020-05-25 19:16:23 +08:00
end
-- 同步引导数据到服务器
function this.SyncServer(id) --同步到后端
Game.GlobalEvent:DispatchEvent(GameEvent.Guide.NextTrigger, id)
if GuideConfig[id].ServerNext ~= 0 then
if GuideConfig[id].Type == GuideType.Force then
openDic[GuideType.Force] = GuideConfig[id].ServerNext
NetManager.SaveGuideDataRequest(GuideConfig[id].Type, GuideConfig[id].ServerNext)
end
end
end
-- 检测服务器延迟,
function this.CheckServer(func)
NetManager.SaveGuideDataRequest(GuideType.Check, 0, func)
end
2020-05-09 13:31:21 +08:00
--更新触发监听
function this.RefreshTriggerListen(id, openType, openArgs)
if openType == 1 then
--进入新关卡界面
local trigger
trigger = function(panelType, panel)
if panelType == UIName.FightPointPassMainPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 2 then
--地图走格子触发
local trigger
trigger = function(u, v, callList)
if MapManager.curMapId == 100 and u == openArgs[1] and v == openArgs[2] then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.MapPosTriggered, trigger)
this.ShowGuide(id)
callList:Push(function()
trigger = function(panelType)
if panelType == UIName.GuidePanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
MapPanel.CallListPop()
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
end)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.MapPosTriggered, trigger)
elseif openType == 3 then
--监听指定怪物组id的战斗,战斗技能触发,显示对位敌人
local trigger
trigger = function(roleView)
if FightPointPassManager.curOpenFight == openArgs[1] then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.GuideBattleCDDone, trigger)
BattleManager.PauseBattle()
this.ShowGuide(id, roleView)
GuidePanel.upArrow.transform.position = roleView.GameObject.transform.position
local enemyView = roleView.RootPanel.GetRoleView(BattleLogic.GetAggro(roleView.role))
GuidePanel.upArrow.transform.up = Vector3.Normalize(enemyView.GameObject.transform.position - roleView.GameObject.transform.position)
-- Util.GetTransform(GuidePanel.upArrow, "1").localEulerAngles = -GuidePanel.upArrow.transform.localEulerAngles
GuidePanel.upArrow:SetActive(true)
local canGO1 = roleView.GameObject.transform.parent.parent.gameObject:GetComponent("Canvas")
local canGO2 = enemyView.GameObject.transform.parent.gameObject:GetComponent("Canvas")
local canGO3 = Util.GetGameObject(roleView.RootPanel.EnemyPanel, "live_"..canGO2.name):GetComponent("Canvas")
canGO1.overrideSorting = true
canGO2.overrideSorting = true
canGO3.overrideSorting = true
canGO1.sortingOrder = GuidePanel.sortingOrder
canGO2.sortingOrder = GuidePanel.sortingOrder
canGO3.sortingOrder = GuidePanel.sortingOrder
trigger = function(theId)
if id == theId then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.NextTrigger, trigger)
BattleManager.ResumeBattle()
GuidePanel.upArrow:SetActive(false)
canGO1.overrideSorting = false
canGO2.overrideSorting = false
canGO3.overrideSorting = false
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.NextTrigger, trigger)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.GuideBattleCDDone, trigger)
elseif openType == 4 then
--序章完成进入主界面完成触发
local trigger
trigger = function(panelType, panel)
if panelType == UIName.MainPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 5 then
--监听指定怪物组id的战斗,有敌方角色死亡时,我方对位角色技能触发
local trigger
trigger = function(roleView)
if FightPointPassManager.curOpenFight == openArgs[1] and roleView.RootPanel.GuideCheckEnemyDead(roleView.role) then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.GuideBattleCDDone, trigger)
BattleManager.PauseBattle()
this.ShowGuide(id, roleView)
GuidePanel.upArrow.transform.position = roleView.GameObject.transform.position
local enemyView = roleView.RootPanel.GetRoleView(BattleLogic.GetAggro(roleView.role))
GuidePanel.upArrow.transform.up = Vector3.Normalize(enemyView.GameObject.transform.position - roleView.GameObject.transform.position)
-- Util.GetTransform(GuidePanel.upArrow, "1").localEulerAngles = -GuidePanel.upArrow.transform.localEulerAngles
GuidePanel.upArrow:SetActive(true)
local canGO1 = roleView.GameObject.transform.parent.parent.gameObject:GetComponent("Canvas")
local canGO2 = enemyView.GameObject.transform.parent.gameObject:GetComponent("Canvas")
local canGO3 = Util.GetGameObject(roleView.RootPanel.EnemyPanel, "live_"..canGO2.name):GetComponent("Canvas")
canGO1.overrideSorting = true
canGO2.overrideSorting = true
canGO3.overrideSorting = true
canGO1.sortingOrder = GuidePanel.sortingOrder
canGO2.sortingOrder = GuidePanel.sortingOrder
canGO3.sortingOrder = GuidePanel.sortingOrder
trigger = function(theId)
if id == theId then
GuidePanel.upArrow:SetActive(false)
canGO1.overrideSorting = false
canGO2.overrideSorting = false
canGO3.overrideSorting = false
end
if GuideConfig[id].Next == theId then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.NextTrigger, trigger)
BattleManager.ResumeBattle()
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.NextTrigger, trigger)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.GuideBattleCDDone, trigger)
elseif openType == 6 then
--监听指定怪物组id的战斗技能是否触发
local trigger
trigger = function(roleView)
if FightPointPassManager.curOpenFight == openArgs[1] then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.GuideBattleCDDone, trigger)
BattleManager.PauseBattle() --触发时暂停游戏逻辑
this.ShowGuide(id, roleView)
local canGO1 = roleView.GameObject.transform.parent.parent.gameObject:GetComponent("Canvas")
canGO1.overrideSorting = true
canGO1.sortingOrder = GuidePanel.sortingOrder
trigger = function(panelType)
if panelType == UIName.GuidePanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
BattleManager.ResumeBattle()
canGO1.overrideSorting = false
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.GuideBattleCDDone, trigger)
elseif openType == 7 then
--进入上阵选择界面,判定指定关卡通关
local trigger
trigger = function(panelType)
if panelType == UIName.FormationPanel and FightPointPassManager.curOpenFight == openArgs[1] then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 8 then
--监听指定怪物组id的战斗触发战场分割,显示战斗提示,切换到第二提示
local trigger
trigger = function(stage)
if FightPointPassManager.curOpenFight == openArgs[1] and stage == openArgs[2] then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.GuideBattleStageChange, trigger)
BattleManager.PauseBattle() --触发时暂停游戏逻辑
this.ShowGuide(id, stage)
trigger = function(theId)
if GuideConfig[id].Next == theId then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.NextTrigger, trigger)
BattleManager.ResumeBattle()
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.NextTrigger, trigger)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.GuideBattleStageChange, trigger)
elseif openType == 9 then
--进入新关卡界面,判定指定关卡通关
local trigger
trigger = function(panelType, panel)
if panelType == UIName.FightPointPassMainPanel and FightPointPassManager.curOpenFight == openArgs[1] then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 10 then
--进入单抽界面
local trigger
trigger = function(panelType, panel)
if panelType == UIName.SingleRecruitPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 11 then
--进入上阵选择界面
local trigger
trigger = function(panelType)
if panelType == UIName.FormationPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 12 then
--进入副本引导界面
local trigger
trigger = function(panelType)
if panelType == UIName.CarbonMissionPopup then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 13 then
2020-05-15 16:52:35 +08:00
2020-05-09 13:31:21 +08:00
elseif openType == 14 then
--地图点option完成触发
local trigger
trigger = function(type, optionId)
Log("type:" .. type)
Log("optionId:" .. optionId)
Log("openArgs[1]:" .. openArgs[1])
if type == 1 and optionId == openArgs[1] then
Log("done!!!!!")
Game.GlobalEvent:RemoveEvent(GameEvent.Map.ProgressChange, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Map.ProgressChange, trigger)
elseif openType == 15 then
--战斗胜利结算
local trigger
trigger = function(panelType)
2020-05-15 16:52:35 +08:00
if panelType == UIName.BattleWinPopup then
2020-05-09 13:31:21 +08:00
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 16 then
--序章战开始
local trigger
trigger = function(panelType)
if MapManager.curMapId == 100 then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.GuideBattleStart, trigger)
BattleManager.PauseBattle()
this.ShowGuide(id)
trigger = function(panelType)
if panelType == UIName.GuidePanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
BattleManager.ResumeBattle()
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.GuideBattleStart, trigger)
elseif openType == 17 then
--序章探索完成
local trigger
trigger = function(panelType)
if MapManager.curMapId == 100 and panelType == UIName.MissionRewardPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 18 then
--恭喜获得界面
local trigger
trigger = function(panelType)
if panelType == UIName.RewardItemPopup then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 19 then
--监听角色升级界面
local trigger
trigger = function(panelType)
if panelType == UIName.RoleUpLvBreakSuccessPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
elseif openType == 20 then
--监听地图任务界面
local trigger
trigger = function(panelType)
if panelType == UIName.CarbonMissionPopup then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 21 then
--进入地图
local trigger
trigger = function()
if MapManager.curMapId == openArgs[1] then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.MapInit, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.MapInit, trigger)
elseif openType == 22 then
--监听副本结算界面
local trigger
trigger = function(panelType)
if panelType == UIName.MapStatsPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 23 then
--监听副本界面
local trigger
trigger = function(panelType)
if panelType == UIName.CarbonTypePanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 24 then
--恭喜获得界面弹出后
local trigger
trigger = function(panelType)
if panelType == UIName.RewardItemPopup then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
elseif openType == 25 then
--升阶完成后
local trigger
trigger = function(panelType)
if panelType == UIName.RoleUpStarSuccessPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
--elseif openType == 26 then
-- --功能开启后
-- local trigger
-- trigger = function(panelType)
-- if panelType == UIName.MainPanel and ActTimeCtrlManager.IsQualifiled(openArgs[1]) then
-- Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
-- this.ShowGuide(id)
-- end
-- end
-- Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 27 then
--天赋收集完成
local trigger
trigger = function(panelType)
if panelType == UIName.MsgPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 28 then
--首次进入试炼副本
local trigger
trigger = function()
if MapTrialManager.firstEnter then
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.MapInit, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Guide.MapInit, trigger)
elseif openType == 29 then
--工坊升级界面关闭
local trigger
trigger = function(panelType)
if panelType == UIName.WorkShopLevelUpNotifyPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
elseif openType == 30 then
--击败秘境的看守
local trigger
trigger = function(areaId)
if areaId then
Game.GlobalEvent:RemoveEvent(GameEvent.Adventure.MonsterSayInfo, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.Adventure.MonsterSayInfo, trigger)
elseif openType == 31 then
local trigger
trigger = function(panelType)
if panelType == UIName.ArenaMainPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 32 then
local trigger
trigger = function(panelType)
if panelType == UIName.FightEndLvUpPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
elseif openType == 33 then
--local trigger
--trigger = function(panelType)
-- if panelType == UIName.TalentUpGradSuccessPanel then
-- Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
-- this.ShowGuide(id)
-- end
--end
--Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 34 then
--local trigger
--trigger = function(panelType)
-- if panelType == UIName.TalentUpGradSuccessPanel then
-- Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, trigger)
-- this.ShowGuide(id)
-- end
--end
--Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
elseif openType == 35 then
local trigger
trigger = function(panelType)
--close => BattlePanel
if panelType == UIName.FightPointPassMainPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
elseif openType == 36 then -- 第一次进入副本触发
local trigger
trigger = function(panelType)
--close => BattlePanel
if panelType == UIName.MapPanel then
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
this.ShowGuide(id)
end
end
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
end
end
2020-06-28 17:48:49 +08:00
return this