|
@@ -42,16 +42,14 @@ namespace GFGGame
|
|
dicIndex++;
|
|
dicIndex++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
public Dictionary<int, ItemData> FirstRewardList
|
|
public Dictionary<int, ItemData> FirstRewardList
|
|
{
|
|
{
|
|
get { return _firstRewardsList; }
|
|
get { return _firstRewardsList; }
|
|
set { _firstRewardsList = value; }
|
|
set { _firstRewardsList = value; }
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
private int _currentBoxId;
|
|
private int _currentBoxId;
|
|
- private int _currentSelectId;
|
|
|
|
public int currentBoxId
|
|
public int currentBoxId
|
|
{
|
|
{
|
|
get
|
|
get
|
|
@@ -74,7 +72,20 @@ namespace GFGGame
|
|
_showList = GetBonusDataList(luckyBoxCfg.bonusShowArr);
|
|
_showList = GetBonusDataList(luckyBoxCfg.bonusShowArr);
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ private List<LuckyBoxBonusData> GetBonusDataList(int[] idsList)
|
|
|
|
+ {
|
|
|
|
+ List<LuckyBoxBonusData> list = new List<LuckyBoxBonusData>();
|
|
|
|
+ foreach (int id in idsList)
|
|
|
|
+ {
|
|
|
|
+ BonusListCfg bonusListCfg = BonusListCfgArray.Instance.GetCfg(id);
|
|
|
|
+ LuckyBoxBonusData luckyBoxBonusData = new LuckyBoxBonusData();
|
|
|
|
+ luckyBoxBonusData.id = id;
|
|
|
|
+ luckyBoxBonusData.name = bonusListCfg.name;
|
|
|
|
+ luckyBoxBonusData.itemList = ItemUtil.CreateItemDataList(bonusListCfg.bonusListArr);
|
|
|
|
+ list.Add(luckyBoxBonusData);
|
|
|
|
+ }
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
|
|
public int GetOwnedCount()
|
|
public int GetOwnedCount()
|
|
{
|
|
{
|
|
@@ -97,20 +108,7 @@ namespace GFGGame
|
|
return _showList.GetRange(0, _showList.Count);
|
|
return _showList.GetRange(0, _showList.Count);
|
|
}
|
|
}
|
|
|
|
|
|
- private List<LuckyBoxBonusData> GetBonusDataList(int[] idsList)
|
|
|
|
- {
|
|
|
|
- List<LuckyBoxBonusData> list = new List<LuckyBoxBonusData>();
|
|
|
|
- foreach (int id in idsList)
|
|
|
|
- {
|
|
|
|
- BonusListCfg bonusListCfg = BonusListCfgArray.Instance.GetCfg(id);
|
|
|
|
- LuckyBoxBonusData luckyBoxBonusData = new LuckyBoxBonusData();
|
|
|
|
- luckyBoxBonusData.id = id;
|
|
|
|
- luckyBoxBonusData.name = bonusListCfg.name;
|
|
|
|
- luckyBoxBonusData.itemList = ItemUtil.CreateItemDataList(bonusListCfg.bonusListArr);
|
|
|
|
- list.Add(luckyBoxBonusData);
|
|
|
|
- }
|
|
|
|
- return list;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
//获取首次获得的服装的列表
|
|
//获取首次获得的服装的列表
|
|
public List<ItemData> GetFirstClothingList()
|
|
public List<ItemData> GetFirstClothingList()
|
|
{
|
|
{
|
|
@@ -149,7 +147,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
else//购买消耗品的道具不足,提示购买 购买消耗品的道具
|
|
else//购买消耗品的道具不足,提示购买 购买消耗品的道具
|
|
{
|
|
{
|
|
- ItemUtil.ExchangeItemById(costItemId, needNum, true, null, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED, true);
|
|
|
|
|
|
+ ItemUtil.ExchangeItemById(costItemId, costItemNeedNum - costHasNum, true, null, true, GameConst.MAX_COUNT_TO_BUY_DIAMOND_RED, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|