diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua index 112698a9bc..dbc23de2f6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua @@ -93,6 +93,7 @@ function this.GetBattleRecord(Id) record.monsterId = role.roleData.monsterId record.roleLv = role:GetRoleData(RoleDataName.Level) record.camp = role.camp + record.skinId=role.roleData.skinId record.damage = 0 record.heal = 0 record.type = 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua index 2e3843bcf8..35d427a918 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleBestPopup.lua @@ -30,10 +30,17 @@ function BattleBestPopup:BindEvent() end) end -function this:OnOpen(heroTId, damageValue, allDamage, func,_func2) +function this:OnOpen(heroTId,skinId, damageValue, allDamage, func,_func2) func2 = _func2 -- 创建立绘 - local heroTData = ConfigManager.GetConfigData(ConfigName.HeroConfig, heroTId) + local heroTData=nil + --如果有皮肤读取皮肤表里面的数据,没有读取hero表 + if skinId and skinId>0 then + heroTData=ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",skinId) + else + heroTData= ConfigManager.GetConfigData(ConfigName.HeroConfig,heroTId) + end + this.liveName = GetResourcePath(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(1000, 1000) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index fc225c8923..a811826d4a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -414,7 +414,7 @@ function this.ShowBattleResult(result, msg) local bestData, allDamage= BattleRecordManager.GetBattleBestData() if bestData then -- 胜利显示本场比赛的表现最好的英雄 - UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup) + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function() --车迟挑战cd计时 @@ -434,7 +434,7 @@ function this.ShowBattleResult(result, msg) local bestData, allDamage= BattleRecordManager.GetBattleBestData() if bestData then -- 胜利显示本场比赛的表现最好的英雄 - UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup) + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 UIManager.OpenPanel(UIName.RewardItemPopup, DeathPosManager.drop, 1,function() if _BattleBestPopup then @@ -452,7 +452,7 @@ function this.ShowBattleResult(result, msg) local bestData, allDamage= BattleRecordManager.GetBattleBestData() if bestData then -- 胜利显示本场比赛的表现最好的英雄 - UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup) + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 UIManager.OpenPanel(UIName.RewardItemPopup,GuildTranscriptManager.drop, 1,function() if _BattleBestPopup then @@ -472,7 +472,7 @@ function this.ShowBattleResult(result, msg) local bestData, allDamage= BattleRecordManager.GetBattleBestData() FightPointPassManager.oldLevel = PlayerManager.level if bestData then - UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup) + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 UIManager.OpenPanel(UIName.RewardItemPopup, this.lastBattleResult.drop, 1,function() if _BattleBestPopup then diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua index 27713ecb95..6e970cea83 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua @@ -85,7 +85,7 @@ function BattleWinPopup:NextStep() local bestData, allDamage= BattleRecordManager.GetBattleBestData() if bestData then -- 胜利显示本场比赛的表现最好的英雄 - UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup) + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function() if _BattleBestPopup then @@ -121,7 +121,7 @@ function BattleWinPopup:NextStep() Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel) end end - UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup) + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) --贪婪节点不弹领取圣物 if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点 if m_battleResult.drop.itemlist and #m_battleResult.drop.itemlist > 0 then @@ -178,7 +178,7 @@ function BattleWinPopup:NextStep() local bestData, allDamage= BattleRecordManager.GetBattleBestData() if bestData then -- 胜利显示本场比赛的表现最好的英雄 - UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup) + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function() --车迟抢夺cd计时