Chance multisell price check adjustments.

This commit is contained in:
MobiusDevelopment
2021-09-06 21:21:18 +00:00
parent 23c8030168
commit 311bbcdbad
19 changed files with 152 additions and 19 deletions

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -173,7 +173,14 @@ public class MultisellData implements IXmlReader
continue; continue;
} }
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
products.add(product); products.add(product);

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else

View File

@@ -167,7 +167,14 @@ 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)
{ {
totalPrice += ((item.getReferencePrice() / 2) * count); if (chance > 0)
{
totalPrice += ((item.getReferencePrice() / 2) * count) * (chance / 100);
}
else
{
totalPrice += ((item.getReferencePrice() / 2) * count);
}
} }
} }
else else