forked from MagicBane/Server
Templates backfilled with modtable data
This commit is contained in:
@@ -193,9 +193,26 @@ public class dbItemHandler extends dbHandlerBase {
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void LOAD_TEMPLATE_MODTABLES() {
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_vendor_items`;");
|
||||
ResultSet rs = preparedStatement.executeQuery()) {
|
||||
|
||||
while (rs.next()) {
|
||||
int templateID = rs.getInt("templateID");
|
||||
int modTable = rs.getInt("modTable");
|
||||
ItemTemplate template = ItemTemplate.templates.get(templateID);
|
||||
template.modTable = modTable;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
public Item GET_ITEM(final int itemUUID) {
|
||||
|
||||
Item item;
|
||||
|
||||
Reference in New Issue
Block a user