Ejemplo n.º 1
0
 private void Guard(LootGroup group)
 {
     if (group is LootTable)
     {
         throw new ArgumentOutOfRangeException(
                   nameof(group),
                   "Cannot append a LootTable to another LootTable due to circular referencing"
                   );
     }
 }
Ejemplo n.º 2
0
 public void Add(LootGroup group, int minQuantity, int maxQuantity, double chance)
 {
     Guard(group);
     Groups.Add(new LootEntryGroup(group, minQuantity, maxQuantity, chance));
 }