From 946aaa36ea4b047ddb123d4e37e45233022f2641 Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Mon, 31 Aug 2020 15:54:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=A5=9E=E5=B0=86=E5=BD=92?= =?UTF-8?q?=E5=85=83=20=E6=97=A0=E5=B0=BD=E5=92=8C=E5=A4=A7=E9=97=B9?= =?UTF-8?q?=E5=A4=A9=E5=AE=AB=E4=B8=80=E7=BA=A7=E4=B8=8A=E9=98=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=20=20=E7=A5=9E=E5=B0=86=E7=BD=AE=E6=8D=A2=E5=A4=A7?= =?UTF-8?q?=E9=97=B9=E5=A4=A9=E5=AE=AB=E7=BC=96=E9=98=9F=E6=B2=A1=E8=A1=80?= =?UTF-8?q?=E9=87=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompoundHero/view/CompoundHero_Replace.lua | 1 + .../~Lua/Modules/Formation/FormationManager.lua | 16 ++++++++++++++++ .../Guild/Transcript/GuildTranscriptManager.lua | 3 +++ .../~Lua/Modules/Hero/HeroManager.lua | 1 + 4 files changed, 21 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua b/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua index 46892fc72a..dafcf08b20 100644 --- a/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua +++ b/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua @@ -109,6 +109,7 @@ function this:BindEvent() for i = 1, #msg.drop.Hero do HeroManager.UpdateHeroDatas(msg.drop.Hero[i]) + ExpeditionManager.InitHeroHpValue(msg.drop.Hero[i].id) end curSelectHero = HeroManager.GetSingleHeroData(msg.drop.Hero[1].id) this.ShowCurrPosHeroReplace(curIndex) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index 8abf272991..6e72e21e44 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -432,6 +432,22 @@ function this.AllFormationDeleCurHeroId(heroDid) end end end +-- 归元时检测无尽 和 大闹天宫阵容是否需要下阵 +function this.ResolvDownBattleCurHeroId(heroDid) + for i, team in pairs(this.formationList) do + local removeIndex + if i == FormationTypeDef.EXPEDITION or i == FormationTypeDef.FORMATION_ENDLESS_MAP then + for j = 1, #team.teamHeroInfos do + if team.teamHeroInfos[j] and team.teamHeroInfos[j].heroId == heroDid then + removeIndex = j + end + end + if removeIndex then + table.remove( team.teamHeroInfos, removeIndex) + end + end + end +end -- 获取当前光环的加成数据 type 编队类型 function this.GetCurFormationElementAdd(teamHeroInfos) diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptManager.lua b/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptManager.lua index 141e9a9c29..dbbaeab789 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptManager.lua @@ -147,6 +147,9 @@ function this.GetCurBoss() return curBoss end function this.GetBlood() + if blood < 0 then + blood = 10000 + end return blood end function this.GetCanSweep() diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index cd29f523b4..b456eda1e8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -2910,6 +2910,7 @@ function this.ResetHero(dynamicloadId) heroDatas[dynamicloadId].lv = 1 heroDatas[dynamicloadId].breakId = 0 end + FormationManager.ResolvDownBattleCurHeroId(dynamicloadId) end --神将合成 function this.ByCompoundHeroGetAllHeros()