|
@@ -205,6 +205,12 @@ namespace GFGGame
|
|
public void UpdateHead(GComponent component, int headId, int roleBorderId)
|
|
public void UpdateHead(GComponent component, int headId, int roleBorderId)
|
|
{
|
|
{
|
|
ItemCfg headCfg = ItemCfgArray.Instance.GetCfg(headId == 0 ? ConstItemID.HEADID : headId);
|
|
ItemCfg headCfg = ItemCfgArray.Instance.GetCfg(headId == 0 ? ConstItemID.HEADID : headId);
|
|
|
|
+
|
|
|
|
+ if (headCfg == null)
|
|
|
|
+ {
|
|
|
|
+ headCfg = ItemCfgArray.Instance.GetCfg(ConstItemID.HEADID);
|
|
|
|
+ }
|
|
|
|
+
|
|
ItemCfg headBorderCfg = ItemCfgArray.Instance.GetCfg(roleBorderId == 0 ? ConstItemID.HEADBORDERID : roleBorderId);
|
|
ItemCfg headBorderCfg = ItemCfgArray.Instance.GetCfg(roleBorderId == 0 ? ConstItemID.HEADBORDERID : roleBorderId);
|
|
|
|
|
|
UI_ComHead comHead = UI_ComHead.Proxy(component);
|
|
UI_ComHead comHead = UI_ComHead.Proxy(component);
|
|
@@ -223,6 +229,8 @@ namespace GFGGame
|
|
}
|
|
}
|
|
comHead.m_loaBorder.url = ResPathUtil.GetHeadBorderPath(headBorderCfg.res);
|
|
comHead.m_loaBorder.url = ResPathUtil.GetHeadBorderPath(headBorderCfg.res);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
comHead.m_comHead.m_loaIcon.url = ResPathUtil.GetHeadPath(headCfg.res);
|
|
comHead.m_comHead.m_loaIcon.url = ResPathUtil.GetHeadPath(headCfg.res);
|
|
UI_ComHead.ProxyEnd();
|
|
UI_ComHead.ProxyEnd();
|
|
}
|
|
}
|