From 85774caef675fae76d843e17895840bedcf39119 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 19 Oct 2017 20:32:22 +0000 Subject: [PATCH] Proper primeshop count check. --- .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 2 +- .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 2 +- .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 2 +- .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java index b1bc12cefd..78e9e90b8b 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java @@ -124,7 +124,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid brId from Prime", Config.DEFAULT_PUNISH); return false; } - else if ((count < 1) && (count > 99)) + else if ((count < 1) || (count > 99)) { Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid itemcount [" + count + "] from Prime", Config.DEFAULT_PUNISH); player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE)); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java index b1bc12cefd..78e9e90b8b 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java @@ -124,7 +124,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid brId from Prime", Config.DEFAULT_PUNISH); return false; } - else if ((count < 1) && (count > 99)) + else if ((count < 1) || (count > 99)) { Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid itemcount [" + count + "] from Prime", Config.DEFAULT_PUNISH); player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE)); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java index b1bc12cefd..78e9e90b8b 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java @@ -124,7 +124,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid brId from Prime", Config.DEFAULT_PUNISH); return false; } - else if ((count < 1) && (count > 99)) + else if ((count < 1) || (count > 99)) { Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid itemcount [" + count + "] from Prime", Config.DEFAULT_PUNISH); player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE)); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java index b1bc12cefd..78e9e90b8b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java @@ -124,7 +124,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid brId from Prime", Config.DEFAULT_PUNISH); return false; } - else if ((count < 1) && (count > 99)) + else if ((count < 1) || (count > 99)) { Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid itemcount [" + count + "] from Prime", Config.DEFAULT_PUNISH); player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE));