|
@@ -12,8 +12,8 @@ namespace GFGGame
|
|
|
{
|
|
{
|
|
|
private UI_LuckyBoxNewDressUI _ui;
|
|
private UI_LuckyBoxNewDressUI _ui;
|
|
|
private List<ItemData> _rewardList = new List<ItemData>();
|
|
private List<ItemData> _rewardList = new List<ItemData>();
|
|
|
- // private List<ItemData> _newRewardList = new List<ItemData>();
|
|
|
|
|
- // private List<ItemData> _oldRewardList = new List<ItemData>();
|
|
|
|
|
|
|
+ private List<ItemData> _newRewardList = new List<ItemData>();
|
|
|
|
|
+ private List<ItemData> _oldRewardList = new List<ItemData>();
|
|
|
// private List<ItemData> _showRewardList = new List<ItemData>();
|
|
// private List<ItemData> _showRewardList = new List<ItemData>();
|
|
|
|
|
|
|
|
// private int _type = 0;//弹窗类型:0可跳过,1:首次获得物品不可跳过,2首次获得物品不可跳过,不弹获得套装界面
|
|
// private int _type = 0;//弹窗类型:0可跳过,1:首次获得物品不可跳过,2首次获得物品不可跳过,不弹获得套装界面
|
|
@@ -61,19 +61,19 @@ namespace GFGGame
|
|
|
|
|
|
|
|
_rewardList = this.viewData as List<ItemData>;
|
|
_rewardList = this.viewData as List<ItemData>;
|
|
|
_ui.m_btnPass.visible = false;
|
|
_ui.m_btnPass.visible = false;
|
|
|
- // _newRewardList.Clear();
|
|
|
|
|
- // _oldRewardList.Clear();
|
|
|
|
|
- // for (int i = 0; i < _rewardList.Count; i++)
|
|
|
|
|
- // {
|
|
|
|
|
- // if (GetThisCount(_rewardList[i].id, _rewardList) == ItemDataManager.GetItemNum(_rewardList[i].id) && !IsAddToNewRewardList(_rewardList[i].id))
|
|
|
|
|
- // {
|
|
|
|
|
- // _newRewardList.Add(_rewardList[i]);
|
|
|
|
|
- // }
|
|
|
|
|
- // else
|
|
|
|
|
- // {
|
|
|
|
|
- // _oldRewardList.Add(_rewardList[i]);
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ _newRewardList.Clear();
|
|
|
|
|
+ _oldRewardList.Clear();
|
|
|
|
|
+ for (int i = 0; i < _rewardList.Count; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (GetThisCount(_rewardList[i].id, _rewardList) == ItemDataManager.GetItemNum(_rewardList[i].id) && !IsAddToNewRewardList(_rewardList[i].id))
|
|
|
|
|
+ {
|
|
|
|
|
+ _newRewardList.Add(_rewardList[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ _oldRewardList.Add(_rewardList[i]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// if (LuckyBoxDataManager.Instance.luckyBoxId > 0)//必展示必掉奖励
|
|
// if (LuckyBoxDataManager.Instance.luckyBoxId > 0)//必展示必掉奖励
|
|
|
// {
|
|
// {
|
|
|
// int[][] bonus = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.luckyBoxId).bonusArr;
|
|
// int[][] bonus = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.luckyBoxId).bonusArr;
|
|
@@ -87,8 +87,8 @@ namespace GFGGame
|
|
|
}
|
|
}
|
|
|
private void UpdateView()
|
|
private void UpdateView()
|
|
|
{
|
|
{
|
|
|
- // _ui.m_btnPass.visible = _newRewardList.Count <= 1;
|
|
|
|
|
- // _newRewardList.Count > 0 ? _newRewardList : _oldRewardList;
|
|
|
|
|
|
|
+ _ui.m_btnPass.visible = _newRewardList.Count <= 1;
|
|
|
|
|
+ _rewardList = _newRewardList.Count > 0 ? _newRewardList : _oldRewardList;
|
|
|
|
|
|
|
|
if (_rewardList.Count - 1 < 0) return;
|
|
if (_rewardList.Count - 1 < 0) return;
|
|
|
ItemData itemdata = _rewardList[_rewardList.Count - 1];
|
|
ItemData itemdata = _rewardList[_rewardList.Count - 1];
|