Sell price checks.
This commit is contained in:
parent
a5266432c5
commit
e867feb170
@ -280,6 +280,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -473,6 +473,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1992,6 +1993,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -483,6 +483,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2015,6 +2016,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -483,6 +483,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2028,6 +2029,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -477,6 +477,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2008,6 +2009,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final long sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -472,6 +472,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2009,6 +2010,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final long sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -472,6 +472,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2016,6 +2017,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final long sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +288,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -473,6 +473,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2055,6 +2056,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final long sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -289,6 +289,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -474,6 +474,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2075,6 +2076,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final long sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -471,6 +471,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2075,6 +2076,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final long sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -471,6 +471,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2075,6 +2076,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final long sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -278,6 +278,10 @@ RaidMinionRespawnTime = 300000
|
||||
# Default: 50
|
||||
ClickTaskDelay = 50
|
||||
|
||||
# Correct buylist prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Pets
|
||||
|
@ -216,6 +216,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;
|
||||
@ -1404,6 +1405,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);
|
||||
|
@ -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);
|
||||
|
@ -273,6 +273,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -533,6 +533,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2207,6 +2208,7 @@ public class Config
|
||||
BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS = General.getBoolean("AllowReportsFromSameClanMembers", false);
|
||||
ENABLE_PRIME_SHOP = General.getBoolean("EnablePrimeShop", false);
|
||||
PRIME_SHOP_ITEM_ID = General.getInt("PrimeShopItemId", -1);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
|
||||
// Load FloodProtector config file
|
||||
|
@ -142,11 +142,11 @@ public class BuyListData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(itemId);
|
||||
if (item != null)
|
||||
{
|
||||
if ((price > -1) && (item.getReferencePrice() > price) && (buyList.getNpcsAllowed() != null))
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Item price is too low. BuyList:" + buyList.getListId() + " ItemID:" + itemId + " File:" + f.getName());
|
||||
LOGGER.warning("Setting price to reference price " + item.getReferencePrice() + " instead of " + price + ".");
|
||||
buyList.addProduct(new Product(buyList.getListId(), item, item.getReferencePrice(), restockDelay, count));
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyList.getListId(), item, sellPrice, restockDelay, count));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -273,6 +273,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -538,6 +538,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2212,6 +2213,7 @@ public class Config
|
||||
BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS = General.getBoolean("AllowReportsFromSameClanMembers", false);
|
||||
ENABLE_PRIME_SHOP = General.getBoolean("EnablePrimeShop", false);
|
||||
PRIME_SHOP_ITEM_ID = General.getInt("PrimeShopItemId", -1);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
|
||||
// Load FloodProtector config file
|
||||
|
@ -142,11 +142,11 @@ public class BuyListData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(itemId);
|
||||
if (item != null)
|
||||
{
|
||||
if ((price > -1) && (item.getReferencePrice() > price) && (buyList.getNpcsAllowed() != null))
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Item price is too low. BuyList:" + buyList.getListId() + " ItemID:" + itemId + " File:" + f.getName());
|
||||
LOGGER.warning("Setting price to reference price " + item.getReferencePrice() + " instead of " + price + ".");
|
||||
buyList.addProduct(new Product(buyList.getListId(), item, item.getReferencePrice(), restockDelay, count));
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyList.getListId(), item, sellPrice, restockDelay, count));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -494,6 +494,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1949,6 +1950,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -494,6 +494,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1953,6 +1954,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -494,6 +494,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1953,6 +1954,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -494,6 +494,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1954,6 +1955,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -494,6 +494,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1963,6 +1964,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -494,6 +494,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1976,6 +1977,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ public class MultisellData implements IXmlReader
|
||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||
if (item != null)
|
||||
{
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -186,7 +186,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -496,6 +496,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -1968,6 +1969,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
|
||||
|
@ -135,7 +135,16 @@ public class BuyListData implements IXmlReader
|
||||
break;
|
||||
}
|
||||
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ public class MultisellData implements IXmlReader
|
||||
continue;
|
||||
}
|
||||
|
||||
totalPrice += (item.getReferencePrice() * count);
|
||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||
}
|
||||
|
||||
products.add(product);
|
||||
@ -194,7 +194,7 @@ public class MultisellData implements IXmlReader
|
||||
|
||||
// Check if buy price is lower than sell price.
|
||||
// Only applies when there is only one ingredient and it is adena.
|
||||
if ((ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
if (Config.CORRECT_PRICES && (ingredients.size() == 1) && (lastIngredientId == 57) && (lastIngredientCount < totalPrice))
|
||||
{
|
||||
LOGGER.warning("Buy price " + lastIngredientCount + " is less than sell price " + totalPrice + " at entry " + entryCounter.intValue() + " of multisell " + listId + ".");
|
||||
// Adjust price.
|
||||
|
@ -70,8 +70,8 @@ public class ProductList
|
||||
return (_allowedNpcs != null) && _allowedNpcs.contains(npcId);
|
||||
}
|
||||
|
||||
// public Set<Integer> getNpcsAllowed()
|
||||
// {
|
||||
// return _allowedNpcs;
|
||||
// }
|
||||
public Set<Integer> getNpcsAllowed()
|
||||
{
|
||||
return _allowedNpcs;
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,10 @@ GridNeighborTurnOnTime = 1
|
||||
# Default: 90
|
||||
GridNeighborTurnOffTime = 90
|
||||
|
||||
# Correct buylist and multisell prices when lower than sell price.
|
||||
# Default: True
|
||||
CorrectPrices = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Falling Damage
|
||||
|
@ -496,6 +496,7 @@ public class Config
|
||||
public static int MAX_NPC_ANIMATION;
|
||||
public static int MIN_MONSTER_ANIMATION;
|
||||
public static int MAX_MONSTER_ANIMATION;
|
||||
public static boolean CORRECT_PRICES;
|
||||
public static boolean ENABLE_FALLING_DAMAGE;
|
||||
public static boolean GRIDS_ALWAYS_ON;
|
||||
public static int GRID_NEIGHBOR_TURNON_TIME;
|
||||
@ -2019,6 +2020,7 @@ public class Config
|
||||
GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
|
||||
GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
|
||||
GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
|
||||
CORRECT_PRICES = General.getBoolean("CorrectPrices", true);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
|
||||
DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
|
||||
|
@ -126,7 +126,16 @@ public class BuyListData implements IXmlReader
|
||||
final long restockDelay = parseLong(attrs, "restock_delay", -1L);
|
||||
final long count = parseLong(attrs, "count", -1L);
|
||||
final int baseTax = parseInteger(attrs, "baseTax", defaultBaseTax);
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
final int sellPrice = item.getReferencePrice() / 2;
|
||||
if (Config.CORRECT_PRICES && (price > -1) && (sellPrice > price) && (buyList.getNpcsAllowed() != null))
|
||||
{
|
||||
LOGGER.warning("Buy price " + price + " is less than sell price " + sellPrice + " for ItemID:" + itemId + " of buylist " + buyList.getListId() + ".");
|
||||
buyList.addProduct(new Product(buyListId, item, sellPrice, restockDelay, count, baseTax));
|
||||
}
|
||||
else
|
||||
{
|
||||
buyList.addProduct(new Product(buyListId, item, price, restockDelay, count, baseTax));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user