@ -52,7 +52,7 @@ public class dbCityHandler extends dbHandlerBase {
@@ -52,7 +52,7 @@ public class dbCityHandler extends dbHandlerBase {
}
}
public ArrayList < AbstractGameObject > CREATE_CITY ( int ownerID , int parentZoneID , int realmID , float xCoord , float yCoord , float zCoord , float rotation , float W , String name , LocalDateTime established ) {
public ArrayList < AbstractGameObject > CREATE_CITY ( int ownerID , int parentZoneID , float xCoord , float yCoord , float zCoord , float rotation , float W , String name , LocalDateTime established ) {
LocalDateTime upgradeTime = LocalDateTime . now ( ) . plusHours ( 2 ) ;
ArrayList < AbstractGameObject > objectList = new ArrayList < > ( ) ;
@ -62,15 +62,14 @@ public class dbCityHandler extends dbHandlerBase {
@@ -62,15 +62,14 @@ public class dbCityHandler extends dbHandlerBase {
preparedStatement . setLong ( 1 , ownerID ) ; //objectUUID of owning player
preparedStatement . setLong ( 2 , parentZoneID ) ; //objectUUID of parent (continent) zone
preparedStatement . setLong ( 3 , realmID ) ; //objectUUID of realm city belongs in
preparedStatement . setFloat ( 4 , xCoord ) ; //xOffset from parentZone center
preparedStatement . setFloat ( 5 , yCoord ) ; //yOffset from parentZone center
preparedStatement . setFloat ( 6 , zCoord ) ; //zOffset from parentZone center
preparedStatement . setString ( 7 , name ) ; //city name
preparedStatement . setTimestamp ( 8 , Timestamp . valueOf ( established ) ) ;
preparedStatement . setFloat ( 9 , rotation ) ;
preparedStatement . setFloat ( 10 , W ) ;
preparedStatement . setTimestamp ( 11 , Timestamp . valueOf ( upgradeTime ) ) ;
preparedStatement . setFloat ( 3 , xCoord ) ; //xOffset from parentZone center
preparedStatement . setFloat ( 4 , yCoord ) ; //yOffset from parentZone center
preparedStatement . setFloat ( 5 , zCoord ) ; //zOffset from parentZone center
preparedStatement . setString ( 6 , name ) ; //city name
preparedStatement . setTimestamp ( 7 , Timestamp . valueOf ( established ) ) ;
preparedStatement . setFloat ( 8 , rotation ) ;
preparedStatement . setFloat ( 9 , W ) ;
preparedStatement . setTimestamp ( 10 , Timestamp . valueOf ( upgradeTime ) ) ;
boolean work = preparedStatement . execute ( ) ;