|
|
|
@ -98,6 +98,7 @@ public class dbContractHandler extends dbHandlerBase {
@@ -98,6 +98,7 @@ public class dbContractHandler extends dbHandlerBase {
|
|
|
|
|
|
|
|
|
|
public void LOAD_SELL_LIST_FOR_CONTRACT(final Contract contract) { |
|
|
|
|
|
|
|
|
|
if(!contract.getName().contains("Sage")) { |
|
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_contract_selltype` WHERE `contractID` = ?;")) { |
|
|
|
|
|
|
|
|
@ -125,6 +126,21 @@ public class dbContractHandler extends dbHandlerBase {
@@ -125,6 +126,21 @@ public class dbContractHandler extends dbHandlerBase {
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
Logger.error(e); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_contract_selltype` WHERE `type` = ?;")) { |
|
|
|
|
|
|
|
|
|
preparedStatement.setInt(1, 2); |
|
|
|
|
|
|
|
|
|
ResultSet rs = preparedStatement.executeQuery(); |
|
|
|
|
|
|
|
|
|
while (rs.next()) { |
|
|
|
|
contract.getBuySkillToken().add(rs.getInt("value")); |
|
|
|
|
} |
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
Logger.error(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean updateAllowedBuildings(final Contract con, final long slotbitvalue) { |
|
|
|
|