diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua index d13d849f7b..d1548d2aeb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua @@ -150,16 +150,22 @@ function this.GetBattleBestData(Id) -- 怪物只显示最后一层的怪物信息 if data.info and data.info.camp == 0 then -- 计算最大值(不计算异妖的) - if data.info.type == BattleUnitType.Role and data.info.position<7 then + if data.info.type == BattleUnitType.Role then -- 神将 if data.damage > _MaxDamageValue then - _MaxDamageData = { - roleId = data.info.roleData.roleId, - skinId = data.info.roleData.skinId, - damage = data.damage, - } + if data.info.position == 100 then + _MaxDamageData = { + roleId = -1, + skinId = nil, + damage = data.damage, + } + else + _MaxDamageData = { + roleId = data.info.roleData.roleId, + skinId = data.info.roleData.skinId, + damage = data.damage, + } + end _MaxDamageValue = data.damage - elseif data.damage == _MaxDamageValue then - -- 伤害相同如何判断最佳 end end _AllDamageValue = _AllDamageValue + data.damage diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua index dfc6ce6b2b..0fc2cfcbd8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua @@ -1,4 +1,5 @@ require("Base/BasePanel") +local SpiritAnimal = ConfigManager.GetConfig(ConfigName.SpiritAnimal) local BattleBestPopup = Inherit(BasePanel) local this = BattleBestPopup local func2 = nil--此回调目前只有大闹天宫试炼节点用 当有没有事件时 关闭按钮不好使 @@ -31,18 +32,36 @@ function BattleBestPopup:BindEvent() end) end -function this:OnOpen(heroTId,skinId, damageValue, allDamage, func,_func2) +function this:OnOpen(heroTId, skinId, damageValue, allDamage, func,_func2) func2 = _func2 -- 创建立绘 - local heroTData=nil - --如果有皮肤读取皮肤表里面的数据,没有读取hero表 - if skinId and skinId>0 then - heroTData=ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",skinId) + local heroTData = {} + if heroTId > 0 then + --如果有皮肤读取皮肤表里面的数据,没有读取hero表 + local data = nil + if skinId and skinId>0 then + data = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",skinId) + else + data= ConfigManager.GetConfigData(ConfigName.HeroConfig,heroTId) + end + heroTData.Live = GetResourcePath(data.Live) + heroTData.Scale = data.Scale + heroTData.Position = data.Position + heroTData.Name = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.HeroConfig,heroTId).ReadingName) else - heroTData= ConfigManager.GetConfigData(ConfigName.HeroConfig,heroTId) + if NameManager.roleSex == ROLE_SEX.BOY then + heroTData.Live = "live2d_npc_boy" + heroTData.Scale = 0.6 + heroTData.Position = {127, -164} + else + heroTData.Live = "live2d_npc_girl" + heroTData.Scale = 0.6 + heroTData.Position = {127, -340} + end + heroTData.Name = NameManager.roleName end - this.liveName = GetResourcePath(heroTData.Live) + this.liveName = heroTData.Live this.liveNode = poolManager:LoadLive(this.liveName, this.firstRole.transform, Vector3.one * heroTData.Scale, Vector3.New(heroTData.Position[1], heroTData.Position[2])) this.liveNode.transform.sizeDelta = Vector2.New(10, 10) local SkeletonGraphic = this.liveNode:GetComponent("SkeletonGraphic") @@ -58,7 +77,7 @@ function this:OnOpen(heroTId,skinId, damageValue, allDamage, func,_func2) -- 名称 - this.firstName.text = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.HeroConfig,heroTId).ReadingName) + this.firstName.text = heroTData.Name -- 伤害数值 this.firstDamage.text = damageValue -- 伤害占比