diff --git a/src/engine/gameManager/SpecialLootHandler.java b/src/engine/gameManager/SpecialLootHandler.java index d7315e2a..f0da5736 100644 --- a/src/engine/gameManager/SpecialLootHandler.java +++ b/src/engine/gameManager/SpecialLootHandler.java @@ -281,11 +281,16 @@ public class SpecialLootHandler { return; MobLoot resource = new MobLoot(mob,resourceBase,false); try { - int stackMax = (int) (Warehouse.maxResources.get(resourceId) * 0.02f); + int stackMax = (int) (getMaxResource(resourceId) * 0.02f); if (stackMax > 100) stackMax = 100; - resource.setNumOfItems(ThreadLocalRandom.current().nextInt(stackMax)); + + int amount = ThreadLocalRandom.current().nextInt(stackMax); + resource.setNumOfItems(amount); + + Logger.error("Set Stack Size For: " +resource.getName() + " To: " + amount + ". Actual Amount = " + resource.getNumOfItems()); + }catch(Exception e) { Logger.error("Unable To Get Max Resource Stack Size For: " + resourceId); } @@ -359,4 +364,33 @@ public class SpecialLootHandler { } return 0; } + + public static int getMaxResource(int key) { + switch (key) { + case 1580000: return 10000; + case 1580001: return 2000; + case 1580002: return 2000; + case 1580003: return 1000; + case 1580004: return 10000; + case 1580005: return 3000; + case 1580006: return 3000; + case 1580007: return 1000; + case 1580008: return 3000; + case 1580009: return 2000; + case 1580010: return 2000; + case 1580011: return 1000; + case 1580012: return 2000; + case 1580013: return 3000; + case 1580014: return 1000; + case 1580015: return 1000; + case 1580016: return 1000; + case 1580017: return 500; + case 1580018: return 500; + case 1580019: return 500; + case 1580020: return 500; + case 1580021: return 500; + default: return 0; // Default value if the key is not found + } + } + }