miduo_client/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua

1025 lines
41 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

JumpManager = {};
local this = JumpManager
local JumpConfig=ConfigManager.GetConfig(ConfigName.JumpConfig)
function this.Initialize()
end
local jumpDic = {
[JumpType.Lottery] = function(data)--招募
--local openPanle =
local config = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"Sort",data[1],"FunType",JumpType.Lottery,"PageType",JumpType.Lottery)
UIManager.OpenPanel(UIName.RecruitMainPanel,config.ShopData[1][1])
--if openPanle and data then
-- openPanle.ShowGuideGo(data[1])
--end
end,
[JumpType.Team] = function()--编队
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.MAIN)
end,
[JumpType.DifferDemons] = function()--异妖
UIManager.OpenPanel(UIName.DiffMonsterPanel)
end,
[JumpType.Guild] = function()--公会
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then
if PlayerManager.familyId == 0 then
UIManager.OpenPanel(UIName.GuildFindPopup)
else
UIManager.OpenPanel(UIName.GuildMainCityPanel)
-- 进入公会界面之前初始化一遍数据
MyGuildManager.InitAllData(function()
-- UIManager.OpenPanel(UIName.GuildMainCityPanel)
local openPanel = UIManager.GetOpenPanel(UIName.GuildMainCityPanel)
if openPanel then
openPanel:OnShow()
end
end)
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
this.isOpen = false
end
end,
[JumpType.Foods] = function()--百味居
UIManager.OpenPanel(UIName.FoodShopMainPanel)
end,
[JumpType.Adventure] = function(data)--秘境
local openPanle = UIManager.OpenPanel(UIName.AdventureMainPanel)
if openPanle and data and data[1] < 0 then
--引导光圈 -1 时再极速探索显示按钮
openPanle.ShowGuideGo()
end
end,
[20015] = function(data)
this.JumpActivity(20015,data[1])
end,
[JumpType.Arena] = function(data)--竞技场
local arenaDefend = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_DEFEND)
-- local arenaAttack = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_ATTACK)
--首次进入竞技场 将主线编队复制到竞技场防守、进攻编队
-- if #arenaAttack.teamHeroInfos==0 then
-- -- LogColor("red","竞技进攻编队为空")
-- local formation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
-- local newFormation = {}
-- for index = 1, #formation.teamHeroInfos do
-- local teamInfo = formation.teamHeroInfos[index]
-- local singleData = {}
-- singleData.heroId = teamInfo.heroId
-- singleData.position = index
-- table.insert(newFormation, singleData)
-- end
-- FormationManager.SaveFormation(FormationTypeDef.FORMATION_ARENA_ATTACK,newFormation,formation.teamPokemonInfos)
-- end
if #arenaDefend.teamHeroInfos == 0 then
-- LogColor("red","竞技防守编队为空")
local formation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
local newFormation = {}
for index = 1, #formation.teamHeroInfos do
local teamInfo = formation.teamHeroInfos[index]
local singleData = {}
singleData.heroId = teamInfo.heroId
singleData.position = index
table.insert(newFormation, singleData)
end
FormationManager.SaveFormation(FormationTypeDef.FORMATION_ARENA_DEFEND,newFormation,formation.teamPokemonInfos)
-- UIManager.OpenPanel(UIName.FormationPanel, FORMATION_TYPE.ARENA_DEFEND)
-- PopupTipPanel.ShowTip("请先设置防守阵容")
--this.isOpen = false
-- return
end
local openPanle = UIManager.OpenPanel(UIName.ArenaMainPanel)
if openPanle and data and data[1] then
--引导光圈 -1 时 第一个挑战
if data[1] < 0 then
openPanle.ShowGuideGo()
end
end
end,
[JumpType.HanYuan] = function()--汉元之境
PopupTipPanel.ShowTip(Language[11394])
this.isOpen = false
end,
[JumpType.WangHun] = function()--亡魂之海
PopupTipPanel.ShowTip(Language[11394])
this.isOpen = false
end,
--暂不开放
--[JumpType.MultipleChallenge] = function(data)--综合副本
-- CarbonManager.difficulty=data[1]
-- UIManager.OpenPanel(UIName.CarbonPanel,data[1])
--end,
[JumpType.DailyTasks] = function()--每日任务
local openPanle = UIManager.OpenPanel(UIName.MissionDailyPanel)
--if openPanle then
-- --引导光圈 第一个领取显示
-- openPanle.ShowGuideGo()
--end
end,
[JumpType.WorldBoss] = function()--世界boss
PopupTipPanel.ShowTip(Language[11394])
this.isOpen = false
end,
[JumpType.Talking] = function()--聊天
UIManager.OpenPanel(UIName.ChatPanel)
end,
[JumpType.LoginReward] = function(data)--七日登陆
--local openPanle =UIManager.OpenPanel(UIName.CourtesyDressPanel,data[1])
--if openPanle then
-- openPanle.ShowGuideGo(data[1])
--end
UIManager.OpenPanel(UIName.EightDayGiftPanel)
end,
[JumpType.OnlineReward] = function(data)--在线奖励
--local openPanle
--openPanle = UIManager.OpenPanel(UIName.FightPointPassMainPanel)
--if openPanle then
-- openPanle.ShowGuideGo(data[1])
--end
if data then
-- UIManager.OpenPanel(UIName.CourtesyDressPanel,ActivityTypeDef.OnlineGift)
UIManager.OpenPanel(UIName.OnlineRewardPanel)
end
end,
[JumpType.CommonChallenge] = function(data)--剧情副本
local jumpCarbonId = CarbonManager.NeedLockId(data[2],1)
local openPanle
if jumpCarbonId then
if jumpCarbonId == data[2] or data[2] == -1 then
CarbonManager.difficulty=data[1]
openPanle = UIManager.OpenPanel(UIName.PlotCarbonPanel,jumpCarbonId)
if openPanle then
openPanle.ShowGuideGo(jumpCarbonId)
end
else
MsgPanel.ShowTwo(Language[11395], nil, function ()
CarbonManager.difficulty=data[1]
openPanle = UIManager.OpenPanel(UIName.PlotCarbonPanel,jumpCarbonId)
if openPanle then
openPanle.ShowGuideGo(jumpCarbonId)
end
end)
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(JumpType.CommonChallenge))
this.isOpen = false
end
end,
[JumpType.HeroChallenge] = function(data)--精英副本
local jumpCarbonId = CarbonManager.NeedLockId(data[2],3,math.floor(data[2]/10))
local openPanle
if jumpCarbonId then
if jumpCarbonId == data[2] or data[2] == -1 then
CarbonManager.difficulty=data[1]
Log("jumpManager jumpCarbonId "..jumpCarbonId)
openPanle = UIManager.OpenPanel(UIName.EliteCarbonPanel,jumpCarbonId)
if openPanle then
openPanle.JumpChooseRefresh(jumpCarbonId)
openPanle.ShowGuideGo(jumpCarbonId)
end
else
MsgPanel.ShowTwo(Language[11395], nil, function ()
CarbonManager.difficulty=data[1]
openPanle = UIManager.OpenPanel(UIName.EliteCarbonPanel,jumpCarbonId)
if openPanle then
openPanle.JumpChooseRefresh(jumpCarbonId)
openPanle.ShowGuideGo(jumpCarbonId)
end
end)
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(JumpType.HeroChallenge))
this.isOpen = false
end
end,
[JumpType.ChapterReward] = function(data)--章节奖励
--local openPanle
--openPanle = UIManager.OpenPanel(UIName.FightPointPassMainPanel)
--if openPanle then
-- openPanle.ShowGuideGo(data[1])
--end
if data then
UIManager.OpenPanel(UIName.CourtesyDressPanel,ActivityTypeDef.ChapterAward)
end
end,
[JumpType.Store] = function(data)--商店
local isActive, tips = ShopManager.IsActive(data[1])
if not isActive then
PopupTipPanel.ShowTip(tips or Language[10574])
this.isOpen = false
return
end
UIManager.OpenPanel(UIName.MainShopPanel,data[1])
end,
[JumpType.DifferDemonsBox] = function(data)--秘盒
local openPanle = UIManager.OpenPanel(UIName.SecretBoxPanel)
if openPanle and data and data[1] then
--引导光圈 单抽
openPanle.ShowGuideGo()
end
end,
[JumpType.MemberCamp] = function()--成员
UIManager.CloseAllStack(true)
HeroManager.heroListPanelSortID = 1
HeroManager.heroListPanelProID = 0
UIManager.OpenPanel(UIName.RoleListPanel)
end,
[JumpType.StoreHouse] = function(data)--仓库
UIManager.CloseAllStack(true)
if data then
local openPanle = UIManager.OpenPanel(UIName.BagPanel,data[1])
if openPanle then
--引导光圈 可合成碎片第一个
openPanle.ShowGuideGo()
end
else
UIManager.OpenPanel(UIName.BagPanel)
end
end,
[JumpType.Resolve] = function(data)--二维数组 1回溯献祭 2 英雄 装备 法宝分解
if data then
if data[1] == 1 then
UIManager.OpenPanel(UIName.ResolvePanel,data[2])
elseif data[1] == 2 then
UIManager.OpenPanel(UIName.HeroAndEquipResolvePanel,data[2])
end
end
end,
[JumpType.Friend] = function(data)--好友
UIManager.OpenPanel(UIName.GoodFriendMainPanel,nil,data[1])
end,
[JumpType.Level] = function(data)--关卡
local openPanle
if UIManager.IsTopShow(UIName.FightPointPassMainPanel) then
openPanle = UIManager.GetOpenPanel(UIName.FightPointPassMainPanel)
else
UIManager.CloseAllStack(true)
openPanle = UIManager.OpenPanel(UIName.FightPointPassMainPanel)
end
if openPanle then
openPanle.ShowGuideGo(data[1])
end
end,
[JumpType.RechargeStore] = function(data)--充值商店
--PopupTipPanel.ShowTip("商店未开启")
--this.isOpen = false
-- UIManager.OpenPanel(UIName.MainShopPanel,data[1])
JumpManager.GoJump(36008)
end,
[JumpType.DatTask] = function(data)--日常任务
local openPanle = UIManager.OpenPanel(UIName.MissionDailyPanel)
--if openPanle then
-- --引导光圈 第一个领取显示
-- openPanle.ShowGuideGo()
--end
end,
--[JumpType.Talent] = function(data)--天赋
-- local openPanle = UIManager.OpenPanel(UIName.TalentPanel,{})
-- if openPanle then
-- --引导光圈 注入按钮
-- openPanle.ShowGuideGo()
-- end
--end,
[JumpType.Trial] = function(data)--试炼
CarbonManager.difficulty = 2
MapManager.curCarbonType =CarBonTypeId.TRIAL
NetManager.MapInfoRequest(MapManager.curCarbonType, function(msg)
MapManager.isReloadEnter = false
MapTrialManager.firstEnter = true
MapManager.SetViewSize(20)--设置视野范围(明雷形式)
MapManager.curAreaId =FormationTypeDef.FORMATION_DREAMLAND
MapTrialManager.isHaveBoss = false
MapManager.isTimeOut = false
SwitchPanel.OpenPanel(UIName.MapPanel)
end)
end,
[JumpType.BuyVigor] = function(data)--体力购买
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.Energy })
end,
[JumpType.BuyGold] = function(data)--金币购买
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.Gold })
end,
[JumpType.ElementDrawCard] = function(data)--元素招募
UIManager.OpenPanel(UIName.RecruitMainPanel,TableRecruitType.Siyuanzhen)
end,
[JumpType.Pray] = function(data)--云梦
end,
[JumpType.recharge] = function(data)--充值
this.JumpActivity(JumpType.recharge,data[1])
end,
[JumpType.Welfare] = function(data)--福利
this.JumpActivity(JumpType.Welfare,data[1])
end,
[JumpType.Expert] = function(data)--限时活动
if data and data[1] then
-- if data[1] == ExperType.ExChange then--限时兑换
-- local LimitExchange = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LimitExchange)
-- if LimitExchange then
-- if LimitExchange.endTime - GetTimeStamp() > 0 then
-- local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LimitExchange)
-- local tempData = ConfigManager.GetConfigData(ConfigName.GlobalActivity,id)
-- if tempData.ShowArt == 1 then
-- UIManager.OpenPanel(UIName.ExpertPanel,data[1])
-- else
-- UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.LimitExchange)--10)
-- end
-- else
-- PopupTipPanel.ShowTip(Language[11396])
--this.isOpen = false
-- end
-- else
-- PopupTipPanel.ShowTip(Language[11396])
--this.isOpen = false
-- end
-- else
-- this.JumpActivity(JumpType.Expert,data[1])
-- end
this.JumpActivity(JumpType.Expert,data[1])
end
end,
[JumpType.Privilege] = function(data)--特权
UIManager.CloseAllStack(true)
local openPanle = UIManager.OpenPanel(UIName.VipPanelV2)
if openPanle and data and data[1] < 0 then
--引导光圈 -1 下边条目领取按钮
openPanle.ShowGuideGo()
end
end,
[JumpType.HeroUpLv] = function(data)--特定妖灵师升级(新手专用)
if data and data[1] > 0 then
local heroData = HeroManager.GetHeroDataByHeroSIdAndMinSortId(data[1])
if heroData and heroData.id then
local openPanle = UIManager.OpenPanel(UIName.RoleInfoPanel, heroData, HeroManager.GetAllHeroDatas(),true)
if openPanle then
openPanle.ShowGuideGo(1)
end
end
else
local formationList = FormationManager.GetFormationByID(1)
if formationList.teamHeroInfos[1] then
local heroData = HeroManager.GetSingleHeroData(formationList.teamHeroInfos[1].heroId)
local openPanle = UIManager.OpenPanel(UIName.RoleInfoPanel, heroData, HeroManager.GetAllHeroDatas(),true)
if openPanle then
openPanle.ShowGuideGo(1)
end
end
end
end,
[JumpType.HeroUpStar] = function(data)--特定妖灵师升星(新手专用)
Log("data[1] "..data[1])
local heroData = HeroManager.GetHeroDataByHeroSIdAndMinSortId(data[1])
if heroData and heroData.id then
local openPanle = UIManager.OpenPanel(UIName.RoleInfoPanel, heroData, HeroManager.GetAllHeroDatas(),true)
if openPanle then
openPanle.JumpOnClickBtnUpStar()
openPanle.ShowGuideGo(2)
end
end
end,
[JumpType.BeastIncomingTide]=function()
-- UIManager.OpenPanel(UIName.MonsterCampPanel)
UIManager.OpenPanel(UIName.MonsterCampNewPanel)
end,
[JumpType.AllForMation]=function(data)
if ActTimeCtrlManager.SingleFuncState(FormationManager.AllFormationFunIds[data[1]]) then
UIManager.OpenPanel(UIName.FormationSetPanel,data[1])
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FormationManager.AllFormationFunIds[data[1]]))
this.isOpen = false
end
end,
[JumpType.QuickPurchase] = function(data)--快捷购买
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = data[1] })
end,
[JumpType.GiveMePower] = function()--我要变强
UIManager.OpenPanel(UIName.GiveMePowerPanel)
end,
[JumpType.EndlessFight] = function()--无尽副本
MapManager.curCarbonType = CarBonTypeId.ENDLESS
--UIManager.OpenPanel(UIName.EndLessCarbonPanel)
UIManager.OpenPanel(UIName.ChallengeCopyPanel)
end,
[JumpType.SoulPrintAstrology] = function()--无尽副本
UIManager.OpenPanel(UIName.SoulPrintAstrologyPanel)
end,
[JumpType.Alien] = function()--外敌入侵
UIManager.OpenPanel(UIName.AlienMainPanel)
end,
[JumpType.FiveStarActivity] = function()--外敌入侵
--UIManager.OpenPanel(UIName.GrowGiftPopup)
end,
[JumpType.Setting] = function(data)--外敌入侵
UIManager.OpenPanel(UIName.SettingPanel,data[1])
end,
[JumpType.LuckyTurn] = function(data)--幸运探宝
--UIManager.OpenPanel(UIName.LuckyTurnTablePanel,data[1])
UIManager.OpenPanel(UIName.ActivityMainPanel,40,5)
end,
[JumpType.TopMatch] = function(data)--巅峰赛
UIManager.OpenPanel(UIName.ArenaTopMatchPanel,data[1])
end,
[JumpType.FindFairy] = function(data)--东海寻仙
UIManager.OpenPanel(UIName.FindFairyPanel,data[1])
end,
[JumpType.FindTreasure] = function()--迷宫寻宝
UIManager.OpenPanel(UIName.FindTreasureMainPanel)
end,
[JumpType.Expedition]=function(data)--远征
if ActTimeCtrlManager.SingleFuncState(JumpType.Expedition) then
UIManager.OpenPanel(UIName.ExpeditionMainPanel,true)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.EXPEDITION))
this.isOpen = false
end
end,
[JumpType.GuildAid] = function(data)--公会援助
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then
if PlayerManager.familyId == 0 then
UIManager.OpenPanel(UIName.GuildFindPopup)
else
UIManager.CloseAllStack(true)
if UIManager.IsOpen(UIName.GuildMainCityPanel) then
UIManager.OpenPanel(UIName.GuildAidMainPopup,data[1])
else
UIManager.OpenPanel(UIName.GuildMainCityPanel)
UIManager.OpenPanel(UIName.GuildAidMainPopup,data[1])
end
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
this.isOpen = false
end
end,
[JumpType.GuildSkill] = function(data)--公会技能
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then
if PlayerManager.familyId == 0 then
UIManager.OpenPanel(UIName.GuildFindPopup)
else
if UIManager.IsOpen(UIName.GuildMainCityPanel) then
local index = 1
if data then index = data[1] end
UIManager.OpenPanel(UIName.GuildSkillUpLvPopup,index)
else
UIManager.OpenPanel(UIName.GuildMainCityPanel)
local index = 1
if data then index = data[1] end
UIManager.OpenPanel(UIName.GuildSkillUpLvPopup,index)
end
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
this.isOpen = false
end
end,
[JumpType.GuildFete] = function()--公会祭祀
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then
if PlayerManager.familyId == 0 then
UIManager.OpenPanel(UIName.GuildFindPopup)
else
if UIManager.IsOpen(UIName.GuildMainCityPanel) then
UIManager.OpenPanel(UIName.GuildFetePopup)
else
UIManager.OpenPanel(UIName.GuildMainCityPanel)
UIManager.OpenPanel(UIName.GuildFetePopup)
end
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
this.isOpen = false
end
end,
[JumpType.Compound] = function(data)--锻造炉
local index = 1
if data then index = data[2] end
local ConfigData = ConfigManager.GetConfig(ConfigName.SpecialConfig)
if index == 2 then
local string = ConfigData[89].Value
if PlayerManager.level < tonumber(string) then
PopupTipPanel.ShowTip(string.format(Language[10770],string))
this.isOpen = false
return
end
end
if index == 3 then
local string = ConfigData[40].Value
local num = string.split(string.split(string,"|")[1],"#")[2]
if PlayerManager.level < tonumber(num) then
PopupTipPanel.ShowTip(string.format(Language[10770],num))
this.isOpen = false
return
end
end
UIManager.OpenPanel(UIName.CompoundPanel,index)
end,
[JumpType.DailyCarbon_Gold] = function(data)--每日金币副本
local index = 1
if data then index = data[2] end
UIManager.OpenPanel(UIName.DailyCarbonPanel,index)
end,
[JumpType.DailyCarbon_Exp] = function(data)--每日经验副本
local index = 1
if data then index = data[2] end
UIManager.OpenPanel(UIName.DailyCarbonPanel,index)
end,
[JumpType.DailyCarbon_Hero] = function(data)--每日角色碎片副本
local index = 1
if data then index = data[2] end
UIManager.OpenPanel(UIName.DailyCarbonPanel,index)
end,
[JumpType.DailyCarbon_Transure] = function(data)--每日法宝副本
local index = 1
if data then index = data[2] end
UIManager.OpenPanel(UIName.DailyCarbonPanel,index)
end,
[JumpType.DailyCarbon_SoulPrint] = function(data)--每日魂印副本
local index = 1
if data then index = data[2] end
UIManager.OpenPanel(UIName.DailyCarbonPanel,index)
end,
[JumpType.DeathPos] = function()--十绝阵
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then
if PlayerManager.familyId == 0 then
UIManager.OpenPanel(UIName.GuildFindPopup)
else
if DeathPosManager.status==DeathPosStatus.Death then
PopupTipPanel.ShowTip(Language[10909])
this.isOpen = false
return
elseif DeathPosManager.status==DeathPosStatus.Close then
PopupTipPanel.ShowTip(Language[10910])
this.isOpen = false
return
end
if UIManager.IsOpen(UIName.GuildMainCityPanel) then
UIManager.OpenPanel(UIName.DeathPosPanel)
else
UIManager.OpenPanel(UIName.GuildMainCityPanel)
UIManager.OpenPanel(UIName.DeathPosPanel)
end
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
this.isOpen = false
end
end,
[JumpType.GuildCarDelay] = function()--车迟斗法
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then
if PlayerManager.familyId == 0 then
UIManager.OpenPanel(UIName.GuildFindPopup)
else
UIManager.OpenPanel(UIName.GuildCarDelayMainPanel)
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
this.isOpen = false
end
end,
[JumpType.CompoundHero] = function(data)--神将合成、置换
local index = 1
if data then index = data[2] end
UIManager.OpenPanel(UIName.CompoundHeroPanel,index)
end,
[JumpType.XuanYuanMirror] = function()--轩辕
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel)
end,
[JumpType.EndlessShop] = function()--无尽商店
local isActive, tips = ShopManager.IsActive(13)
if not isActive then
PopupTipPanel.ShowTip(tips or Language[10574])
this.isOpen = false
return
end
UIManager.OpenPanel(UIName.MainShopPanel,13)
end,
[JumpType.EndlessShop] = function()--无尽商店
local isActive, tips = ShopManager.IsActive(13)
if not isActive then
PopupTipPanel.ShowTip(tips or Language[10574])
this.isOpen = false
return
end
UIManager.OpenPanel(UIName.MainShopPanel,13)
end,
[JumpType.Pokemon] = function(data)--灵兽山(驭兽斋)
if data and data[1] == 1 then
UIManager.OpenPanel(UIName.PokemonSummonPanel)
elseif data and data[1] == 2 then
UIManager.OpenPanel(UIName.PokemonMainPanel)
end
end,
[JumpType.SacredTree]=function(data)--建木神树
if ActTimeCtrlManager.SingleFuncState(JumpType.SacredTree) then
UIManager.OpenPanel(UIName.SacredTreePanel)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.SACREDTREE))
end
end,
[JumpType.HongMengZhen] = function ()
-- body
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv) then
-- body
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).heroTid == 0 then
-- body
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
else
UIManager.OpenPanel(UIName.HongMengPanel)
end
else
UIManager.OpenPanel(UIName.HongMengPanel)
end
end,
[JumpType.TimeLimiteCall] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
[JumpType.QianKunBox] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
[JumpType.Celebration] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
[JumpType.YiJingBaoKu] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
[JumpType.LingShouBaoGe] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
[JumpType.XiangYaoDuoBao] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
[JumpType.XianShiDuiHuan] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
[JumpType.ZhuTiHuoDong] = function (data)
if #data > 1 then
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LimitUpHero) then
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
else
PopupTipPanel.ShowTip("活动尚未开启")
this.isOpen = false
end
else
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end
end,
[JumpType.QianKunShangDian] = function (data)
this.JumpActivity(JumpType.QianKunShangDian,data[1])
end,
[JumpType.SheJiDaDianShangDian] = function (data)
this.JumpActivity(JumpType.SheJiDaDianShangDian,data[1])
end,
[JumpType.XinJiangLaiXiShangDian] = function (data)
this.JumpActivity(JumpType.XinJiangLaiXiShangDian,data[1])
end,
[JumpType.SheJiDaDianShangDian] = function (data)
this.JumpActivity(JumpType.SheJiDaDianShangDian,data[1])
end,
[JumpType.XinJiangLaiXiShangDian] = function (data)
this.JumpActivity(JumpType.XinJiangLaiXiShangDian,data[1])
end,
[JumpType.XingChenShangDian] = function (data)
this.JumpActivity(JumpType.XingChenShangDian,data[1])
end,
[JumpType.XunBaoMiZongShangDian] = function (data) --寻宝迷踪
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.XunBaoMiZong)
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(ActivityTypeDef.XunBaoMiZong) then
this.JumpActivity(JumpType.XunBaoMiZongShangDian,data[1])
else
PopupTipPanel.ShowTip("活动尚未开启")
this.isOpen = false
end
end,
[JumpType.StateActivity] = function (data)
this.JumpActivity(JumpType.StateActivity,data[1], data[2])
end,
[JumpType.FightLevel] = function (data)
UIManager.OpenPanel(UIName.FightLevelChapterPanel)
end,
[JumpType.EndlessXingDongliBuy] = function(data)
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = 1 })
end,
[JumpType.ChaoFanRuSheng] = function(data)
this.JumpActivity(ActivityTypeDef.ChaoFanRuSheng,data[1])
end,
[JumpType.firstRecharge] = function(data)
local aaa={}
aaa.tabIndex=data[1]
UIManager.OpenPanel(UIName.FirstRechargePanel,aaa)
end,
[JumpType.ZhiZunJiangShi] = function(data)
local actId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.SupremeHero)
if actId == 42 then
UIManager.OpenPanel(UIName.SupremeHeroPopup)
else
UIManager.OpenPanel(UIName.SupremeHeroPopupNew)
end
end,
[JumpType.SurpriseBox] = function(data)
local activityId = ActivityGiftManager.IsActivityTypeOpen(data[1])
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(data[1]) then
UIManager.OpenPanel(UIName.SurpriseBoxPanel)
else
PopupTipPanel.ShowTip("活动尚未开启")
this.isOpen = false
end
end,
[JumpType.zhenqibaoge] = function(data)
this.JumpActivity(JumpType.zhenqibaoge,data[1])
end,
[JumpType.xunxianbaoge] = function(data)
this.JumpActivity(JumpType.xunxianbaoge,data[1])
end,
[JumpType.LingShouTehui] = function(data)--零售特惠
this.JumpActivity(JumpType.LingShouTehui,data[1])
end,
[JumpType.xianshishangshi] = function(data)
this.JumpActivity(JumpType.xianshishangshi,data[1])
end,
[JumpType.chaozhijijin] = function(data)
this.JumpActivity(JumpType.chaozhijijin % 10000,data[1])
end,
[JumpType.JumpServerHightLadder] = function(data)
if not ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) then
PopupTipPanel.ShowTip( ActTimeCtrlManager.GetFuncTip( FUNCTION_OPEN_TYPE.JumpServer_HightLadder))
return
end
local conFigWorldLevel = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).WorldLevel
if PlayerManager.worldLeve < conFigWorldLevel then --如果世界等级不足
PopupTipPanel.ShowTip(string.format("世界等级到达%s后开启",conFigWorldLevel))
return
end
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.JumpServer_HightLadder) == false then --如果未解锁
PopupTipPanel.ShowTip("赛季过渡中!")
return
end
JumpServerManager.GetWorldArenaInfoRequest(function()
if not JumpServerManager.GetHightLadderDataIsStart() then
PopupTipPanel.ShowTip(string.format("开服第%s周开放",ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).OpenWeek))
return
elseif not JumpServerManager.GetHightLadderDataIsGroup() then
PopupTipPanel.ShowTip("未划分跨服分组,无法参与!")
return
else
UIManager.OpenPanel(UIName.JumpServerHightLadderPanel)
return
end
end)
end,
[JumpType.FourElementTrail] = function(data)
if ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.FourElementTrail) then
UIManager.OpenPanel(UIName.MonsterCampMainPanel)
else
PopupTipPanel.ShowTip("四灵试炼暂未开启")
return
end
end,
[JumpType.linglongShangShi] = function(data)
this.JumpActivity(JumpType.linglongShangShi,data[1])
end,
[JumpType.likeability] = function()
UIManager.OpenPanel(UIName.LikeAbilityPanel)
end,
[JumpType.Song10Wan] = function()
UIManager.OpenPanel(UIName.GMSong10WanPanel)
end,
[JumpType.SongWuXian] = function()
UIManager.OpenPanel(UIName.OpenSeverWelfarePanel)
end,
[JumpType.xiaoyaoyou] = function()
XiaoYaoManager.OpenMapList()
end,
[JumpType.QiJieShiLian] = function(data)
if UIManager.IsOpen(UIName.GeneralRankRewardPanel) then
UIManager.ClosePanel(UIName.GeneralRankRewardPanel)
end
QiJieShiLianManager.CheckQiJieJump(FUNCTION_OPEN_TYPE.QIJIESHILIAN,3,function ()
local qiejieConfig = ConfigManager.GetConfig(ConfigName.QijieStage)
NetManager.SevenWorldInfoRequest(0,function (msg)
QiJieShiLianManager.IsLock = false
if qiejieConfig[msg.id] then
UIManager.OpenPanel(UIName.QiJieShiLianPanel)
else
LogError("七界试炼不存在该ID"..tostring(msg.id))
PopupTipPanel.ShowTip("无法进入,请联系客服!")
end
end)
end)
end,
[JumpType.YuXuLunDao] = function(data)
QiJieShiLianManager.CheckQiJieJump(FUNCTION_OPEN_TYPE.JumpServer_YuXu,2,function ()
NetManager.CrossYuXuLunDaoGetInfoRequest(1,function(msg)
UIManager.OpenPanel(UIName.WorldArenaMainPanel,msg)
end)
end)
end,
[JumpType.linglongBaojing] = function(data)
this.JumpActivity(JumpType.linglongBaojing % 10000,data[1])
end,
[JumpType.SiXiangXinFa] = function(data)
UIManager.OpenPanel(UIName.PracticePanel)
UIManager.OpenPanel(UIName.FourQuadrantPopup)
end,
[JumpType.player] = function(data)
UIManager.OpenPanel(UIName.PracticePanel)
end,
[JumpType.YuJianXingShangDian] = function (data) --御剑行商店
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.YuJianXing)
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(ActivityTypeDef.YuJianXing) then
this.JumpActivity(JumpType.YuJianXingShangDian,data[1])
else
PopupTipPanel.ShowTip("活动尚未开启")
this.isOpen = false
end
end,
[JumpType.TianShuMiJuan] = function(data)
UIManager.OpenPanel(UIName.TianShuMiJuan,data[1])
end,
[JumpType.JiTianHaoLi] = function(data)
this.JumpActivity(JumpType.JiTianHaoLi, data[1])
end,
[JumpType.LingMaiMiJing] = function(data)
NetManager.GetLingMaiInfoRequest(0,function ()
if LingMaiMiJingManager.state == 0 then
PopupTipPanel.ShowTip("今日不开放灵脉秘境玩法!")
else
if not LingMaiMiJingManager.GetData() then
LogError("灵脉试炼数据为空")
PopupTipPanel.ShowTip("灵脉暂无法进入,请耐心等待!")
return
end
UIManager.OpenPanel(UIName.LingMaiMiJingPanel)
end
end)
end,
[JumpType.honglushop] = function(data)
this.JumpActivity(JumpType.honglushop, data[1])
end,
[JumpType.fangcunxunbaoShop] = function(data)
this.JumpActivity(JumpType.fangcunxunbaoShop, data[1])
end,
[JumpType.ContinuePackage] = function(data,args)
UIManager.OpenPanel(UIName.ContinuePackagePanel,args[1])
end,
[JumpType.shenwaihuashen] = function(data,args)
UIManager.OpenPanel(UIName.IncarnationPanel,data[1])
end,
[JumpType.Gem] = function(data,args)
UIManager.OpenPanel(UIName.GemPanel,data[1])
end,
[JumpType.tehuishangcheng] = function(data,args)
UIManager.OpenPanel(UIName.ActivityMainPanel,36)
end,
[JumpType.HomeLand] = function(data,args)
HomeLandManager.GetData(function ()
UIManager.OpenPanel(UIName.HomeLandPanel)
end)
end,
[JumpType.Explor] = function(data,args)
UIManager.OpenPanel(UIName.ExploreMainPanel)
end,
[JumpType.TreasureStoreSeason2] = function(data,args)
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.TreasureStoreSeason2)
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(ActivityTypeDef.TreasureStoreSeason2) then
UIManager.OpenPanel(UIName.TreasureStoreSeason2)
else
PopupTipPanel.ShowTip("活动尚未开启")
end
end,
[JumpType.zhongzhichengcheng] = function(data,args)
this.JumpActivity(ActivityTypeDef.zhongzhichengcheng,data[1])
end,
[JumpType.zhongzhichengcheng_Explor] = function(data,args)
if not MyGuildManager.MyGuildInfo or not MyGuildManager.MyGuildInfo.id then
this.isOpen = false
PopupTipPanel.ShowTip("需要先加入一个公会!")
return 0
end
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.Explore) then
this.isOpen = false
PopupTipPanel.ShowTip("功能尚未开启")
return 0
end
UIManager.OpenPanel(UIName.ExploreMainPanel)
end,
}
function this.JumpActivity(data,skipfactor, guideType)
local isOpen = DynamicActivityManager.IsActivityOpenByJumpIndex(data, skipfactor)
if not isOpen then
PopupTipPanel.ShowTip("活动尚未开启")
this.isOpen = false
return
end
if isOpen == 1 then
PopupTipPanel.ShowTip("功能尚未开启")
this.isOpen = false
return
end
if DynamicActivityManager.curActivityType == data then
DynamicActivityManager.RemoveUIList()
end
if UIManager.IsOpen(UIName.ActivityMainPanel) then
UIManager.ClosePanel(UIName.ActivityMainPanel)
end
DynamicActivityManager.AddUIList(this.jumpId)
local panel = UIManager.OpenPanel(UIName.ActivityMainPanel,data,skipfactor)
-- 限时引导光效
if guideType and guideType > 0 then
panel:ShowGuideGo(guideType)
end
end
-- function this.GetTip(openType,openValue)
-- if openType == 1 then
-- if not FightPointPassManager.IsFightPointPass(openValue) then
-- local fightConfig = ConfigManager.GetConfigData(ConfigName.MainLevelConfig, openValue)
-- return string.format("通关%s关卡解锁", fightConfig.Name)
-- end
-- elseif openType == 2 then
-- if PlayerManager.level < openValue then
-- return string.format("玩家%s级后开放", openValue)
-- end
-- end
-- end
function this.CheckJump(_jumpId)
local jumpSData = JumpConfig[_jumpId]
if jumpSData.Type < 10000 then
local b = jumpSData and ActTimeCtrlManager.SingleFuncState(jumpSData.Type)
if not b then
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(jumpSData.Type))
this.isOpen = false
end
return b
else
return true
end
end
function this.GoJumpWithoutTip(_jumpId)
local jumpSData = JumpConfig[_jumpId]
if jumpSData then
jumpDic[jumpSData.Type](jumpSData.Skipfactor)
end
end
function this.GoJump(_jumpId,fun,...)
local args = {...}
Log("jumpId:"..tostring(_jumpId))
this.isOpen = true
this.jumpId = _jumpId
local jumpSData = JumpConfig[_jumpId]
if jumpSData then
if jumpSData.Type < 10000 then
local serData = ActTimeCtrlManager.GetSerDataByTypeId(jumpSData.Type)
if serData then
if ActTimeCtrlManager.SingleFuncState(jumpSData.Type) then
jumpDic[jumpSData.Type](jumpSData.Skipfactor)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(jumpSData.Type))
this.isOpen = false
end
else
jumpDic[jumpSData.Type](jumpSData.Skipfactor,args)
end
else
jumpDic[jumpSData.Type](jumpSData.Skipfactor,args)
end
end
if fun then
fun(this.isOpen)
end
end
function this.ShowGuide(panelId, targetGO)
local go = poolManager:LoadAsset("GuideEffect", PoolManager.AssetType.GameObject)
go.transform:SetParent(targetGO.transform)
go.transform.localPosition = Vector3.zero
go.transform.localScale = Vector3.one
go.transform:SetAsLastSibling()
local layer = tonumber(go.name) or 0
Util.AddParticleSortLayer(go, UIManager.GetOpenPanel(panelId).sortingOrder - layer)
go.name = tostring(UIManager.GetOpenPanel(panelId).sortingOrder)
Util.GetGameObject(go, "GameObject"):SetActive(true)
local update
update = function()
if Input.GetMouseButtonDown(0) then
poolManager:UnLoadAsset("GuideEffect", go, PoolManager.AssetType.GameObject)
UpdateBeat:Remove(update, this)
end
end
UpdateBeat:Add(update, this)
end
return this