forked from MagicBane/Server
Table refactor to conform with sb.
This commit is contained in:
@@ -30,7 +30,7 @@ public class dbLootTableHandler extends dbHandlerBase {
|
||||
|
||||
}
|
||||
|
||||
public void populateLootGroups() {
|
||||
public void populateGenTables() {
|
||||
|
||||
int recordsRead = 0;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class dbLootTableHandler extends dbHandlerBase {
|
||||
|
||||
while (rs.next()) {
|
||||
recordsRead++;
|
||||
LootTable lootTable = LootTable.getLootGroup(rs.getInt("groupID"));
|
||||
LootTable lootTable = LootTable.getLootGroup(rs.getInt("genTable"));
|
||||
lootTable.addRow(rs.getFloat("minRoll"), rs.getFloat("maxRoll"), rs.getInt("lootTableID"), rs.getInt("pModTableID"), rs.getInt("sModTableID"), "");
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class dbLootTableHandler extends dbHandlerBase {
|
||||
Logger.info("read: " + recordsRead + " cached: " + LootTable.getLootGroups().size());
|
||||
}
|
||||
|
||||
public void populateLootTables() {
|
||||
public void populateItemTables() {
|
||||
|
||||
int recordsRead = 0;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class dbLootTableHandler extends dbHandlerBase {
|
||||
|
||||
while (rs.next()) {
|
||||
recordsRead++;
|
||||
LootTable lootTable = LootTable.getLootTable(rs.getInt("lootTable"));
|
||||
LootTable lootTable = LootTable.getLootTable(rs.getInt("itemTable"));
|
||||
lootTable.addRow(rs.getFloat("minRoll"), rs.getFloat("maxRoll"), rs.getInt("itemBaseUUID"), rs.getInt("minSpawn"), rs.getInt("maxSpawn"), "");
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class dbLootTableHandler extends dbHandlerBase {
|
||||
Logger.info("read: " + recordsRead + " cached: " + LootTable.getModTables().size());
|
||||
}
|
||||
|
||||
public void populateModGroups() {
|
||||
public void populateModTypeTables() {
|
||||
|
||||
int recordsRead = 0;
|
||||
|
||||
@@ -107,7 +107,7 @@ public class dbLootTableHandler extends dbHandlerBase {
|
||||
|
||||
while (rs.next()) {
|
||||
recordsRead++;
|
||||
LootTable lootTable = LootTable.getModGroup(rs.getInt("modGroup"));
|
||||
LootTable lootTable = LootTable.getModGroup(rs.getInt("modType"));
|
||||
lootTable.addRow(rs.getFloat("minRoll"), rs.getFloat("maxRoll"), rs.getInt("subTableID"), 0, 0, "");
|
||||
}
|
||||
|
||||
|
||||
@@ -127,10 +127,10 @@ public class LootTable {
|
||||
//call this on server startup to populate the tables
|
||||
public static void populateLootTables() {
|
||||
|
||||
DbManager.LootQueries.populateLootGroups();
|
||||
DbManager.LootQueries.populateLootTables();
|
||||
DbManager.LootQueries.populateGenTables();
|
||||
DbManager.LootQueries.populateItemTables();
|
||||
DbManager.LootQueries.populateModTables();
|
||||
DbManager.LootQueries.populateModGroups();
|
||||
DbManager.LootQueries.populateModTypeTables();
|
||||
|
||||
//preset chances for rune drops
|
||||
populateStatRuneChances();
|
||||
|
||||
Reference in New Issue
Block a user