|
@@ -58,8 +58,19 @@ namespace GFGGame
|
|
{
|
|
{
|
|
listItem.m_list.itemRenderer = ListItemRewardRender;
|
|
listItem.m_list.itemRenderer = ListItemRewardRender;
|
|
}
|
|
}
|
|
- listItem.m_list.data = luckyBoxBonusData.itemList;
|
|
|
|
- listItem.m_list.numItems = luckyBoxBonusData.itemList.Count;
|
|
|
|
|
|
+ List<ItemData> bonusData = new List<ItemData>();
|
|
|
|
+ bool hasSame = false;
|
|
|
|
+ foreach (var info in luckyBoxBonusData.itemList) {
|
|
|
|
+ hasSame = false;
|
|
|
|
+ foreach (var infoBonus in bonusData) {
|
|
|
|
+ if (info.id == infoBonus.id)
|
|
|
|
+ hasSame = true;
|
|
|
|
+ }
|
|
|
|
+ if(!hasSame)
|
|
|
|
+ bonusData.Add(info);
|
|
|
|
+ }
|
|
|
|
+ listItem.m_list.data = bonusData;
|
|
|
|
+ listItem.m_list.numItems = bonusData.Count;
|
|
listItem.m_list.ResizeToFit();
|
|
listItem.m_list.ResizeToFit();
|
|
listItem.target.height = listItem.m_list.y + listItem.m_list.height;
|
|
listItem.target.height = listItem.m_list.y + listItem.m_list.height;
|
|
UI_CompLuckyBoxBonusListItem.ProxyEnd();
|
|
UI_CompLuckyBoxBonusListItem.ProxyEnd();
|