From a3ef81c2fa3d442c612d3c39512f5e3fbf1219ed Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Wed, 5 Nov 2025 18:47:02 +0800 Subject: [PATCH] fix bug --- lua/app/ui/arena/arena_match_ui.lua | 4 ++-- lua/app/ui/common/cell/player_head_cell.lua | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/app/ui/arena/arena_match_ui.lua b/lua/app/ui/arena/arena_match_ui.lua index 30582580..99c209fd 100644 --- a/lua/app/ui/arena/arena_match_ui.lua +++ b/lua/app/ui/arena/arena_match_ui.lua @@ -187,7 +187,7 @@ function ArenaMatchUI:showMatchResult() self.txFormation:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_10)) self.imgAd:setActive(DataManager.ArenaData:canAdRematch()) - self.matchAvatar:refresh(matchInfo.avatar, matchInfo.avatar_frame) + self.matchAvatar:refresh(matchInfo.avatar, matchInfo.avatar_frame, nil, true) local name = matchInfo.name if name == nil or #name == 0 then name = I18N:getGlobalText(I18N.GlobalConst.NEW_PLAYER) @@ -197,7 +197,7 @@ function ArenaMatchUI:showMatchResult() self.matchGrading:refresh(DataManager.ArenaData:getGradingIdFromScore(matchInfo.score)) self.matchHeroFormationComp:refreshByEntitys(GFunc.formatPlayerFormationInfo(matchInfo)) - self.selfAvatar:refresh() + self.selfAvatar:refresh(nil, nil, nil, true) self.selfTxName:setText(DataManager.PlayerData:getNickname()) self.selfTxLevel:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, DataManager.PlayerData:getLv())) self.selfGrading:refresh(DataManager.ArenaData:getGradingId()) diff --git a/lua/app/ui/common/cell/player_head_cell.lua b/lua/app/ui/common/cell/player_head_cell.lua index 2cdb56be..d2f9b2da 100644 --- a/lua/app/ui/common/cell/player_head_cell.lua +++ b/lua/app/ui/common/cell/player_head_cell.lua @@ -8,7 +8,7 @@ function PlayerHeadCell:init() end -- (avatarId:头像id,frameId:头像框id) -function PlayerHeadCell:refresh(avatarId, frameId, showRp) +function PlayerHeadCell:refresh(avatarId, frameId, showRp, showNormal) if avatarId == nil or frameId == nil then -- 是玩家自己 avatarId = DataManager.PlayerData:getUsingAvatarId() @@ -31,7 +31,9 @@ function PlayerHeadCell:refresh(avatarId, frameId, showRp) -- 头像框 local frameName = DataManager.PlayerData:getFrameIconId(frameId) - if frameName then + if showNormal then + self.imgFrame:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, "avatar_frame_2") + elseif frameName then self.imgFrame:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, frameName, function() self.imgFrame:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize() end)