Fix issue when try cancel the item on marketplace

This commit is contained in:
Snaiker 2022-03-19 17:08:15 +00:00
parent 2fe1796804
commit 5e9b9c7f30

View File

@ -67,7 +67,7 @@ public class MarketPlace {
if (offer != null && habbo.getInventory().getMarketplaceItems().contains(offer)) {
RequestOffersEvent.cachedResults.clear();
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) {
try (PreparedStatement ownerCheck = connection.prepareStatement("SELECT user_id FROM marketplace_items WHERE id = ?")) {
try (PreparedStatement ownerCheck = connection.prepareStatement("SELECT user_id FROM marketplace_items WHERE id = ?", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)) {
ownerCheck.setInt(1, offer.getOfferId());
try (ResultSet ownerSet = ownerCheck.executeQuery()) {
ownerSet.last();