From bdb02e9fa4e0c12fdac069acfd1b41a413c68e68 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Tue, 30 Nov 2021 11:04:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=88=98=E6=96=97]=3D=3D=3D=3D=3D=E7=9A=AE?= =?UTF-8?q?=E8=82=A4=E7=AB=8B=E7=BB=98=E6=9C=9D=E5=90=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua | 2 +- .../~Lua/Modules/RoleInfo/RoleInfoPanel.lua | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 13f418ef81..911fb7de0d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -427,7 +427,7 @@ function BattleUtil.ChooseTarget(role, chooseId) return BattleUtil.GetHpPctLessThanPctHero(arr,0.40) elseif chooseWeight ==13 then --剩余血量百分比低于50%且生命绝对值最小 return BattleUtil.GetHpPctLessThanPctHero(arr,0.50) - elseif chooseWeight ==14 then + elseif chooseWeight ==14 then --我方战位最靠前的单位 的对位及相邻 local list=nil list=RoleManager.Query(function (r) return r.camp == role.camp end) if list and #list>0 then diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua index 23af0bf4aa..af8cc168fa 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua @@ -716,10 +716,17 @@ function this:ChangeCurentHeroSkinLive(herodata) end if herodata then this.curLiveObj=HeroManager.LoadHerolive1(herodata,this.curObj) - if herodata.heroConfig then - SetHEeroLiveToward(this.curLiveObj,herodata.heroConfig.Toward,herodata.position) + local toward=0 + local pos=nil + if herodata.Type~=0 then + local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,herodata.Type) + if roleCon then + toward=roleCon.Toward + end + else + toward=herodata.heroConfig.Toward end - + SetHEeroLiveToward(this.curLiveObj,toward,herodata.Position) -- 临时保存皮肤位置 curHeroPosition = herodata.Position else