|
@@ -8,24 +8,21 @@ namespace GFGGame
|
|
{
|
|
{
|
|
private static Dictionary<int, StoryBonusData> _bonusDic = new Dictionary<int, StoryBonusData>();
|
|
private static Dictionary<int, StoryBonusData> _bonusDic = new Dictionary<int, StoryBonusData>();
|
|
|
|
|
|
- public static List<ItemData> GetBonusList(int levelID, bool hasOnce)
|
|
|
|
|
|
+ public static List<ItemData> GetBonusList(int levelID, bool hasOnce, bool showRandom = false)
|
|
{
|
|
{
|
|
StoryBonusData bonusData = GetBonusData(levelID);
|
|
StoryBonusData bonusData = GetBonusData(levelID);
|
|
List<ItemData> bonusList = new List<ItemData>();
|
|
List<ItemData> bonusList = new List<ItemData>();
|
|
if (hasOnce)
|
|
if (hasOnce)
|
|
{
|
|
{
|
|
bonusList.AddRange(bonusData.bonusOnce);
|
|
bonusList.AddRange(bonusData.bonusOnce);
|
|
- if (bonusData.bonusBase != null)
|
|
|
|
- {
|
|
|
|
- bonusList.AddRange(bonusData.bonusBase);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
- else
|
|
|
|
|
|
+ if (bonusData.bonusBase != null)
|
|
{
|
|
{
|
|
- if (bonusData.bonusBase != null)
|
|
|
|
- {
|
|
|
|
- bonusList.AddRange(bonusData.bonusBase);
|
|
|
|
- }
|
|
|
|
|
|
+ bonusList.AddRange(bonusData.bonusBase);
|
|
|
|
+ }
|
|
|
|
+ if (showRandom)
|
|
|
|
+ {
|
|
|
|
+
|
|
if (bonusData.bonusRandom != null && bonusData.bonusRandom.Count > 0)
|
|
if (bonusData.bonusRandom != null && bonusData.bonusRandom.Count > 0)
|
|
{
|
|
{
|
|
bonusList.AddRange(bonusData.bonusRandom);
|
|
bonusList.AddRange(bonusData.bonusRandom);
|