@ -127,7 +127,7 @@ public class dbMobHandler extends dbHandlerBase {
@@ -127,7 +127,7 @@ public class dbMobHandler extends dbHandlerBase {
}
}
public boolean ADD_TO_GUARDS ( final long captainUID , final String minionName ) {
public boolean ADD_GUARD_MINION ( final long captainUID , final String minionName ) {
try ( Connection connection = DbManager . getConnection ( ) ;
PreparedStatement preparedStatement = connection . prepareStatement ( "INSERT INTO `dyn_guards` (`captainUID`, `minionName`) VALUES (?,?)" ) ) {
@ -143,7 +143,7 @@ public class dbMobHandler extends dbHandlerBase {
@@ -143,7 +143,7 @@ public class dbMobHandler extends dbHandlerBase {
}
}
public boolean REMOVE_FROM_GUARDS ( final long captainUID , final String minionName ) {
public boolean REMOVE_GUARD_MINION ( final long captainUID , final String minionName ) {
try ( Connection connection = DbManager . getConnection ( ) ;
PreparedStatement preparedStatement = connection . prepareStatement ( "DELETE FROM `dyn_guards` WHERE `captainUID`=? AND `minionName`=? LIMIT 1;" ) ) {
@ -159,6 +159,20 @@ public class dbMobHandler extends dbHandlerBase {
@@ -159,6 +159,20 @@ public class dbMobHandler extends dbHandlerBase {
}
}
public boolean REMOVE_ALL_MINIONS ( final long captainUID ) {
try ( Connection connection = DbManager . getConnection ( ) ;
PreparedStatement preparedStatement = connection . prepareStatement ( "DELETE FROM `dyn_guards` WHERE `captainUID`=?;" ) ) {
preparedStatement . setLong ( 1 , captainUID ) ;
return ( preparedStatement . executeUpdate ( ) > 0 ) ;
} catch ( SQLException e ) {
Logger . error ( e ) ;
return false ;
}
}
public ArrayList < Mob > GET_ALL_MOBS_FOR_ZONE ( Zone zone ) {