RequestExPledgeItemBuy and RequestPurchaseLimitShopItemBuy item count checks.

This commit is contained in:
MobiusDevelopment 2022-08-29 12:01:53 +00:00
parent 20275f28e7
commit 4ed3354380
11 changed files with 54 additions and 8 deletions

View File

@ -43,6 +43,12 @@ public class RequestExPledgeItemBuy implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
if ((_count < 1) || (_count > 10000))
{
client.sendPacket(new ExPledgeItemBuy(1));
return;
}
final Player player = client.getPlayer();
if ((player == null) || (player.getClan() == null))
{

View File

@ -43,6 +43,12 @@ public class RequestExPledgeItemBuy implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
if ((_count < 1) || (_count > 10000))
{
client.sendPacket(new ExPledgeItemBuy(1));
return;
}
final Player player = client.getPlayer();
if ((player == null) || (player.getClan() == null))
{

View File

@ -43,6 +43,12 @@ public class RequestExPledgeItemBuy implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
if ((_count < 1) || (_count > 10000))
{
client.sendPacket(new ExPledgeItemBuy(1));
return;
}
final Player player = client.getPlayer();
if ((player == null) || (player.getClan() == null))
{

View File

@ -43,6 +43,12 @@ public class RequestExPledgeItemBuy implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
if ((_count < 1) || (_count > 10000))
{
client.sendPacket(new ExPledgeItemBuy(1));
return;
}
final Player player = client.getPlayer();
if ((player == null) || (player.getClan() == null))
{

View File

@ -43,6 +43,12 @@ public class RequestExPledgeItemBuy implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
if ((_count < 1) || (_count > 10000))
{
client.sendPacket(new ExPledgeItemBuy(1));
return;
}
final Player player = client.getPlayer();
if ((player == null) || (player.getClan() == null))
{

View File

@ -43,6 +43,12 @@ public class RequestExPledgeItemBuy implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
if ((_count < 1) || (_count > 10000))
{
client.sendPacket(new ExPledgeItemBuy(1));
return;
}
final Player player = client.getPlayer();
if ((player == null) || (player.getClan() == null))
{

View File

@ -86,13 +86,14 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket
return;
}
if (_amount < 1)
if (_product == null)
{
return;
}
if (_product == null)
if ((_amount < 1) || (_amount > 10000))
{
player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVENTORY_OVERFLOW));
return;
}

View File

@ -43,6 +43,12 @@ public class RequestExPledgeItemBuy implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
if ((_count < 1) || (_count > 10000))
{
client.sendPacket(new ExPledgeItemBuy(1));
return;
}
final Player player = client.getPlayer();
if ((player == null) || (player.getClan() == null))
{

View File

@ -86,13 +86,14 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket
return;
}
if (_amount < 1)
if (_product == null)
{
return;
}
if (_product == null)
if ((_amount < 1) || (_amount > 10000))
{
player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVENTORY_OVERFLOW));
return;
}

View File

@ -93,13 +93,14 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket
return;
}
if (_amount < 1)
if (_product == null)
{
return;
}
if (_product == null)
if ((_amount < 1) || (_amount > 10000))
{
player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVENTORY_OVERFLOW));
return;
}

View File

@ -93,13 +93,14 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket
return;
}
if (_amount < 1)
if (_product == null)
{
return;
}
if (_product == null)
if ((_amount < 1) || (_amount > 10000))
{
player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVENTORY_OVERFLOW));
return;
}