Removed stackable checks from compound clientpackets.
Contributed by nasseka.
This commit is contained in:
parent
55ad1bd328
commit
c16d5940a6
@ -82,7 +82,7 @@ public class RequestNewEnchantPushTwo implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(ExEnchantTwoFail.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -84,7 +84,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(new ExEnchantFail(itemOne.getId(), itemTwo.getId()));
|
||||
player.removeRequest(request.getClass());
|
||||
@ -103,7 +103,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addRemovedItem(itemOne);
|
||||
iu.addRemovedItem(itemTwo);
|
||||
// iu.addRemovedItem(itemTwo);
|
||||
|
||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ public class RequestNewEnchantPushTwo implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(ExEnchantTwoFail.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -84,7 +84,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(new ExEnchantFail(itemOne.getId(), itemTwo.getId()));
|
||||
player.removeRequest(request.getClass());
|
||||
@ -103,7 +103,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addRemovedItem(itemOne);
|
||||
iu.addRemovedItem(itemTwo);
|
||||
// iu.addRemovedItem(itemTwo);
|
||||
|
||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ public class RequestNewEnchantPushTwo implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(ExEnchantTwoFail.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -84,7 +84,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(new ExEnchantFail(itemOne.getId(), itemTwo.getId()));
|
||||
player.removeRequest(request.getClass());
|
||||
@ -103,7 +103,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addRemovedItem(itemOne);
|
||||
iu.addRemovedItem(itemTwo);
|
||||
// iu.addRemovedItem(itemTwo);
|
||||
|
||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ public class RequestNewEnchantPushTwo implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(ExEnchantTwoFail.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -84,7 +84,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(new ExEnchantFail(itemOne.getId(), itemTwo.getId()));
|
||||
player.removeRequest(request.getClass());
|
||||
@ -103,7 +103,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addRemovedItem(itemOne);
|
||||
iu.addRemovedItem(itemTwo);
|
||||
// iu.addRemovedItem(itemTwo);
|
||||
|
||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ public class RequestNewEnchantPushTwo implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(ExEnchantTwoFail.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -84,7 +84,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(new ExEnchantFail(itemOne.getId(), itemTwo.getId()));
|
||||
player.removeRequest(request.getClass());
|
||||
@ -103,7 +103,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addRemovedItem(itemOne);
|
||||
iu.addRemovedItem(itemTwo);
|
||||
// iu.addRemovedItem(itemTwo);
|
||||
|
||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ public class RequestNewEnchantPushTwo implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(ExEnchantTwoFail.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -84,7 +84,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
}
|
||||
|
||||
// Lets prevent using same item twice. Also stackable item check.
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (!itemOne.isStackable() || (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2)))
|
||||
if ((itemOne.getObjectId() == itemTwo.getObjectId()) && (player.getInventory().getInventoryItemCount(itemOne.getItem().getId(), -1) < 2))
|
||||
{
|
||||
client.sendPacket(new ExEnchantFail(itemOne.getId(), itemTwo.getId()));
|
||||
player.removeRequest(request.getClass());
|
||||
@ -103,7 +103,7 @@ public class RequestNewEnchantTry implements IClientIncomingPacket
|
||||
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addRemovedItem(itemOne);
|
||||
iu.addRemovedItem(itemTwo);
|
||||
// iu.addRemovedItem(itemTwo);
|
||||
|
||||
if (player.destroyItem("Compound-Item-One", itemOne, 1, null, true) && player.destroyItem("Compound-Item-Two", itemTwo, 1, null, true))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user