Browse Source

Merge remote-tracking branch 'origin/bugfix-mob-casting' into feature-gambler

master
FatBoy-DOTC 1 year ago
parent
commit
39e0059f28
  1. 4
      src/engine/gameManager/DbManager.java
  2. 3
      src/engine/gameManager/LootManager.java

4
src/engine/gameManager/DbManager.java

@ -295,7 +295,9 @@ public enum DbManager { @@ -295,7 +295,9 @@ public enum DbManager {
HikariConfig config = new HikariConfig();
int connectionCount = (Runtime.getRuntime().availableProcessors() * 2) + 1;
// Magicbane requires at least 15 db connections min to boot.
int connectionCount = Math.max(15, Runtime.getRuntime().availableProcessors() * 2) + 1;
config.setMaximumPoolSize(connectionCount);
config.setJdbcUrl("jdbc:mysql://" + ConfigManager.MB_DATABASE_ADDRESS.getValue() +

3
src/engine/gameManager/LootManager.java

@ -263,7 +263,7 @@ public enum LootManager { @@ -263,7 +263,7 @@ public enum LootManager {
return inItem;
if (suffixMod.action.length() > 0) {
inItem.setPrefix(suffixMod.action);
inItem.setSuffix(suffixMod.action);
inItem.addPermanentEnchantment(suffixMod.action, 0, suffixMod.level, true);
}
@ -357,6 +357,7 @@ public enum LootManager { @@ -357,6 +357,7 @@ public enum LootManager {
ml.setIsID(true);
ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1));
mob.getCharItemManager().addItemToInventory(ml);
break; // Exit on first successful roll.
}
}
}

Loading…
Cancel
Save