From 14e7b0395c4c1a9a4ae160c893ca695949592418 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 6 Aug 2023 17:44:30 -0400 Subject: [PATCH] New _genTables collection defined. --- src/engine/gameManager/LootManager.java | 4 ++++ src/engine/loot/GenTableEntry.java | 28 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/engine/loot/GenTableEntry.java diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index 7f76f629..ab162c23 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -27,6 +27,10 @@ public enum LootManager { LOOTMANAGER; + // Newer tables + + public static final HashMap> _genTables = new HashMap<>(); + //new tables public static final HashMap generalItemTables = new HashMap<>(); public static final HashMap itemTables = new HashMap<>(); diff --git a/src/engine/loot/GenTableEntry.java b/src/engine/loot/GenTableEntry.java new file mode 100644 index 00000000..b615121e --- /dev/null +++ b/src/engine/loot/GenTableEntry.java @@ -0,0 +1,28 @@ +// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . +// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· +// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ +// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ +// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ +// Magicbane Emulator Project © 2013 - 2022 +// www.magicbane.com + +package engine.loot; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public class GenTableEntry { + public int minRoll; + public int maxRoll; + public int itemTableID; + public int pModTable; + public int sModTable; + + public GenTableEntry(ResultSet rs) throws SQLException { + this.minRoll = rs.getInt("minRoll"); + this.maxRoll = rs.getInt("maxRoll"); + this.itemTableID = rs.getInt("itemTableID"); + this.pModTable = rs.getInt("pModTableID"); + this.sModTable = rs.getInt("sModTableID"); + } +}