Browse Source

Item prefix and suffix applied

combat-2
MagicBot 7 months ago
parent
commit
24a05543c8
  1. 12
      src/engine/gameManager/ForgeManager.java

12
src/engine/gameManager/ForgeManager.java

@ -381,6 +381,7 @@ public enum ForgeManager implements Runnable {
int modifier = 0; int modifier = 0;
ModTypeTableEntry modTypeTableEntry = null; ModTypeTableEntry modTypeTableEntry = null;
ModTableEntry modRollEntry = null;
int modifierRoll; int modifierRoll;
switch (itemModType) { switch (itemModType) {
@ -400,13 +401,14 @@ public enum ForgeManager implements Runnable {
modifierRoll = ThreadLocalRandom.current().nextInt(1, 100 + 1); modifierRoll = ThreadLocalRandom.current().nextInt(1, 100 + 1);
if (modifierRoll < 80) { if (modifierRoll < 80) {
modifier = LootManager.TableRoll(vendor.getLevel(), false); modifierRoll = LootManager.TableRoll(vendor.getLevel(), false);
ModTableEntry modTableEntry = ModTableEntry.rollTable(modTable, modifier); modRollEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, modifierRoll);
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modTableEntry.action); }
if (modRollEntry != null) {
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modRollEntry.action);
modifier = abstractPowerAction.getEffectsBase().getToken(); modifier = abstractPowerAction.getEffectsBase().getToken();
} }
else
modifier = 0;
return modifier; return modifier;
} }

Loading…
Cancel
Save