Collection used and old handler removed.

This commit is contained in:
2023-10-18 12:38:04 -04:00
parent 6fb1e2e5f1
commit 5ac62d60be
2 changed files with 18 additions and 47 deletions
@@ -458,36 +458,6 @@ public class dbBuildingHandler extends dbHandlerBase {
}
public void LOAD_ALL_FRIENDS_FOR_BUILDING(Building building) {
if (building == null)
return;
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `dyn_building_friends` WHERE `buildingUID` = ?")) {
preparedStatement.setInt(1, building.getObjectUUID());
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
BuildingFriends friend = new BuildingFriends(rs);
switch (friend.friendType) {
case 7:
building.getFriends().put(friend.playerUID, friend);
break;
case 8:
case 9:
building.getFriends().put(friend.guildUID, friend);
break;
}
}
} catch (SQLException e) {
Logger.error(e);
}
}
public void LOAD_ALL_CONDEMNED_FOR_BUILDING(Building building) {
if (building == null)