|
|
|
@ -374,8 +374,8 @@ public enum ForgeManager implements Runnable {
@@ -374,8 +374,8 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
|
|
|
|
|
int modifier = 0; |
|
|
|
|
ModTypeTableEntry modTypeTableEntry = null; |
|
|
|
|
ModTableEntry modRollEntry = null; |
|
|
|
|
int modifierRoll; |
|
|
|
|
ModTableEntry modTableEntry = null; |
|
|
|
|
int rollForModifier; |
|
|
|
|
|
|
|
|
|
switch (itemModType) { |
|
|
|
|
case PREFIX: |
|
|
|
@ -391,16 +391,16 @@ public enum ForgeManager implements Runnable {
@@ -391,16 +391,16 @@ public enum ForgeManager implements Runnable {
|
|
|
|
|
if (modTypeTableEntry == null) |
|
|
|
|
return 0; |
|
|
|
|
|
|
|
|
|
modifierRoll = ThreadLocalRandom.current().nextInt(1, 100 + 1); |
|
|
|
|
rollForModifier = ThreadLocalRandom.current().nextInt(1, 100 + 1); |
|
|
|
|
|
|
|
|
|
if (modifierRoll < 80) { |
|
|
|
|
modifierRoll = LootManager.TableRoll(vendor.getLevel(), false); |
|
|
|
|
modRollEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, modifierRoll); |
|
|
|
|
if (rollForModifier < 80) { |
|
|
|
|
rollForModifier = LootManager.TableRoll(vendor.getLevel(), false); |
|
|
|
|
modTableEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, rollForModifier); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (modRollEntry != null) { |
|
|
|
|
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modRollEntry.action); |
|
|
|
|
modifier = abstractPowerAction.getParent().token; |
|
|
|
|
if (modTableEntry != null) { |
|
|
|
|
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modTableEntry.action); |
|
|
|
|
modifier = abstractPowerAction.getEffectsBase().getToken(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return modifier; |
|
|
|
|