Browse Source

Update to bool return handling.

master
MagicBot 2 years ago
parent
commit
7c57dcc73d
  1. 9
      src/engine/db/handlers/dbAccountHandler.java
  2. 2
      src/engine/db/handlers/dbBaneHandler.java
  3. 1
      src/engine/db/handlers/dbBaseClassHandler.java
  4. 65
      src/engine/db/handlers/dbBuildingHandler.java
  5. 12
      src/engine/db/handlers/dbCSSessionHandler.java
  6. 3
      src/engine/db/handlers/dbCharacterRuneHandler.java
  7. 2
      src/engine/db/handlers/dbCharacterSkillHandler.java
  8. 5
      src/engine/db/handlers/dbContractHandler.java
  9. 4
      src/engine/db/handlers/dbEnchantmentHandler.java
  10. 29
      src/engine/db/handlers/dbGuildHandler.java
  11. 4
      src/engine/db/handlers/dbItemHandler.java
  12. 9
      src/engine/db/handlers/dbMineHandler.java
  13. 2
      src/engine/db/handlers/dbMobBaseHandler.java
  14. 40
      src/engine/db/handlers/dbPlayerCharacterHandler.java
  15. 19
      src/engine/db/handlers/dbWarehouseHandler.java

9
src/engine/db/handlers/dbAccountHandler.java

@ -89,7 +89,6 @@ public class dbAccountHandler extends dbHandlerBase { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -276,7 +268,6 @@ public class dbAccountHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
}
}
}

2
src/engine/db/handlers/dbBaneHandler.java

@ -104,7 +104,7 @@ public class dbBaneHandler extends dbHandlerBase { @@ -104,7 +104,7 @@ public class dbBaneHandler extends dbHandlerBase {
Logger.error(e);
return false;
}
return true;
return true;
}
}

1
src/engine/db/handlers/dbBaseClassHandler.java

@ -87,6 +87,5 @@ public class dbBaseClassHandler extends dbHandlerBase { @@ -87,6 +87,5 @@ public class dbBaseClassHandler extends dbHandlerBase {
}
return baseClasses;
}
}

65
src/engine/db/handlers/dbBuildingHandler.java

@ -204,12 +204,12 @@ public class dbBuildingHandler extends dbHandlerBase { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -859,8 +842,8 @@ public class dbBuildingHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
return false;
}
return false;
}
}

12
src/engine/db/handlers/dbCSSessionHandler.java

@ -44,9 +44,8 @@ public class dbCSSessionHandler extends dbHandlerBase { @@ -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 { @@ -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 { @@ -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 { @@ -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) {

3
src/engine/db/handlers/dbCharacterRuneHandler.java

@ -83,9 +83,8 @@ public class dbCharacterRuneHandler extends dbHandlerBase { @@ -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) {

2
src/engine/db/handlers/dbCharacterSkillHandler.java

@ -69,8 +69,8 @@ public class dbCharacterSkillHandler extends dbHandlerBase { @@ -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) {

5
src/engine/db/handlers/dbContractHandler.java

@ -139,8 +139,8 @@ public class dbContractHandler extends dbHandlerBase { @@ -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 { @@ -162,8 +162,7 @@ public class dbContractHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
return false;
}
return false;
}
}

4
src/engine/db/handlers/dbEnchantmentHandler.java

@ -55,10 +55,10 @@ public class dbEnchantmentHandler extends dbHandlerBase { @@ -55,10 +55,10 @@ public class dbEnchantmentHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
}
return false;
}
}
public boolean CLEAR_ENCHANTMENTS(long itemID) {
try (Connection connection = DbManager.getConnection();
@ -69,7 +69,7 @@ public class dbEnchantmentHandler extends dbHandlerBase { @@ -69,7 +69,7 @@ public class dbEnchantmentHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
return false;
}
return false;
}
}

29
src/engine/db/handlers/dbGuildHandler.java

@ -68,9 +68,8 @@ public class dbGuildHandler extends dbHandlerBase { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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) {

4
src/engine/db/handlers/dbItemHandler.java

@ -137,7 +137,6 @@ public class dbItemHandler extends dbHandlerBase { @@ -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 { @@ -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) {

9
src/engine/db/handlers/dbMineHandler.java

@ -80,8 +80,8 @@ public class dbMineHandler extends dbHandlerBase { @@ -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 { @@ -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 { @@ -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 { @@ -129,8 +128,8 @@ public class dbMineHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
return false;
}
return false;
}
}

2
src/engine/db/handlers/dbMobBaseHandler.java

@ -108,8 +108,8 @@ public class dbMobBaseHandler extends dbHandlerBase { @@ -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) {

40
src/engine/db/handlers/dbPlayerCharacterHandler.java

@ -95,9 +95,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -550,8 +548,8 @@ public class dbPlayerCharacterHandler extends dbHandlerBase {
} catch (SQLException e) {
Logger.error(e);
return false;
}
return false;
}
public void LOAD_HERALDY() {

19
src/engine/db/handlers/dbWarehouseHandler.java

@ -20,6 +20,8 @@ import org.joda.time.DateTime; @@ -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 { @@ -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 ) {

Loading…
Cancel
Save