Chance multisell price check adjustments.
This commit is contained in:
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -173,8 +173,15 @@ public class MultisellData implements IXmlReader
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
products.add(product);
|
products.add(product);
|
||||||
}
|
}
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
@@ -166,10 +166,17 @@ public class MultisellData implements IXmlReader
|
|||||||
|
|
||||||
final Item item = ItemTable.getInstance().getTemplate(id);
|
final Item item = ItemTable.getInstance().getTemplate(id);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (chance > 0)
|
||||||
|
{
|
||||||
|
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
totalPrice += ((item.getReferencePrice() / 2) * count);
|
totalPrice += ((item.getReferencePrice() / 2) * count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
|
||||||
|
Reference in New Issue
Block a user