From b0f0b654ecfafd555611b4df5b628ed99fbf85d2 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 14 Aug 2020 18:14:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E5=8F=AF=E4=BB=A5=E8=BF=9B=E5=8E=BB=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit a1737d6e7014963b19c97ccfb2d1c878d88bc295) --- .../Modules/Formation/FormationManager.lua | 1 + .../Formation/View/CarbonFormation.lua | 8 ++-- .../~Lua/Modules/Hero/HeroManager.lua | 31 +++--------- .../~Lua/Modules/Map/MapManager.lua | 6 ++- .../~Lua/Modules/Map/MapPanel.lua | 9 ++-- .../~Lua/Modules/Map/View/PointHandleView.lua | 12 ++--- .../~Lua/Modules/Mission/MissionManager.lua | 48 ++++++++++++------- 7 files changed, 58 insertions(+), 57 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index a161713691..87a59cf83b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -126,6 +126,7 @@ function this.RefreshFormation(index, roleList, pokemonList,isDiffmonster) teamInfo.position = roleList[i].position--i table.insert(curFormation.teamHeroInfos, teamInfo) if not oldTeamheroInfos[teamInfo.heroId] then + LogRed("roleList[i].heroId"..roleList[i].heroId.." this.formationList[index].teamId"..this.formationList[index].teamId) HeroManager.SetHeroFormationList(roleList[i].heroId,this.formationList[index].teamId,1) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua index 96ff74340d..ac975b121e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua @@ -153,10 +153,10 @@ function this.EnterMapbyType(type, itemId) -- MapTrialManager.firstEnter = true elseif CarbonManager.difficulty == CARBON_TYPE.ENDLESS then -- 是否已经开放 - if not ActTimeCtrlManager.SingleFuncState(46) then - PopupTipPanel.ShowTip(Language[10722]) - return - end + -- if not ActTimeCtrlManager.SingleFuncState(46) then + -- PopupTipPanel.ShowTip(Language[10722]) + -- return + -- end end -- =========================================================== MapManager.isReloadEnter = false diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 97dc9778c5..0877ab2d37 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -42,10 +42,6 @@ this.heroResolveLicence = {} --this.allHeroProVal = {}--团体加成 --this.specialProVal = {}--减乘 function this.Initialize() - local hero_resolve_licence = string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 36).Value, "#") - for i = 1, #hero_resolve_licence do - this.heroResolveLicence[tonumber(hero_resolve_licence[i])] = tonumber(hero_resolve_licence[i]) - end for i = 1, WarPowerTypeAllNum do this.allProVal[i] = { singleHeroProVal = {}, @@ -167,12 +163,12 @@ function this.UpdateHeroDatas(_msgHeroData, isFindHandBook) end function this.SetHeroFormationList(heroDid,teamId,isAddOrDel) + if isAddOrDel then + heroDatas[heroDid].formationList[teamId] = teamId + else + heroDatas[heroDid].formationList[teamId] = nil + end - if isAddOrDel and this.heroResolveLicence[teamId] then - heroDatas[heroDid].formationList[teamId] = teamId - else - heroDatas[heroDid].formationList[teamId] = nil - end end function this.GetHeroEquipIdList(heroDid) @@ -412,14 +408,7 @@ function this.DeleteHeroDatas(heroDIds) --清楚编队上的英雄 FormationManager.AllFormationDeleCurHeroId(heroDIds[i]) --清除英雄魂印上挂载的英雄did - SoulPrintManager.hasEquipSoulPrintId[heroDIds[i]] = nil - --清除宝器上的英雄 - local jewels = heroDatas[heroDIds[i]].jewels - if jewels and LengthOfTable(jewels) > 0 then - for i = 1, #jewels do - EquipTreasureManager.SetTreasureUpOrDown(jewels[i],"") - end - end + SoulPrintManager.hasEquipSoulPrintId[heroDIds[i]] = nil --删除远征英雄数据 ExpeditionManager.DelHeroHpValue(heroDatas[heroDIds[i]]) --删除英雄 @@ -2908,13 +2897,7 @@ function this.ByCompoundHeroGetAllHeros() local downSoryHeroList = {} for i, v in pairs(heroDatas) do if v.star == 4 or v.star == 5 or v.star == 3 then--四星 五星 才能加 3星 是狗粮 - if #v.formationList ~= 0 then - local text = "" - for index, value in ipairs(v.formationList) do - text = HeroManager.GetHeroFormationStr(index) - end - v.isFormation = text - end + v.isFormation = "" table.insert(upSortHeroList,v) table.insert(downSoryHeroList,v) end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua index b4791b5aed..0c9b8ff0c6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua @@ -71,6 +71,7 @@ function this.InitVar() this.progressFull = false -- 探索100% this.roleInitPos = 0 -- 换层时的出生位置 this.pointAtkPower = {} -- 每个事件点的战力 + this.FirstEnter = false -- 刚进图,区别OnShow this.PlayedMapTypes = {} -- 已经进入过的副本类型(用与判断是否时第一次进入某类型的副本) @@ -81,6 +82,8 @@ function this.InitVar() this.trialHeroInfo={}--试炼阵容信息 this.curHero=""--试炼副本当前上阵英雄 this.addHpCount=0 --回春散已使用次数 + + this.curMap = 4001 end function this.InitData(msg) @@ -202,10 +205,9 @@ function this.InitData(msg) end -- 无尽副本 - LogRed(tostring(#msg.signs)) if msg.signs then LogPurple("标记数量" .. #msg.signs) - EndLessMapManager.InitMapNoteData(msg.signs) + -- EndLessMapManager.InitMapNoteData(msg.signs) end -- 时间点的刷新时间 diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua index 2748045cf4..b0229d4666 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua @@ -107,10 +107,10 @@ function this.SetEndlessShow() -- 无尽副本的回城设置 if CarbonManager.difficulty == 4 then -- 先看看是否是能回去 - if not EndLessMapManager.IsMapTeamAlive()then - PopupTipPanel.ShowTip(Language[11233]) - return - end + -- if not EndLessMapManager.IsMapTeamAlive()then + -- PopupTipPanel.ShowTip(Language[11233]) + -- return + -- end -- 先发更新事件点协议 MapManager.MapUpdateEvent(-1000, function () @@ -166,6 +166,7 @@ end function this:OnShow() UIManager.camera.clearFlags = CameraClearFlags.Depth local mapId = MapManager.curMapId + LogYellow("MapManager.curMapId"..MapManager.curMapId) --- 副本地图音效统一改成一个 SoundManager.PlayMusic(SoundConfig.BGM_CarbonMap) -- 环境音 diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua index 09849c3228..00b9300c1c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua @@ -52,12 +52,12 @@ function this.GeneratePoint() this.ShowSawPoints() - -- 初始化标记点 - if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then - for pos, data in pairs(EndLessMapManager.PointNoteDataList[4401]) do--MapManager.curMapId]) do - this.OnAddNotePoint(pos, data.noteInfo) - end - end + -- -- 初始化标记点 + -- if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then + -- for pos, data in pairs(EndLessMapManager.PointNoteDataList[4401]) do--MapManager.curMapId]) do + -- this.OnAddNotePoint(pos, data.noteInfo) + -- end + -- end -- 设置一下战力的显示 this.RefreshAtkShow() diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua index f36bbb5d3b..4de9af4bd8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua @@ -302,24 +302,38 @@ local directFight = function(showType, eventId, showValues, options) else--快速战斗 -- --如果英雄阵亡 无法选择其进行战斗 --先保存编队 - local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_DREAMLAND) - local choosedList={} - table.insert(choosedList, {heroId = MapTrialManager.selectHeroDid, position=2}) - FormationManager.RefreshFormation(FormationTypeDef.FORMATION_DREAMLAND,choosedList, - FormationManager.formationList[FormationTypeDef.FORMATION_DREAMLAND].teamPokemonInfos) + MapManager.curMap = 4001 + if MapManager.curMap == 4001 then--无尽副本 + -- body + local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ENDLESS_MAP) + FormationManager.RefreshFormation(FormationTypeDef.FORMATION_ENDLESS_MAP,curFormation, + FormationManager.formationList[FormationTypeDef.FORMATION_ENDLESS_MAP].teamPokemonInfos) + + LogYellow("MapManager.curMapId22:"..MapManager.curMapId) + NetManager.QuickFightRequest(function(msg) + CarbonManager.InitQuickFightData(monsterGroupId, eventId, msg) + end) + else + local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_DREAMLAND) + local choosedList={} + table.insert(choosedList, {heroId = MapTrialManager.selectHeroDid, position=2}) + FormationManager.RefreshFormation(FormationTypeDef.FORMATION_DREAMLAND,choosedList, + FormationManager.formationList[FormationTypeDef.FORMATION_DREAMLAND].teamPokemonInfos) + + NetManager.QuickFightRequest(function(msg) + --更新英雄HP + MapTrialManager.SetHeroHp(msg.remainHpList,MapTrialManager.selectHeroDid) + CarbonManager.InitQuickFightData(monsterGroupId, eventId, msg) + --更新精气值 + MapTrialManager.powerValue = msg.essenceValue + -- --召唤Boss + if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then + MapTrialManager.isHaveBoss = true + MapTrialManager.UpdatePowerValue(0) + end + end) + end - NetManager.QuickFightRequest(function(msg) - --更新英雄HP - MapTrialManager.SetHeroHp(msg.remainHpList,MapTrialManager.selectHeroDid) - CarbonManager.InitQuickFightData(monsterGroupId, eventId, msg) - --更新精气值 - MapTrialManager.powerValue = msg.essenceValue - -- --召唤Boss - if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then - MapTrialManager.isHaveBoss = true - MapTrialManager.UpdatePowerValue(0) - end - end) end Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false) end