Browse Source

好友头像

zhaoyang 2 years ago
parent
commit
95c0da3a3e
1 changed files with 9 additions and 0 deletions
  1. 9 0
      GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -1,6 +1,7 @@
 using UnityEngine;
 using FairyGUI;
 using UI.Friend;
+using UI.CommonGame;
 
 namespace GFGGame
 {
@@ -139,6 +140,14 @@ namespace GFGGame
             FriendInfoData friendInfo = FriendDataManager.Instance.FriendDatas[index];
 
             UI_ListItem item = UI_ListItem.Proxy(obj);
+
+            ItemCfg headCfg = ItemCfgArray.Instance.GetCfg(friendInfo.roleInfo.roleHead);
+            ItemCfg headBorderCfg = ItemCfgArray.Instance.GetCfg(friendInfo.roleInfo.roleHeadBorder);
+            UI_ComHead comHead = UI_ComHead.Proxy(item.m_comHead);
+            comHead.m_loaIcon.url = ResPathUtil.GetHeadPath(headCfg.res);
+            comHead.m_loaBorder.url = ResPathUtil.GetHeadBorderPath(headBorderCfg.res);
+            UI_ComHead.ProxyEnd();
+
             item.m_txtName.text = friendInfo.roleInfo.roleName;
             item.m_txtLvl.text = friendInfo.roleInfo.roleLv.ToString();
             item.m_c2.selectedIndex = friendInfo.roleInfo.offlineTimeSec == 0 ? 0 : 1;