From d14b21fc9e58ac8f8a07f96952521970281142b5 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 24 Mar 2024 20:51:41 -0500 Subject: [PATCH] mithril only drops form R8 mobs --- src/engine/gameManager/LootManager.java | 27 ++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 6fb47ecc..d489f7a0 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -39,6 +39,8 @@ public enum LootManager { public static ArrayList vorg_ma_uuids = new ArrayList<>(Arrays.asList(new Integer[]{27570,188900,188910,188920,188930,188940,188950,189500})); public static ArrayList vorg_la_uuids = new ArrayList<>(Arrays.asList(new Integer[]{27550,27560,189100,189110,189120,189130,189140,189150})); public static ArrayList vorg_cloth_uuids = new ArrayList<>(Arrays.asList(new Integer[]{27600,188700,188720,189550,189560})); + public static ArrayList racial_stewards = new ArrayList<>(Arrays.asList(new Integer[]{974,1064,1172,1267,1368,1468,1520,1528,1553,1578,1617,1667,1712})); + public static ArrayList undead_guards = new ArrayList<>(Arrays.asList(new Integer[]{980100,980101,980102,980110,980111})); // Drop Rates @@ -74,6 +76,29 @@ public enum LootManager { public static void GenerateMobLoot(Mob mob) { + if(mob == null) + return; + + if(mob.level > 80){ + MobLoot mithril = new MobLoot(mob, ItemBase.getItemBase(1580021), 1, true); + mob.getCharItemManager().addItemToInventory(mithril); + int stewardRoll = ThreadLocalRandom.current().nextInt(1,racial_stewards.size() + 1); + int guardRoll = ThreadLocalRandom.current().nextInt(1,undead_guards.size() + 1); + try{ + MobLoot steward = new MobLoot(mob, ItemBase.getItemBase((Integer) racial_stewards.toArray()[stewardRoll]), true); + mob.getCharItemManager().addItemToInventory(steward); + }catch(Exception ex){ + + } + try{ + + }catch(Exception ex){ + MobLoot guard = new MobLoot(mob, ItemBase.getItemBase((Integer) undead_guards.toArray()[guardRoll]), true); + mob.getCharItemManager().addItemToInventory(guard); + } + return; + } + //determine if mob is in hotzone boolean inHotzone = ZoneManager.inHotZone(mob.getLoc()); @@ -183,7 +208,7 @@ public enum LootManager { if (itemUUID == 0) return null; - if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) { + if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal() && itemUUID != 1580021) { int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1); return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false); }