From 8ca641f3530a12f2c7d20a7cbe9f121615a16362 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 31 May 2024 07:41:25 -0400 Subject: [PATCH] Return 0 for null table entry. --- src/engine/gameManager/ForgeManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 55d15193..6939ad4d 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -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(); }