Browse Source

Item prefix and suffix applied

combat-2
MagicBot 8 months ago
parent
commit
92c8430031
  1. 11
      src/engine/gameManager/ForgeManager.java

11
src/engine/gameManager/ForgeManager.java

@ -379,12 +379,12 @@ public enum ForgeManager implements Runnable {
switch (itemModType) { switch (itemModType) {
case PREFIX: case PREFIX:
modifier = vendor.getModTypeTable().get(vendor.getItemModTable().indexOf(modTable)); int randomPrefix = vendor.getModTypeTable().get(vendor.getItemModTable().indexOf(modTable));
modTypeTableEntry = ModTypeTableEntry.rollTable(modifier, ThreadLocalRandom.current().nextInt(1, 100 + 1)); modTypeTableEntry = ModTypeTableEntry.rollTable(randomPrefix, ThreadLocalRandom.current().nextInt(1, 100 + 1));
break; break;
case SUFFIX: case SUFFIX:
modifier = vendor.getModSuffixTable().get(vendor.getItemModTable().indexOf(modTable)); int randomSuffix = vendor.getModSuffixTable().get(vendor.getItemModTable().indexOf(modTable));
modTypeTableEntry = ModTypeTableEntry.rollTable(modifier, ThreadLocalRandom.current().nextInt(1, 100 + 1)); modTypeTableEntry = ModTypeTableEntry.rollTable(randomSuffix, ThreadLocalRandom.current().nextInt(1, 100 + 1));
break; break;
} }
@ -396,9 +396,6 @@ public enum ForgeManager implements Runnable {
if (rollForModifier < 80) { if (rollForModifier < 80) {
int randomModifier = LootManager.TableRoll(vendor.getLevel(), false); int randomModifier = LootManager.TableRoll(vendor.getLevel(), false);
modTableEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, randomModifier); modTableEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, randomModifier);
}
if (modTableEntry != null) {
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modTableEntry.action); AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modTableEntry.action);
modifier = abstractPowerAction.getEffectsBase().getToken(); modifier = abstractPowerAction.getEffectsBase().getToken();
} }

Loading…
Cancel
Save