I have a few buylists with 0 arena and I am getting this message:
TradeList XXX itemId XXX has an ADENA sell price lower then reference price.. Automatically Updating it.
I thought that it autoupdates, but it only edits the merchant_buylists and not the custom_merchant_buylists.
Here is a fix:
gameserver/handler/admincommandhandlers/AdminEditNpc.java, line 735:
Replace this:
final PreparedStatement stmt = con.prepareStatement("UPDATE merchant_buylists SET `price`='" + price + "' WHERE `shop_id`='" + tradeListID + "' AND `order`='" + order + "'");
stmt.execute();
stmt.close();
With this:
PreparedStatement stmt;
stmt = con.prepareStatement("UPDATE merchant_buylists SET `price`='" + price + "' WHERE `shop_id`='" + tradeListID + "' AND `order`='" + order + "'");
stmt.execute();
stmt.close();
stmt = con.prepareStatement("UPDATE custom_merchant_buylists SET `price`='" + price + "' WHERE `shop_id`='" + tradeListID + "' AND `order`='" + order + "'");
stmt.execute();
stmt.close();
Also, if you want to insert new buylists in the custom_merchant_buylists table, just modify line 721 to this:
final PreparedStatement stmt = con.prepareStatement("INSERT INTO custom_merchant_buylists (`item_id`,`price`,`shop_id`,`order`) values (" + itemId + "," + price + "," + tradeListID + "," + order + ")");