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

747 lines
31 KiB
Lua
Raw Normal View History

2020-08-25 15:46:38 +08:00
JumpManager = {};
2020-05-09 13:31:21 +08:00
local this = JumpManager
local JumpConfig=ConfigManager.GetConfig(ConfigName.JumpConfig)
function this.Initialize()
end
local jumpDic = {
[JumpType.Lottery] = function(data)--招募
2020-05-25 19:16:23 +08:00
--local openPanle =
UIManager.OpenPanel(UIName.RecruitPanel)
--if openPanle and data then
-- openPanle.ShowGuideGo(data[1])
--end
2020-05-09 13:31:21 +08:00
end,
[JumpType.Team] = function()--编队
2020-05-25 19:16:23 +08:00
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.MAIN)
2020-05-09 13:31:21 +08:00
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)
2020-05-09 13:31:21 +08:00
-- 进入公会界面之前初始化一遍数据
MyGuildManager.InitAllData(function()
-- UIManager.OpenPanel(UIName.GuildMainCityPanel)
local openPanel = UIManager.GetOpenPanel(UIName.GuildMainCityPanel)
if openPanel then
openPanel:OnShow()
end
2020-05-09 13:31:21 +08:00
end)
end
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
end
end,
[JumpType.WorkShop] = function()--锻造
UIManager.OpenPanel(UIName.WorkShowTechnologPanel)
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,
[JumpType.Arena] = function(data)--竞技场
2020-08-15 23:23:38 +08:00
local arenaDefend = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_DEFEND)
-- local arenaAttack = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_ATTACK)
2020-05-09 13:31:21 +08:00
--首次进入竞技场 将主线编队复制到竞技场防守、进攻编队
-- 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.RefreshFormation(FormationTypeDef.FORMATION_ARENA_ATTACK,newFormation,formation.teamPokemonInfos)
-- end
2020-05-09 13:31:21 +08:00
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.RefreshFormation(FormationTypeDef.FORMATION_ARENA_DEFEND,newFormation,formation.teamPokemonInfos)
-- UIManager.OpenPanel(UIName.FormationPanel, FORMATION_TYPE.ARENA_DEFEND)
-- PopupTipPanel.ShowTip("请先设置防守阵容")
-- 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()--汉元之境
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(Language[11394])
2020-05-09 13:31:21 +08:00
end,
[JumpType.WangHun] = function()--亡魂之海
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(Language[11394])
2020-05-09 13:31:21 +08:00
end,
--暂不开放
--[JumpType.MultipleChallenge] = function(data)--综合副本
-- CarbonManager.difficulty=data[1]
-- UIManager.OpenPanel(UIName.CarbonPanel,data[1])
--end,
[JumpType.DailyTasks] = function()--每日任务
2020-06-13 11:47:13 +08:00
local openPanle = UIManager.OpenPanel(UIName.MissionDailyPanel)
2020-06-03 19:09:01 +08:00
--if openPanle then
-- --引导光圈 第一个领取显示
-- openPanle.ShowGuideGo()
--end
2020-05-09 13:31:21 +08:00
end,
[JumpType.WorldBoss] = function()--世界boss
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(Language[11394])
2020-05-09 13:31:21 +08:00
end,
[JumpType.Talking] = function()--聊天
2020-05-25 19:16:23 +08:00
UIManager.OpenPanel(UIName.ChatPanel)
2020-05-09 13:31:21 +08:00
end,
[JumpType.LoginReward] = function(data)--七日登陆
--local openPanle =UIManager.OpenPanel(UIName.CourtesyDressPanel,data[1])
--if openPanle then
-- openPanle.ShowGuideGo(data[1])
--end
2020-05-25 19:16:23 +08:00
UIManager.OpenPanel(UIName.EightDayGiftPanel)
2020-05-09 13:31:21 +08:00
end,
[JumpType.OnlineReward] = function(data)--在线奖励
--local openPanle
--openPanle = UIManager.OpenPanel(UIName.FightPointPassMainPanel)
--if openPanle then
-- openPanle.ShowGuideGo(data[1])
--end
if data then
2020-05-25 19:16:23 +08:00
-- UIManager.OpenPanel(UIName.CourtesyDressPanel,ActivityTypeDef.OnlineGift)
UIManager.OpenPanel(UIName.OnlineRewardPanel)
2020-05-09 13:31:21 +08:00
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
2021-04-09 12:26:35 +08:00
MsgPanel.ShowTwo(Language[11395], nil, function ()
2020-05-09 13:31:21 +08:00
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))
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
2021-04-09 12:26:35 +08:00
MsgPanel.ShowTwo(Language[11395], nil, function ()
2020-05-09 13:31:21 +08:00
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))
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
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(tips or Language[10574])
2020-05-09 13:31:21 +08:00
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()--成员
HeroManager.heroListPanelSortID = 1
HeroManager.heroListPanelProID = 0
UIManager.OpenPanel(UIName.RoleListPanel)
end,
[JumpType.StoreHouse] = function(data)--仓库
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
openPanle = UIManager.OpenPanel(UIName.FightPointPassMainPanel)
if openPanle then
openPanle.ShowGuideGo(data[1])
end
end,
[JumpType.RechargeStore] = function(data)--充值商店
--PopupTipPanel.ShowTip("商店未开启")
2020-05-15 16:52:35 +08:00
-- UIManager.OpenPanel(UIName.MainShopPanel,data[1])
2021-03-30 20:17:26 +08:00
JumpManager.GoJump(36008)
2020-05-09 13:31:21 +08:00
end,
[JumpType.DatTask] = function(data)--日常任务
2020-06-13 11:47:13 +08:00
local openPanle = UIManager.OpenPanel(UIName.MissionDailyPanel)
2020-06-03 19:09:01 +08:00
--if openPanle then
-- --引导光圈 第一个领取显示
-- openPanle.ShowGuideGo()
--end
2020-05-09 13:31:21 +08:00
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
2021-01-04 18:29:20 +08:00
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)
2020-05-09 13:31:21 +08:00
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.ElementDrawCardPanel)
end,
[JumpType.Pray] = function(data)--云梦
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Pray) then
UIManager.OpenPanel(UIName.PrayMainPanel)
else
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(Language[11396])
2020-05-09 13:31:21 +08:00
end
end,
[JumpType.recharge] = function(data)--充值
2021-03-30 20:17:26 +08:00
this.JumpActivity(JumpType.recharge,data[1])
2020-05-09 13:31:21 +08:00
end,
[JumpType.Welfare] = function(data)--福利
2021-03-30 20:17:26 +08:00
this.JumpActivity(JumpType.Welfare,data[1])
2020-05-09 13:31:21 +08:00
end,
[JumpType.Expert] = function(data)--限时活动
if data and data[1] then
2021-05-10 10:06:53 +08:00
-- 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])
-- end
-- else
-- PopupTipPanel.ShowTip(Language[11396])
-- end
-- else
-- this.JumpActivity(JumpType.Expert,data[1])
-- end
this.JumpActivity(JumpType.Expert,data[1])
2020-05-09 13:31:21 +08:00
end
end,
[JumpType.Privilege] = function(data)--特权
2020-05-25 19:16:23 +08:00
local openPanle = UIManager.OpenPanel(UIName.VipPanelV2)
2020-05-09 13:31:21 +08:00
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)
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]]))
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()--无尽副本
2020-08-26 14:53:31 +08:00
MapManager.curCarbonType = CarBonTypeId.ENDLESS
2020-05-09 13:31:21 +08:00
UIManager.OpenPanel(UIName.EndLessCarbonPanel)
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])
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
2020-05-25 19:16:23 +08:00
UIManager.OpenPanel(UIName.ExpeditionMainPanel,true)
2020-05-09 13:31:21 +08:00
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.EXPEDITION))
end
end,
2020-05-15 17:03:13 +08:00
[JumpType.GuildAid] = function(data)--公会援助
2020-06-13 11:47:13 +08:00
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.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))
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))
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))
end
end,
[JumpType.Compound] = function(data)--锻造炉
local index = 1
if data then index = data[2] 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
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(Language[10909])
return
elseif DeathPosManager.status==DeathPosStatus.Close then
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(Language[10910])
return
end
2020-06-13 11:47:13 +08:00
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))
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
2020-05-15 17:03:13 +08:00
else
2020-06-13 11:47:13 +08:00
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GUILD))
2020-05-15 17:03:13 +08:00
end
end,
2021-04-25 14:02:27 +08:00
[JumpType.CompoundHero] = function(data)--神将合成、置换
local index = 1
if data then index = data[2] end
UIManager.OpenPanel(UIName.CompoundHeroPanel,index)
2020-08-05 15:36:22 +08:00
end,
2020-08-26 14:51:10 +08:00
[JumpType.XuanYuanMirror] = function()--轩辕
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel)
end,
[JumpType.EndlessShop] = function()--无尽商店
local isActive, tips = ShopManager.IsActive(13)
if not isActive then
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(tips or Language[10574])
return
end
UIManager.OpenPanel(UIName.MainShopPanel,13)
end,
[JumpType.EndlessShop] = function()--无尽商店
local isActive, tips = ShopManager.IsActive(13)
if not isActive then
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(tips or Language[10574])
return
end
UIManager.OpenPanel(UIName.MainShopPanel,13)
end,
[JumpType.Pokemon] = function()--灵兽山(驭兽斋)
UIManager.OpenPanel(UIName.PokemonSummonPanel)
2020-08-26 14:51:10 +08:00
end,
2021-01-04 19:40:39 +08:00
[JumpType.HongMengZhen] = function ()
-- body
2021-01-18 17:43:11 +08:00
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv) then
2021-01-05 10:46:35 +08:00
-- body
2021-01-18 17:43:11 +08:00
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).heroTid == 0 then
2021-01-05 14:26:26 +08:00
-- body
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
else
UIManager.OpenPanel(UIName.HongMengPanel)
end
2021-01-05 10:46:35 +08:00
else
UIManager.OpenPanel(UIName.HongMengPanel)
end
Merge branch 'master_xma_local' into 0功能/鸿蒙门阵 # Conflicts: # Assets/ManagedResources/Prefabs/UI/Resolve/ResolvePanel.prefab # Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipPanel.prefab # Assets/ManagedResources/~Lua/Common/GlobalDefine.lua # Assets/ManagedResources/~Lua/Common/functions.lua # Assets/ManagedResources/~Lua/Data/ConfigData.lua # Assets/ManagedResources/~Lua/Message/ArenaInfoProto.proto # Assets/ManagedResources/~Lua/Message/CommonProto.proto # Assets/ManagedResources/~Lua/Message/Expedition.proto # Assets/ManagedResources/~Lua/Message/Family.proto # Assets/ManagedResources/~Lua/Message/FightInfoProto.proto # Assets/ManagedResources/~Lua/Message/HeroInfoProto.proto # Assets/ManagedResources/~Lua/Message/MapInfoProto.proto # Assets/ManagedResources/~Lua/Message/MessageTypeProto.proto # Assets/ManagedResources/~Lua/Message/MessageTypeProto_pb.lua # Assets/ManagedResources/~Lua/Message/PlayerInfoProto.proto # Assets/ManagedResources/~Lua/Modules/Bag/BagResolveAnCompoundPanel.lua # Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua # Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua # Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua # Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua # Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua # Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua # Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua # Assets/ManagedResources/~Lua/Modules/Task/TaskManager.lua
2021-01-06 20:05:35 +08:00
end,
2020-12-22 10:14:54 +08:00
[JumpType.TimeLimiteCall] = function ()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FindFairy)
local name = ConfigManager.GetConfigDataByKey(ConfigName.JumpConfig,"Type",JumpType.TimeLimiteCall).Title
if id and id > 0 then
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.FindFairy)
else
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(GetLanguageStrById(name)..Language[11397])
2020-12-22 10:14:54 +08:00
return
end
end,
[JumpType.QianKunBox] = function ()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.QianKunBox)
local name = ConfigManager.GetConfigDataByKey(ConfigName.JumpConfig,"Type",JumpType.QianKunBox).Title
if id and id > 0 then
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.QianKunBox)
else
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(GetLanguageStrById(name)..Language[11397])
2020-12-22 10:14:54 +08:00
return
end
end,
[JumpType.Celebration] = function ()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Celebration)
local name = ConfigManager.GetConfigDataByKey(ConfigName.JumpConfig,"Type",JumpType.Celebration).Title
if id and id > 0 then
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.Celebration)
else
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(GetLanguageStrById(name)..Language[11397])
2020-12-22 10:14:54 +08:00
return
end
end,
[JumpType.YiJingBaoKu] = function ()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.YiJingBaoKu)
local name = ConfigManager.GetConfigDataByKey(ConfigName.JumpConfig,"Type",JumpType.YiJingBaoKu).Title
if id and id > 0 then
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.YiJingBaoKu)
else
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(GetLanguageStrById(name)..Language[11397])
2020-12-22 10:14:54 +08:00
return
end
end,
[JumpType.LingShouBaoGe] = function ()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LingShouBaoGe)
local name = ConfigManager.GetConfigDataByKey(ConfigName.JumpConfig,"Type",JumpType.LingShouBaoGe).Title
if id and id > 0 then
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.LingShouBaoGe)
else
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(GetLanguageStrById(name)..Language[11397])
2020-12-22 10:14:54 +08:00
return
end
end,
[JumpType.XiangYaoDuoBao] = function ()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.XiangYaoDuoBao)
local name = ConfigManager.GetConfigDataByKey(ConfigName.JumpConfig,"Type",JumpType.XiangYaoDuoBao).Title
if id and id > 0 then
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.XiangYaoDuoBao)
else
2021-04-09 12:26:35 +08:00
PopupTipPanel.ShowTip(GetLanguageStrById(name)..Language[11397])
return
end
end,
[JumpType.XianShiDuiHuan] = function ()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LimitExchange)
local name = ConfigManager.GetConfigDataByKey(ConfigName.JumpConfig,"Type",JumpType.XianShiDuiHuan).Title
if id and id > 0 then
UIManager.OpenPanel(UIName.DynamicActivityPanel,ActivityTypeDef.LimitExchange)
else
PopupTipPanel.ShowTip(GetLanguageStrById(name)..Language[11397])
2020-12-22 10:14:54 +08:00
return
end
end,
2021-05-10 10:06:53 +08:00
[JumpType.ZhuTiHuoDong] = function (data)
this.JumpActivity(JumpType.ZhuTiHuoDong,data[1])
end,
2021-05-10 20:20:20 +08:00
[JumpType.QianKunShangDian] = function (data)
this.JumpActivity(JumpType.QianKunShangDian,data[1])
end,
[JumpType.SheJiDaDianShangDian] = function (data)
2021-05-11 14:59:41 +08:00
this.JumpActivity(JumpType.SheJiDaDianShangDian,data[1])
end,
[JumpType.XinJiangLaiXiShangDian] = function (data)
this.JumpActivity(JumpType.XinJiangLaiXiShangDian,data[1])
2021-05-10 20:20:20 +08:00
end,
2020-05-09 13:31:21 +08:00
}
2021-03-30 20:17:26 +08:00
function this.JumpActivity(data,skipfactor)
if UIManager.IsOpen(UIName.ActivityMainPanel) then
2021-03-30 20:17:26 +08:00
UIManager.ClosePanel(UIName.ActivityMainPanel)
end
DynamicActivityManager.AddUIList(this.jumpId)
2021-03-30 20:17:26 +08:00
UIManager.OpenPanel(UIName.ActivityMainPanel,data,skipfactor)
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
2020-05-09 13:31:21 +08:00
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))
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)
2021-03-30 20:17:26 +08:00
this.jumpId = _jumpId
2020-05-09 13:31:21 +08:00
local jumpSData = JumpConfig[_jumpId]
if jumpSData then
if jumpSData.Type < 10000 then
local serData = ActTimeCtrlManager.GetSerDataByTypeId(jumpSData.Type)
if serData then
2020-05-09 13:31:21 +08:00
if ActTimeCtrlManager.SingleFuncState(jumpSData.Type) then
jumpDic[jumpSData.Type](jumpSData.Skipfactor)
else
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(jumpSData.Type))
end
else
jumpDic[jumpSData.Type](jumpSData.Skipfactor)
end
else
jumpDic[jumpSData.Type](jumpSData.Skipfactor)
end
end
if fun then
fun()
end
2020-05-09 13:31:21 +08:00
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
2020-06-23 18:36:24 +08:00
return this