From 04a11965865ac9a4b134e4bc8e86175d06b331fa Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 25 Oct 2021 16:13:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E5=8A=9B?= =?UTF-8?q?=E3=80=91=E4=B8=80=E6=97=A6=E6=88=98=E6=96=97=E5=8A=9B=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E5=B0=B1=E8=AE=A9=E5=90=8E=E7=AB=AF=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=88=98=E6=96=97=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Formation/FormationManager.lua | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index f3cf4324f1..bfdae8fa28 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -310,6 +310,13 @@ function this.GetFormationPower(formationId) ThinkingAnalyticsManager.SetSuperProperties({ fighting_capacity = power2, }) + + -- 刷新后端战斗力 + if power2 > PlayerManager.maxForce then + Log("发送队伍战力改变 ~~~~~~~~~~~~~~ ") + NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)--targetTeamId + PlayerManager.maxForce = power2 + end -- 编队战斗力刷新 Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationPowerChange, power2) return power2 @@ -348,24 +355,9 @@ function this.CheckFormationHasId(formationId, heroId) return has end - +-- 重新算一遍战斗力 function this.UserPowerChanged() - - local maxPower, targetTeamId = 0 - -- for _, teamInfo in pairs(this.formationList) do - -- if #teamInfo.teamHeroInfos > 0 then - local curFormationWarPower = this.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)--teamInfo.teamId - if curFormationWarPower > maxPower then - maxPower = curFormationWarPower - -- targetTeamId = teamInfo.teamId - end - -- end - -- end - if maxPower > PlayerManager.maxForce then - Log("发送队伍战力改变 ~~~~~~~~~~~~~~ ") - NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)--targetTeamId - PlayerManager.maxForce = maxPower - end + this.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) end -- 获取相应编队的血量数据 From 7b406e1c4b8ae1667fb5078ee950bbf9489141b5 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Mon, 25 Oct 2021 16:37:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=3D=3D=3D=3D=3D=E4=B8=BB=E8=A7=92=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20=E9=98=9F=E4=BC=8D=E6=88=98=E6=96=97?= =?UTF-8?q?=E5=8A=9B=20=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index 0f8ccc792b..ec81f2e539 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -264,11 +264,12 @@ end function this.PokemonUnitAdapter(pokemonUnit,camp,_teamDamage) -- 基础数据 + --LogError("teamdamage=="..tonumber(pokemonUnit.forceScore)) local role = { id = tonumber(pokemonUnit.unitId), position = tonumber(pokemonUnit.position), star = tonumber(pokemonUnit.star), - teamDamage = _teamDamage, + teamDamage = tonumber(pokemonUnit.forceScore), camp = camp, skill = {}, property = {},