Don't try to find a treasure if there aren't any.

Fixes #1572
This commit is contained in:
GJ 2013-10-28 08:52:55 -04:00
parent ad4ee6f402
commit c612036db3

View File

@ -454,6 +454,11 @@ public class FishingManager extends SkillManager {
} }
List<FishingTreasure> fishingTreasures = TreasureConfig.getInstance().fishingRewards.get(rarity); List<FishingTreasure> fishingTreasures = TreasureConfig.getInstance().fishingRewards.get(rarity);
if (fishingTreasures.isEmpty()) {
return null;
}
treasure = fishingTreasures.get(Misc.getRandom().nextInt(fishingTreasures.size())); treasure = fishingTreasures.get(Misc.getRandom().nextInt(fishingTreasures.size()));
break; break;
} }