Browse Source

Update to modifier returned

combat-2
MagicBot 8 months ago
parent
commit
4549688ad7
  1. 14
      src/engine/gameManager/ForgeManager.java

14
src/engine/gameManager/ForgeManager.java

@ -8,7 +8,6 @@
package engine.gameManager; package engine.gameManager;
import engine.loot.ModTableEntry;
import engine.loot.ModTypeTableEntry; import engine.loot.ModTypeTableEntry;
import engine.loot.WorkOrder; import engine.loot.WorkOrder;
import engine.mbEnums; import engine.mbEnums;
@ -16,7 +15,6 @@ import engine.net.DispatchMessage;
import engine.net.client.msg.ItemProductionMsg; import engine.net.client.msg.ItemProductionMsg;
import engine.objects.*; import engine.objects.*;
import engine.powers.EffectsBase; import engine.powers.EffectsBase;
import engine.powers.poweractions.AbstractPowerAction;
import org.pmw.tinylog.Logger; import org.pmw.tinylog.Logger;
import java.util.ArrayList; import java.util.ArrayList;
@ -364,7 +362,6 @@ 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) {
@ -383,15 +380,8 @@ 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)
modifierRoll = LootManager.TableRoll(vendor.getLevel(), false); modifier = LootManager.TableRoll(vendor.getLevel(), false);
modRollEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, modifierRoll);
}
if (modRollEntry != null) {
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modRollEntry.action);
modifier = abstractPowerAction.getEffectsBase().getToken();
}
return modifier; return modifier;
} }

Loading…
Cancel
Save