From e424441380a57c13ebbcf92d2c60ed8ed6e000f7 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 6 Aug 2023 07:53:33 -0400 Subject: [PATCH] Booty loot table is a gentable entry. --- src/engine/devcmd/cmds/SimulateBootyCmd.java | 8 ++++---- src/engine/gameManager/LootManager.java | 6 +++--- src/engine/objects/BootySetEntry.java | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/engine/devcmd/cmds/SimulateBootyCmd.java b/src/engine/devcmd/cmds/SimulateBootyCmd.java index 23f07547..eca63e54 100644 --- a/src/engine/devcmd/cmds/SimulateBootyCmd.java +++ b/src/engine/devcmd/cmds/SimulateBootyCmd.java @@ -120,12 +120,12 @@ public class SimulateBootyCmd extends AbstractDevCmd { for (BootySetEntry entry : NPCManager._bootySetMap.get(mob.getMobBase().bootySet)) { if (entry.bootyType.equals("GOLD")) - output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.itemTable + ": " + entry.dropChance + newline; + output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.genTable + ": " + entry.dropChance + newline; else - output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.itemTable + ": " + entry.dropChance * dropRate + newline; + output += "NORMAL TABLE [" + entry.bootyType + "] " + entry.genTable + ": " + entry.dropChance * dropRate + newline; - if (hotZoneRan == false && ZoneManager.inHotZone(mob.getLoc()) && LootManager.generalItemTables.containsKey(entry.itemTable + 1)) { - output += "HOTZONE TABLE [" + entry.bootyType + "] " + (entry.itemTable + 1) + ": " + entry.dropChance * dropRate + newline; + if (hotZoneRan == false && ZoneManager.inHotZone(mob.getLoc()) && LootManager.generalItemTables.containsKey(entry.genTable + 1)) { + output += "HOTZONE TABLE [" + entry.bootyType + "] " + (entry.genTable + 1) + ": " + entry.dropChance * dropRate + newline; hotZoneRan = true; } } diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 0cff9f05..2011d080 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -120,14 +120,14 @@ public enum LootManager { dropRate = LootManager.NORMAL_DROP_RATE; if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) - GenerateLootDrop(mob, bse.itemTable, false); //generate normal loot drop + GenerateLootDrop(mob, bse.genTable, false); //generate normal loot drop // Generate hotzone loot if in hotzone // Only one bite at the hotzone apple per bootyset. if (inHotzone == true && hotzoneWasRan == false) - if (generalItemTables.containsKey(bse.itemTable + 1) && ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) { - GenerateLootDrop(mob, bse.itemTable + 1, true); //generate loot drop from hotzone table + if (generalItemTables.containsKey(bse.genTable + 1) && ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) { + GenerateLootDrop(mob, bse.genTable + 1, true); //generate loot drop from hotzone table hotzoneWasRan = true; } diff --git a/src/engine/objects/BootySetEntry.java b/src/engine/objects/BootySetEntry.java index 90b04d14..4f62a5a7 100644 --- a/src/engine/objects/BootySetEntry.java +++ b/src/engine/objects/BootySetEntry.java @@ -18,7 +18,7 @@ public class BootySetEntry { public int lowGold; public int highGold; public int itemBase; - public int itemTable; + public int genTable; public float dropChance; /** @@ -30,7 +30,7 @@ public class BootySetEntry { this.lowGold = (rs.getInt("lowGold")); this.highGold = (rs.getInt("highGold")); this.itemBase = (rs.getInt("itemBase")); - this.itemTable = (rs.getInt("itemTable")); + this.genTable = (rs.getInt("genTable")); this.dropChance = (rs.getFloat("dropChance")); }