|  |  | @ -88,67 +88,65 @@ public class dbBaneHandler extends dbHandlerBase { | 
			
		
	
		
		
			
				
					
					|  |  |  |         return true; |  |  |  |         return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public boolean SET_BANE_TIME_NEW(int hour, int cityUUID, DateTime placementDate) { |  |  |  |     public boolean SET_BANE_TIME_NEW(int hour, int cityUUID) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         DateTime toSet = placementDate.withHourOfDay(12 + hour).withMinuteOfHour(0).withSecondOfMinute(0); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         try (Connection connection = DbManager.getConnection(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |              PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `liveDate`=? WHERE `cityUUID`=?")) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setTimestamp(1, new java.sql.Timestamp(toSet.getMillis())); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setLong(2, cityUUID); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.execute(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } catch (SQLException e) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             Logger.error(e); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             return false; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         try (Connection connection = DbManager.getConnection(); |  |  |  |         try (Connection connection = DbManager.getConnection(); | 
			
		
	
		
		
			
				
					
					|  |  |  |              PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `time_set`=? WHERE `cityUUID`=?")) { |  |  |  |              PreparedStatement getStatement = connection.prepareStatement("SELECT `liveDate` FROM `dyn_banes` WHERE `cityUUID`=?"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |              PreparedStatement updateStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `liveDate`=?, `time_set`=? WHERE `cityUUID`=?")) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setInt(1, 1); |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setLong(2, cityUUID); |  |  |  |             // Retrieve the existing liveDate
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |             getStatement.setInt(1, cityUUID); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.execute(); |  |  |  |             try (ResultSet rs = getStatement.executeQuery()) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (rs.next()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     DateTime existingDate = new DateTime(rs.getTimestamp("liveDate").getTime()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     // Update only the time
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     DateTime updatedDate = existingDate.withHourOfDay(hour).withMinuteOfHour(0).withSecondOfMinute(0); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     // Update liveDate and time_set flag
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.setTimestamp(1, new java.sql.Timestamp(updatedDate.getMillis())); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.setInt(2, 1); // time_set flag
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.setInt(3, cityUUID); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.execute(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } catch (SQLException e) { |  |  |  |         } catch (SQLException e) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             Logger.error(e); |  |  |  |             Logger.error(e); | 
			
		
	
		
		
			
				
					
					|  |  |  |             return false; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return true; |  |  |  |         return false; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public boolean SET_BANE_DAY_NEW(int day, int cityUUID, DateTime placementDate) { |  |  |  |     public boolean SET_BANE_DAY_NEW(int dayOffset, int cityUUID) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         DateTime toSet = placementDate.plusDays(day); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         try (Connection connection = DbManager.getConnection(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |              PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `liveDate`=? WHERE `cityUUID`=?")) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setTimestamp(1, new java.sql.Timestamp(toSet.getMillis())); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setLong(2, cityUUID); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.execute(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } catch (SQLException e) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             Logger.error(e); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             return false; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         try (Connection connection = DbManager.getConnection(); |  |  |  |         try (Connection connection = DbManager.getConnection(); | 
			
		
	
		
		
			
				
					
					|  |  |  |              PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `day_set`=? WHERE `cityUUID`=?")) { |  |  |  |              PreparedStatement getStatement = connection.prepareStatement("SELECT `liveDate` FROM `dyn_banes` WHERE `cityUUID`=?"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |              PreparedStatement updateStatement = connection.prepareStatement("UPDATE `dyn_banes` SET `liveDate`=?, `day_set`=? WHERE `cityUUID`=?")) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setInt(1, 1); |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.setLong(2, cityUUID); |  |  |  |             // Retrieve the existing liveDate
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |             getStatement.setInt(1, cityUUID); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             preparedStatement.execute(); |  |  |  |             try (ResultSet rs = getStatement.executeQuery()) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (rs.next()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     DateTime existingDate = new DateTime(rs.getTimestamp("liveDate").getTime()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     // Update only the day
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     DateTime updatedDate = existingDate.plusDays(dayOffset); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     // Update liveDate and day_set flag
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.setTimestamp(1, new java.sql.Timestamp(updatedDate.getMillis())); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.setInt(2, 1); // day_set flag
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.setInt(3, cityUUID); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     updateStatement.execute(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } catch (SQLException e) { |  |  |  |         } catch (SQLException e) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             Logger.error(e); |  |  |  |             Logger.error(e); | 
			
		
	
		
		
			
				
					
					|  |  |  |             return false; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return true; |  |  |  |         return false; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public boolean SET_BANE_CAP_NEW(int count, int cityUUID) { |  |  |  |     public boolean SET_BANE_CAP_NEW(int count, int cityUUID) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         try (Connection connection = DbManager.getConnection(); |  |  |  |         try (Connection connection = DbManager.getConnection(); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |