Proper RequestNewEnchantTry InventoryUpdate logic.
Contributed by nasseka.
This commit is contained in:
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
// iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
// iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
// iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -103,10 +103,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
// iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -123,7 +119,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
// iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -111,10 +111,6 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final InventoryUpdate iu = new InventoryUpdate();
|
|
||||||
iu.addRemovedItem(itemOne);
|
|
||||||
// iu.addRemovedItem(itemTwo);
|
|
||||||
|
|
||||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true) && ((combinationItem.getCommission() <= 0) || player.reduceAdena("Compound-Commission", combinationItem.getCommission(), player, true)))
|
||||||
{
|
{
|
||||||
final double random = (Rnd.nextDouble() * 100);
|
final double random = (Rnd.nextDouble() * 100);
|
||||||
@@ -131,7 +127,25 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
if (itemOne.isStackable() && (itemOne.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemOne);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemOne);
|
||||||
|
}
|
||||||
|
if (itemTwo.isStackable() && (itemTwo.getCount() > 0))
|
||||||
|
{
|
||||||
|
iu.addModifiedItem(itemTwo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iu.addRemovedItem(itemTwo);
|
||||||
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
|
|
||||||
player.removeRequest(request.getClass());
|
player.removeRequest(request.getClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user