Update to bool return handling.
This commit is contained in:
@@ -89,7 +89,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ArrayList<String> GET_TRASH_LIST() {
|
||||
@@ -107,7 +106,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
return machineList;
|
||||
}
|
||||
|
||||
@@ -122,7 +120,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ArrayList<PlayerCharacter> GET_ALL_CHARS_FOR_MACHINE(String machineID) {
|
||||
@@ -155,7 +152,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
return trashList;
|
||||
}
|
||||
|
||||
@@ -169,7 +165,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void CREATE_SINGLE(String accountName, String password) {
|
||||
@@ -185,7 +180,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Account GET_ACCOUNT(String uname) {
|
||||
@@ -238,7 +232,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void updateDatabase(final Account acc) {
|
||||
@@ -260,7 +253,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void INVALIDATE_LOGIN_CACHE(long accountUID, String objectType) {
|
||||
@@ -276,7 +268,6 @@ public class dbAccountHandler extends dbHandlerBase {
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class dbBaneHandler extends dbHandlerBase {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,5 @@ public class dbBaseClassHandler extends dbHandlerBase {
|
||||
}
|
||||
|
||||
return baseClasses;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,12 +204,12 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
preparedStatement.setLong(1, b.getObjectUUID());
|
||||
preparedStatement.execute();
|
||||
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean CHANGE_NAME(Building b, String newName) {
|
||||
@@ -224,9 +224,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_RESERVE(Building b, int reserveAmount) {
|
||||
@@ -241,9 +240,9 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//CAS update to rank
|
||||
@@ -259,9 +258,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_BUILDING_HEALTH(final long buildingID, int NewHealth) {
|
||||
@@ -276,9 +274,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_BUILDING_ALTITUDE(final long buildingID, float newAltitude) {
|
||||
@@ -293,9 +290,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_PROTECTIONSTATE(final long buildingUUID, ProtectionState protectionState) {
|
||||
@@ -310,9 +306,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_DOOR_LOCK(final int buildingUUID, int doorFlags) {
|
||||
@@ -327,9 +322,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean ADD_TO_FRIENDS_LIST(final long buildingID, final long friendID, final long guildID, final int friendType) {
|
||||
@@ -346,9 +340,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean REMOVE_FROM_FRIENDS_LIST(final long buildingID, long friendID, long guildID, int friendType) {
|
||||
@@ -365,9 +358,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean REMOVE_FROM_CONDEMNED_LIST(final long buildingID, long friendID, long guildID, int friendType) {
|
||||
@@ -384,9 +376,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void CLEAR_FRIENDS_LIST(final long buildingID) {
|
||||
@@ -427,9 +418,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void LOAD_ALL_FRIENDS_FOR_BUILDING(Building building) {
|
||||
@@ -536,9 +526,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean ADD_TO_PATROL(final long parentUID, final Vector3fImmutable patrolPoint) {
|
||||
@@ -555,9 +544,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public HashMap<Integer, ArrayList<BuildingRegions>> LOAD_BUILDING_REGIONS() {
|
||||
@@ -589,7 +577,6 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
Logger.info("read: " + recordsRead + " cached: " + regionList.size());
|
||||
@@ -702,8 +689,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean updateReverseKOS(final Building b, boolean reverse) {
|
||||
@@ -718,9 +705,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean updateActiveCondemn(final Condemned condemn, boolean active) {
|
||||
@@ -739,9 +725,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean updateBuildingOwner(final Building building, int ownerUUID) {
|
||||
@@ -757,9 +742,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean updateBuildingUpgradeTime(LocalDateTime upgradeDateTime, Building toUpgrade, int costToUpgrade) {
|
||||
@@ -781,8 +765,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean updateMaintDate(Building building) {
|
||||
@@ -802,8 +786,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean addTaxes(Building building, TaxType taxType, int amount, boolean enforceKOS) {
|
||||
@@ -821,9 +805,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean removeTaxes(Building building) {
|
||||
@@ -842,8 +825,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean acceptTaxes(Building building) {
|
||||
@@ -859,8 +842,8 @@ public class dbBuildingHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,9 +44,8 @@ public class dbCSSessionHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean DELETE_UNUSED_CSSESSION(String secKey) {
|
||||
@@ -59,9 +58,8 @@ public class dbCSSessionHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean DELETE_CSSESSION(String secKey) {
|
||||
@@ -74,9 +72,8 @@ public class dbCSSessionHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_CSSESSION(String secKey, int charID) {
|
||||
@@ -91,9 +88,8 @@ public class dbCSSessionHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public CSSession GET_CSSESSION(String secKey) {
|
||||
|
||||
@@ -83,9 +83,8 @@ public class dbCharacterRuneHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public ArrayList<CharacterRune> GET_RUNES_FOR_CHARACTER(final int characterId) {
|
||||
|
||||
@@ -69,8 +69,8 @@ public class dbCharacterSkillHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public CharacterSkill GET_SKILL(final int objectUUID) {
|
||||
|
||||
@@ -139,8 +139,8 @@ public class dbContractHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean updateDatabase(final Contract con) {
|
||||
@@ -162,8 +162,7 @@ public class dbContractHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ public class dbEnchantmentHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean CLEAR_ENCHANTMENTS(long itemID) {
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
@@ -69,7 +69,7 @@ public class dbEnchantmentHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,9 +68,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean REMOVE_FROM_BANISH_LIST(int target, long characterID) {
|
||||
@@ -85,8 +84,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean ADD_TO_GUILDHISTORY(int target, PlayerCharacter playerCharacter, DateTime historyDate, GuildHistoryType historyType) {
|
||||
@@ -108,9 +107,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO Need to get this working.
|
||||
@@ -346,8 +344,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_GUILD_LEADER(int objectUUID,int guildID) {
|
||||
@@ -362,9 +360,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean IS_NAME_UNIQUE(final String name) {
|
||||
@@ -382,8 +379,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
@@ -436,8 +433,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_PARENT(int guildUID, int parentUID) {
|
||||
@@ -452,9 +449,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int DELETE_GUILD(final Guild guild) {
|
||||
@@ -485,9 +481,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int UPDATE_GUILD_STATUS_OFFLINE(int target, boolean isInnerCouncil, boolean isRecruiter, boolean isTaxCollector, int guildId) {
|
||||
@@ -563,8 +558,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean ADD_TO_ALLIANCE_LIST(final long sourceGuildID, final long targetGuildID, boolean isRecommended, boolean isAlly, String recommender) {
|
||||
@@ -582,8 +577,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean REMOVE_FROM_ALLIANCE_LIST(final long sourceGuildID, long targetGuildID) {
|
||||
@@ -598,8 +593,8 @@ public class dbGuildHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_RECOMMENDED(final long sourceGuildID, long targetGuildID) {
|
||||
|
||||
@@ -137,7 +137,6 @@ public class dbItemHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return worked;
|
||||
}
|
||||
@@ -277,9 +276,8 @@ public class dbItemHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean ORPHAN_INVENTORY(final HashSet<Item> inventory) {
|
||||
|
||||
@@ -80,8 +80,8 @@ public class dbMineHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean CHANGE_RESOURCE(Mine mine, Resource resource) {
|
||||
@@ -96,8 +96,8 @@ public class dbMineHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean CHANGE_TYPE(Mine mine, MineProduction productionType) {
|
||||
@@ -112,9 +112,8 @@ public class dbMineHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_FLAGS(Mine mine, int newFlags) {
|
||||
@@ -129,8 +128,8 @@ public class dbMineHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ public class dbMobBaseHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public HashMap<Integer, Integer> LOAD_STATIC_POWERS(int mobBaseUUID) {
|
||||
|
||||
@@ -95,9 +95,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public ArrayList<PlayerCharacter> GET_CHARACTERS_FOR_ACCOUNT(final int id) {
|
||||
@@ -231,9 +230,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_DELETED(final PlayerCharacter pc) {
|
||||
@@ -248,8 +246,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_ACTIVE(final PlayerCharacter pc, boolean status) {
|
||||
@@ -264,8 +262,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_BIND_BUILDING(final PlayerCharacter pc, int bindBuildingID) {
|
||||
@@ -280,8 +278,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_ANNIVERSERY(final PlayerCharacter pc, boolean flag) {
|
||||
@@ -296,8 +294,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -313,8 +311,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_GUILD(final PlayerCharacter pc, int guildUUID) {
|
||||
@@ -329,8 +327,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean UPDATE_CHARACTER_STATS(final PlayerCharacter pc) {
|
||||
@@ -349,8 +347,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String SET_PROPERTY(final PlayerCharacter playerCharacter, String name, Object new_value) {
|
||||
@@ -386,8 +384,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_INNERCOUNCIL(PlayerCharacter player, boolean isInnerCouncil) {
|
||||
@@ -402,8 +400,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_FULL_MEMBER(PlayerCharacter player, boolean isFullMember) {
|
||||
@@ -418,8 +416,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_TAX_COLLECTOR(PlayerCharacter player, boolean isTaxCollector) {
|
||||
@@ -434,8 +432,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_RECRUITER(PlayerCharacter player, boolean isRecruiter) {
|
||||
@@ -450,8 +448,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean SET_GUILD_TITLE(PlayerCharacter player, int title) {
|
||||
@@ -466,8 +464,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean ADD_FRIEND(int source, long friend) {
|
||||
@@ -482,8 +480,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean REMOVE_FRIEND(int source, int friend) {
|
||||
@@ -498,8 +496,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void LOAD_PLAYER_FRIENDS() {
|
||||
@@ -534,8 +532,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean REMOVE_HERALDY(int source, int characterUID) {
|
||||
@@ -550,8 +548,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void LOAD_HERALDY() {
|
||||
|
||||
@@ -20,6 +20,8 @@ import org.joda.time.DateTime;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.net.UnknownHostException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
@@ -100,10 +102,19 @@ public class dbWarehouseHandler extends dbHandlerBase {
|
||||
}
|
||||
|
||||
public boolean updateLocks(final Warehouse wh, long locks) {
|
||||
prepareCallable("UPDATE `obj_warehouse` SET `warehouse_locks`=? WHERE `UID` = ?");
|
||||
setLong(1, locks);
|
||||
setInt(2, wh.getUID());
|
||||
return (executeUpdate() != 0);
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_warehouse` SET `warehouse_locks`=? WHERE `UID` = ?")) {
|
||||
|
||||
preparedStatement.setLong(1, locks);
|
||||
preparedStatement.setInt(2, wh.getUID());
|
||||
|
||||
return (preparedStatement.executeUpdate() > 0);
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean updateGold(final Warehouse wh, int amount ) {
|
||||
|
||||
Reference in New Issue
Block a user