|
@@ -138,18 +138,30 @@ namespace GFGGame
|
|
_ui.m_c2.selectedIndex = collegeBoostNextCfg.consumeArr.Length;
|
|
_ui.m_c2.selectedIndex = collegeBoostNextCfg.consumeArr.Length;
|
|
for (int i=0;i< collegeBoostNextCfg.consumeArr.Length;i++)
|
|
for (int i=0;i< collegeBoostNextCfg.consumeArr.Length;i++)
|
|
{
|
|
{
|
|
- UI_ComItem000 item = UI_ComItem000.Proxy(itemList[i]);
|
|
|
|
- int id = collegeBoostNextCfg.consumeArr[i][0];
|
|
|
|
- int count = collegeBoostNextCfg.consumeArr[i][1];
|
|
|
|
- ItemData itemDate = ItemUtil.createItemData(id, count);
|
|
|
|
- ItemView itemView = new ItemView(item.target);
|
|
|
|
- itemView.SetData(itemDate);
|
|
|
|
- if(item.target.data == null)
|
|
|
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(collegeBoostNextCfg.consumeArr[i][0]);
|
|
|
|
+ UI_ComItem item = UI_ComItem.Proxy(itemList[i]);
|
|
|
|
+ item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
|
|
|
|
+ //item.m_txtCount.SetVar("count", itemData.num.ToString()).FlushVars();
|
|
|
|
+ ItemData itemCount;
|
|
|
|
+ long count;
|
|
|
|
+ if (BagDataManager.Instance.GetBagData().TryGetValue(collegeBoostNextCfg.consumeArr[i][0], out itemCount))
|
|
|
|
+ {
|
|
|
|
+ count = itemCount.num;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ count = 0;
|
|
|
|
+ }
|
|
|
|
+ item.m_txtCount.text = collegeBoostNextCfg.consumeArr[i][1].ToString() + "/" + count.ToString();
|
|
|
|
+ item.m_QualityType.selectedIndex = itemCfg.rarity - 1;
|
|
|
|
+ item.m_ShowName.selectedIndex = 1;
|
|
|
|
+ item.m_txtName.text = itemCfg.name;
|
|
|
|
+ if (item.target.data == null)
|
|
{
|
|
{
|
|
item.target.onClick.Add(OnClickListDressUpItem);
|
|
item.target.onClick.Add(OnClickListDressUpItem);
|
|
}
|
|
}
|
|
- item.target.data = id;
|
|
|
|
- UI_ComItem000.ProxyEnd();
|
|
|
|
|
|
+ item.target.data = collegeBoostNextCfg.consumeArr[i][0];
|
|
|
|
+ UI_ComItem.ProxyEnd();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -174,9 +186,8 @@ namespace GFGGame
|
|
private void OnClickListDressUpItem(EventContext eventContext)
|
|
private void OnClickListDressUpItem(EventContext eventContext)
|
|
{
|
|
{
|
|
int id = (int)(eventContext.sender as GObject).data;
|
|
int id = (int)(eventContext.sender as GObject).data;
|
|
-
|
|
|
|
- object[] goBackDatas = ViewManager.GetGoBackDatas(typeof(ClothingUpgradeView).Name);
|
|
|
|
- object[] sourceDatas = new object[] { id, goBackDatas, 1 };
|
|
|
|
|
|
+ object[] sourceDatas = new object[]
|
|
|
|
+ { id, new object[] { typeof(BagView).FullName, this.viewData } };
|
|
GoodsItemTipsController.ShowItemTips(id, sourceDatas);
|
|
GoodsItemTipsController.ShowItemTips(id, sourceDatas);
|
|
}
|
|
}
|
|
private async void OnClickUpgrade()
|
|
private async void OnClickUpgrade()
|