|
@@ -51,7 +51,7 @@ namespace GFGGame
|
|
|
RoleInfoManager.Instance.SortHeadBorderDatas();
|
|
|
_headCfgs.AddRange(ItemCfgArray.Instance.GetCfgsByitemTypeAndsubType(ConstItemType.HEAD, ConstItemSubType.ROLE_HEAD));
|
|
|
_headCfgs = SoreItemCfgDatas(_headCfgs);
|
|
|
- _headBorderCfgs.AddRange(ItemCfgArray.Instance.GetCfgsByitemTypeAndsubType(ConstItemType.HEAD, ConstItemSubType.ROLE_HEAD));
|
|
|
+ _headBorderCfgs.AddRange(ItemCfgArray.Instance.GetCfgsByitemTypeAndsubType(ConstItemType.HEAD, ConstItemSubType.ROLE_HEADBORDER));
|
|
|
_headBorderCfgs = SoreItemCfgDatas(_headBorderCfgs);
|
|
|
OnTabChange();
|
|
|
// _ui.m_list.selectedIndex = 0;
|
|
@@ -69,6 +69,11 @@ namespace GFGGame
|
|
|
{
|
|
|
if (_ui.m_c1.selectedIndex == 0)
|
|
|
{
|
|
|
+ if (ItemDataManager.GetItemNum(_selectHeadId) <= 0)
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("暂未获得");
|
|
|
+ return;
|
|
|
+ }
|
|
|
bool result = await RoleInfoSProxy.ReqModifyRoleHead(_selectHeadId);
|
|
|
if (result)
|
|
|
{
|
|
@@ -77,6 +82,11 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ if (ItemDataManager.GetItemNum(_selectHeadBorderId) <= 0)
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("暂未获得");
|
|
|
+ return;
|
|
|
+ }
|
|
|
bool result = await RoleInfoSProxy.ReqModifyRoleHeadBorder(_selectHeadBorderId);
|
|
|
if (result)
|
|
|
{
|
|
@@ -129,11 +139,7 @@ namespace GFGGame
|
|
|
{
|
|
|
GObject obj = context.data as GObject;
|
|
|
_selectHeadId = (int)obj.data;
|
|
|
- if (ItemDataManager.GetItemNum(_selectHeadId) <= 0)
|
|
|
- {
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("暂未获得");
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
UpdateView();
|
|
|
}
|
|
|
|
|
@@ -141,11 +147,7 @@ namespace GFGGame
|
|
|
{
|
|
|
GObject obj = context.data as GObject;
|
|
|
_selectHeadBorderId = (int)obj.data;
|
|
|
- if (ItemDataManager.GetItemNum(_selectHeadBorderId) <= 0)
|
|
|
- {
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("暂未获得");
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
UpdateView();
|
|
|
}
|
|
|
|
|
@@ -185,11 +187,11 @@ namespace GFGGame
|
|
|
list.Sort((ItemCfg a, ItemCfg b) =>
|
|
|
{
|
|
|
long hasA = ItemDataManager.GetItemNum(a.id);
|
|
|
- long hasB = ItemDataManager.GetItemNum(a.id);
|
|
|
- if (hasA > 0 && hasB <= 0) return 1;
|
|
|
- if (hasB > 0 && hasA <= 0) return -1;
|
|
|
+ long hasB = ItemDataManager.GetItemNum(b.id);
|
|
|
+ if (hasA > 0 && hasB <= 0) return -1;
|
|
|
+ if (hasB > 0 && hasA <= 0) return 1;
|
|
|
|
|
|
- return b.id - a.id;
|
|
|
+ return a.id - b.id;
|
|
|
});
|
|
|
return list;
|
|
|
}
|