forked from MagicBane/Server
				
			
				 7 changed files with 340 additions and 696 deletions
			
			
		@ -1,114 +0,0 @@
				@@ -1,114 +0,0 @@
					 | 
				
			||||
// • ▌ ▄ ·.  ▄▄▄·  ▄▄ • ▪   ▄▄· ▄▄▄▄·  ▄▄▄·  ▐▄▄▄  ▄▄▄ .
 | 
				
			||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
 | 
				
			||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
 | 
				
			||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
 | 
				
			||||
// ▀▀  █▪▀▀▀ ▀  ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀  ▀  ▀ ▀▀  █▪ ▀▀▀
 | 
				
			||||
//      Magicbane Emulator Project © 2013 - 2022
 | 
				
			||||
//                www.magicbane.com
 | 
				
			||||
 | 
				
			||||
package engine.loot; | 
				
			||||
 | 
				
			||||
import java.sql.ResultSet; | 
				
			||||
import java.sql.SQLException; | 
				
			||||
 | 
				
			||||
/** | 
				
			||||
 * Data storage object for Loot System. | 
				
			||||
 * Holds row in the lootGroup database table | 
				
			||||
 */ | 
				
			||||
public class LootGroup { | 
				
			||||
 | 
				
			||||
    private final int groupID; | 
				
			||||
    private final String groupName; | 
				
			||||
    private final int minRoll; | 
				
			||||
    private final int maxRoll; | 
				
			||||
    private final int lootTableID; | 
				
			||||
    private final String lootTableName; | 
				
			||||
    private final int pMod; | 
				
			||||
    private final int pModTableID; | 
				
			||||
    private final int sMod; | 
				
			||||
    private final int sModTableID; | 
				
			||||
 | 
				
			||||
    public LootGroup(ResultSet rs) throws SQLException { | 
				
			||||
         | 
				
			||||
        this.groupID = rs.getInt("groupID"); | 
				
			||||
        this.groupName = rs.getString("groupName"); | 
				
			||||
        this.minRoll = rs.getInt("minRoll"); | 
				
			||||
        this.maxRoll = rs.getInt("maxRoll"); | 
				
			||||
        this.lootTableID = rs.getInt("lootTableID"); | 
				
			||||
        this.lootTableName = rs.getString("lootTableName"); | 
				
			||||
        this.pMod = rs.getInt("pMod"); | 
				
			||||
        this.pModTableID = rs.getInt("pModTableID"); | 
				
			||||
        this.sMod = rs.getInt("sMod"); | 
				
			||||
        this.sModTableID = rs.getInt("sModTableID"); | 
				
			||||
    } | 
				
			||||
    /** | 
				
			||||
     * @return the groupID | 
				
			||||
     */ | 
				
			||||
    public int getGroupID() { | 
				
			||||
        return groupID; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the groupName | 
				
			||||
     */ | 
				
			||||
    public String getGroupName() { | 
				
			||||
        return groupName; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the minRoll | 
				
			||||
     */ | 
				
			||||
    public int getMinRoll() { | 
				
			||||
        return minRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the maxRoll | 
				
			||||
     */ | 
				
			||||
    public int getMaxRoll() { | 
				
			||||
        return maxRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the lootTableID | 
				
			||||
     */ | 
				
			||||
    public int getLootTableID() { | 
				
			||||
        return lootTableID; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the lootTableName | 
				
			||||
     */ | 
				
			||||
    public String getLootTableName() { | 
				
			||||
        return lootTableName; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the pMod | 
				
			||||
     */ | 
				
			||||
    public int getpMod() { | 
				
			||||
        return pMod; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the pModTableID | 
				
			||||
     */ | 
				
			||||
    public int getpModTableID() { | 
				
			||||
        return pModTableID; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the sMod | 
				
			||||
     */ | 
				
			||||
    public int getsMod() { | 
				
			||||
        return sMod; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the sModTableID | 
				
			||||
     */ | 
				
			||||
    public int getsModTableID() { | 
				
			||||
        return sModTableID; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
} | 
				
			||||
@ -1,98 +0,0 @@
				@@ -1,98 +0,0 @@
					 | 
				
			||||
// • ▌ ▄ ·.  ▄▄▄·  ▄▄ • ▪   ▄▄· ▄▄▄▄·  ▄▄▄·  ▐▄▄▄  ▄▄▄ .
 | 
				
			||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
 | 
				
			||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
 | 
				
			||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
 | 
				
			||||
// ▀▀  █▪▀▀▀ ▀  ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀  ▀  ▀ ▀▀  █▪ ▀▀▀
 | 
				
			||||
//      Magicbane Emulator Project © 2013 - 2022
 | 
				
			||||
//                www.magicbane.com
 | 
				
			||||
 | 
				
			||||
package engine.loot; | 
				
			||||
 | 
				
			||||
import java.sql.ResultSet; | 
				
			||||
import java.sql.SQLException; | 
				
			||||
 | 
				
			||||
/** | 
				
			||||
 * Data storage object for Loot System. | 
				
			||||
 * Holds row in the lootTable database table | 
				
			||||
 */ | 
				
			||||
public class LootTable { | 
				
			||||
 | 
				
			||||
    private final int lootTale; | 
				
			||||
    private final String tableName; | 
				
			||||
    private final String itemName; | 
				
			||||
    private final int minRoll; | 
				
			||||
    private final int maxRoll; | 
				
			||||
    private final int itemBaseUUID; | 
				
			||||
    private final int minSpawn; | 
				
			||||
    private final int maxSpawn; | 
				
			||||
 | 
				
			||||
    public LootTable(ResultSet rs) throws SQLException { | 
				
			||||
         | 
				
			||||
        this.lootTale = rs.getInt("lootTable"); | 
				
			||||
        this.tableName = rs.getString("tableName"); | 
				
			||||
        this.itemName = rs.getString("itemName"); | 
				
			||||
        this.minRoll = rs.getInt("minRoll"); | 
				
			||||
        this.maxRoll = rs.getInt("maxRoll"); | 
				
			||||
        this.itemBaseUUID = rs.getInt("itemBaseUUID"); | 
				
			||||
        this.minSpawn = rs.getInt("minSpawn"); | 
				
			||||
        this.maxSpawn = rs.getInt("maxSpawn"); | 
				
			||||
                         | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the lootTale | 
				
			||||
     */ | 
				
			||||
    public int getLootTable() { | 
				
			||||
        return lootTale; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the tableName | 
				
			||||
     */ | 
				
			||||
    public String getTableName() { | 
				
			||||
        return tableName; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the itemName | 
				
			||||
     */ | 
				
			||||
    public String getItemName() { | 
				
			||||
        return itemName; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the minRoll | 
				
			||||
     */ | 
				
			||||
    public int getMinRoll() { | 
				
			||||
        return minRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the maxRoll | 
				
			||||
     */ | 
				
			||||
    public int getMaxRoll() { | 
				
			||||
        return maxRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the itemBaseUUID | 
				
			||||
     */ | 
				
			||||
    public int getItemBaseUUID() { | 
				
			||||
        return itemBaseUUID; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the minSpawn | 
				
			||||
     */ | 
				
			||||
    public int getMinSpawn() { | 
				
			||||
        return minSpawn; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the maxSpawn | 
				
			||||
     */ | 
				
			||||
    public int getMaxSpawn() { | 
				
			||||
        return maxSpawn; | 
				
			||||
    } | 
				
			||||
     | 
				
			||||
} | 
				
			||||
@ -1,78 +0,0 @@
				@@ -1,78 +0,0 @@
					 | 
				
			||||
// • ▌ ▄ ·.  ▄▄▄·  ▄▄ • ▪   ▄▄· ▄▄▄▄·  ▄▄▄·  ▐▄▄▄  ▄▄▄ .
 | 
				
			||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
 | 
				
			||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
 | 
				
			||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
 | 
				
			||||
// ▀▀  █▪▀▀▀ ▀  ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀  ▀  ▀ ▀▀  █▪ ▀▀▀
 | 
				
			||||
//      Magicbane Emulator Project © 2013 - 2022
 | 
				
			||||
//                www.magicbane.com
 | 
				
			||||
 | 
				
			||||
package engine.loot; | 
				
			||||
 | 
				
			||||
import java.sql.ResultSet; | 
				
			||||
import java.sql.SQLException; | 
				
			||||
 | 
				
			||||
/** | 
				
			||||
 * Data storage object for Loot System. | 
				
			||||
 * Holds row in the modGroup database table | 
				
			||||
 */ | 
				
			||||
public class ModifierGroup { | 
				
			||||
 | 
				
			||||
    private final int modGroup; | 
				
			||||
    private final String groupName; | 
				
			||||
    private final int minRoll; | 
				
			||||
    private final int maxRoll; | 
				
			||||
    private final int subTableID; | 
				
			||||
    private final String subTableName; | 
				
			||||
 | 
				
			||||
    public ModifierGroup(ResultSet rs) throws SQLException { | 
				
			||||
         | 
				
			||||
        this.modGroup = rs.getInt("modGroup"); | 
				
			||||
        this.groupName = rs.getString("groupName"); | 
				
			||||
        this.minRoll = rs.getInt("minRoll"); | 
				
			||||
        this.maxRoll = rs.getInt("maxRoll"); | 
				
			||||
        this.subTableID = rs.getInt("subTableID"); | 
				
			||||
        this.subTableName = rs.getString("subTableName");                 | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the modGroup | 
				
			||||
     */ | 
				
			||||
    public int getModGroup() { | 
				
			||||
        return modGroup; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the groupName | 
				
			||||
     */ | 
				
			||||
    public String getGroupName() { | 
				
			||||
        return groupName; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the minRoll | 
				
			||||
     */ | 
				
			||||
    public int getMinRoll() { | 
				
			||||
        return minRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the maxRoll | 
				
			||||
     */ | 
				
			||||
    public int getMaxRoll() { | 
				
			||||
        return maxRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the subTableID | 
				
			||||
     */ | 
				
			||||
    public int getSubTableID() { | 
				
			||||
        return subTableID; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the subTableName | 
				
			||||
     */ | 
				
			||||
    public String getSubTableName() { | 
				
			||||
        return subTableName; | 
				
			||||
    } | 
				
			||||
} | 
				
			||||
@ -1,88 +0,0 @@
				@@ -1,88 +0,0 @@
					 | 
				
			||||
// • ▌ ▄ ·.  ▄▄▄·  ▄▄ • ▪   ▄▄· ▄▄▄▄·  ▄▄▄·  ▐▄▄▄  ▄▄▄ .
 | 
				
			||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
 | 
				
			||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
 | 
				
			||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
 | 
				
			||||
// ▀▀  █▪▀▀▀ ▀  ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀  ▀  ▀ ▀▀  █▪ ▀▀▀
 | 
				
			||||
//      Magicbane Emulator Project © 2013 - 2022
 | 
				
			||||
//                www.magicbane.com
 | 
				
			||||
 | 
				
			||||
package engine.loot; | 
				
			||||
 | 
				
			||||
import java.sql.ResultSet; | 
				
			||||
import java.sql.SQLException; | 
				
			||||
 | 
				
			||||
/** | 
				
			||||
 * Data storage object for Loot System. | 
				
			||||
 * Holds row in the modTables database table | 
				
			||||
 */ | 
				
			||||
public class ModifierTable{ | 
				
			||||
 | 
				
			||||
    private final int modTable; | 
				
			||||
    private final String tableName; | 
				
			||||
    private final float minRoll; | 
				
			||||
    private final float maxRoll; | 
				
			||||
    private final String action; | 
				
			||||
    private final int level; | 
				
			||||
    private final int value; | 
				
			||||
     | 
				
			||||
    public ModifierTable(ResultSet rs) throws SQLException { | 
				
			||||
         | 
				
			||||
        this.modTable = rs.getInt("modTable"); | 
				
			||||
        this.tableName = rs.getString("tableName"); | 
				
			||||
        this.minRoll = rs.getInt("minRoll"); | 
				
			||||
        this.maxRoll = rs.getInt("maxRoll"); | 
				
			||||
        this.action = rs.getString("action");  | 
				
			||||
        this.level = rs.getInt("level"); | 
				
			||||
        this.value = rs.getInt("value");             | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the modTable | 
				
			||||
     */ | 
				
			||||
    public int getModTable() { | 
				
			||||
        return modTable; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the tableName | 
				
			||||
     */ | 
				
			||||
    public String getTableName() { | 
				
			||||
        return tableName; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the minRoll | 
				
			||||
     */ | 
				
			||||
    public float getMinRoll() { | 
				
			||||
        return minRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the maxRoll | 
				
			||||
     */ | 
				
			||||
    public float getMaxRoll() { | 
				
			||||
        return maxRoll; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the action | 
				
			||||
     */ | 
				
			||||
    public String getAction() { | 
				
			||||
        return action; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the level | 
				
			||||
     */ | 
				
			||||
    public int getLevel() { | 
				
			||||
        return level; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
    /** | 
				
			||||
     * @return the value | 
				
			||||
     */ | 
				
			||||
    public int getValue() { | 
				
			||||
        return value; | 
				
			||||
    } | 
				
			||||
 | 
				
			||||
} | 
				
			||||
					Loading…
					
					
				
		Reference in new issue