Browse Source

Backfill code removed

combat-2
MagicBot 8 months ago
parent
commit
ab2659d01f
  1. 23
      src/engine/db/handlers/dbItemHandler.java
  2. 3
      src/engine/server/world/WorldServer.java

23
src/engine/db/handlers/dbItemHandler.java

@ -498,29 +498,6 @@ public class dbItemHandler extends dbHandlerBase { @@ -498,29 +498,6 @@ public class dbItemHandler extends dbHandlerBase {
}
}
public void UPDATE_ALL_FLAGS() {
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `obj_item`")) {
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
int item_uuid = rs.getInt("UID");
int templateID = rs.getInt("item_itembaseID");
EnumSet<Enum.ItemFlags> item_flags = EnumSet.noneOf(Enum.ItemFlags.class);
item_flags.addAll(ItemTemplate.templates.get(templateID).item_flags);
UPDATE_FLAGS(item_uuid, item_flags);
}
} catch (SQLException e) {
Logger.error(e);
}
}
public boolean UPDATE_FLAGS(Item item) {
try (Connection connection = DbManager.getConnection();

3
src/engine/server/world/WorldServer.java

@ -343,9 +343,6 @@ public class WorldServer { @@ -343,9 +343,6 @@ public class WorldServer {
Logger.info("Loading Item Templates");
DbManager.ItemQueries.LOAD_ITEM_TEMPLATES();
Logger.info("Back filling item flags");
DbManager.ItemQueries.UPDATE_ALL_FLAGS();
Logger.info("Loading ItemBases");
ItemBase.loadAllItemBases();

Loading…
Cancel
Save