Browse Source

Return 0 for null table entry.

postwipe-mines
MagicBot 5 months ago
parent
commit
8ca641f353
  1. 6
      src/engine/gameManager/ForgeManager.java

6
src/engine/gameManager/ForgeManager.java

@ -393,6 +393,12 @@ public enum ForgeManager implements Runnable { @@ -393,6 +393,12 @@ public enum ForgeManager implements Runnable {
if (rollForModifier < 80) {
int randomModifier = LootManager.TableRoll(vendor.getLevel(), false);
modTableEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, randomModifier);
// @TODO : Figure out how a null can be returned from a defined set.
if (modTableEntry == null)
return 0;
EffectsBase effectsBase = PowersManager.getEffectByIDString(modTableEntry.action);
modifier = effectsBase.getToken();
}

Loading…
Cancel
Save