Sell price checks.
This commit is contained in:
@@ -302,6 +302,10 @@ RaidMinionRespawnTime = 300000
|
||||
# Default: 50
|
||||
ClickTaskDelay = 50
|
||||
|
||||
# Correct buylist prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Pets
|
||||
|
@@ -222,6 +222,7 @@ public class Config
|
||||
public static int WYVERN_SPEED;
|
||||
public static int STRIDER_SPEED;
|
||||
public static boolean ALLOW_WYVERN_UPGRADER;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static String NONDROPPABLE_ITEMS;
|
||||
public static List<Integer> LIST_NONDROPPABLE_ITEMS = new ArrayList<>();
|
||||
public static String PET_RENT_NPC;
|
||||
@@ -1452,6 +1453,7 @@ public class Config
|
||||
WYVERN_SPEED = generalConfig.getInt("WyvernSpeed", 100);
|
||||
STRIDER_SPEED = generalConfig.getInt("StriderSpeed", 80);
|
||||
ALLOW_WYVERN_UPGRADER = generalConfig.getBoolean("AllowWyvernUpgrader", false);
|
||||
CORRECT_PRICES = generalConfig.getBoolean("CorrectPrices", true);
|
||||
ENABLE_AIO_SYSTEM = generalConfig.getBoolean("EnableAioSystem", true);
|
||||
ALLOW_AIO_NCOLOR = generalConfig.getBoolean("AllowAioNameColor", true);
|
||||
AIO_NCOLOR = Integer.decode("0x" + generalConfig.getString("AioNameColor", "88AA88"));
|
||||
|
@@ -84,10 +84,11 @@ public class TradeController
|
||||
limitedItem = true;
|
||||
}
|
||||
|
||||
if (!rset1.getString("npc_id").equals("gm") && (price < (item.getReferencePrice() / 2)))
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price < sellPrice) && !rset1.getString("npc_id").equals("gm"))
|
||||
{
|
||||
LOGGER.warning("TradeList " + buy1.getListId() + " itemId " + itemId + " has an ADENA sell price lower then reference price.. Automatically Updating it..");
|
||||
price = item.getReferencePrice();
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buy1.getListId() + ".");
|
||||
price = sellPrice;
|
||||
}
|
||||
|
||||
item.setPriceToSell(price);
|
||||
|
Reference in New Issue
Block a user