From 32b5dd3f66777425c8614d3d57eb7ecd5da54fcd Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 9 Aug 2023 07:39:10 -0400 Subject: [PATCH 1/3] Bugfix: suffix overwrites prefix. --- src/engine/gameManager/LootManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 3b42d940..2b757987 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -255,7 +255,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); } From db2e9a282a9fe0d7cee93e91eeae09ef5ca158e5 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 9 Aug 2023 08:17:53 -0400 Subject: [PATCH 2/3] Only one piece of equip drops at a time. --- src/engine/gameManager/LootManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 2b757987..b2e0d395 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -349,6 +349,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. } } } From 7ce664458f35b76c4ec276b27d08cd1f7c13baa0 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 9 Aug 2023 08:57:50 -0400 Subject: [PATCH 3/3] Server requires a min of 15 database connections to boot. --- src/engine/gameManager/DbManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/DbManager.java b/src/engine/gameManager/DbManager.java index 437a9d5c..74428356 100644 --- a/src/engine/gameManager/DbManager.java +++ b/src/engine/gameManager/DbManager.java @@ -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() +