@ -106,12 +106,12 @@ public class dbContractHandler extends dbHandlerBase {
@@ -106,12 +106,12 @@ public class dbContractHandler extends dbHandlerBase {
}
}
public boolean updateAllowedBuildings ( final Contract con , final long slotbitvalue ) {
public boolean updateAllowedBuildings ( final Contract con ) {
try ( Connection connection = DbManager . getConnection ( ) ;
PreparedStatement preparedStatement = connection . prepareStatement ( "UPDATE `static_npc_contract` SET `allowedBuildingTypeID `=? WHERE `contractID`=?" ) ) {
PreparedStatement preparedStatement = connection . prepareStatement ( "UPDATE `static_npc_contract` SET `slotInBuildings `=? WHERE `contractID`=?" ) ) {
preparedStatement . setLong ( 1 , slotbitvalue ) ;
preparedStatement . setString ( 1 , mbEnums . asString ( con . allowedBuildings ) ) ;
preparedStatement . setInt ( 2 , con . getContractID ( ) ) ;
return ( preparedStatement . executeUpdate ( ) > 0 ) ;
@ -126,7 +126,7 @@ public class dbContractHandler extends dbHandlerBase {
@@ -126,7 +126,7 @@ public class dbContractHandler extends dbHandlerBase {
try ( Connection connection = DbManager . getConnection ( ) ;
PreparedStatement preparedStatement = connection . prepareStatement ( "UPDATE `static_npc_contract` SET `contractID`=?, `name`=?, "
+ "`mobbaseID`=?, `classID`=?, vendorDialog=?, iconID=?, allowedBuildingTypeID =? WHERE `ID`=?" ) ) {
+ "`mobbaseID`=?, `classID`=?, vendorDialog=?, iconID=?, slotInBuildings =? WHERE `ID`=?" ) ) {
preparedStatement . setInt ( 1 , con . getContractID ( ) ) ;
preparedStatement . setString ( 2 , con . getName ( ) ) ;
@ -135,7 +135,7 @@ public class dbContractHandler extends dbHandlerBase {
@@ -135,7 +135,7 @@ public class dbContractHandler extends dbHandlerBase {
preparedStatement . setInt ( 5 , ( con . getVendorDialog ( ) ! = null ) ? con . getVendorDialog ( ) . getObjectUUID ( ) : 0 ) ;
preparedStatement . setInt ( 6 , con . getIconID ( ) ) ;
preparedStatement . setInt ( 8 , con . getObjectUUID ( ) ) ;
preparedStatement . setLo ng ( 7 , mbEnums . toLo ng( con . getAllowedBuildings ( ) ) ) ;
preparedStatement . setStri ng ( 7 , mbEnums . asStri ng( con . allowedBuildings ) ) ;
return ( preparedStatement . executeUpdate ( ) > 0 ) ;