From 98a1a391560fe975718acb3ca0837f56d3a8df84 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 3 Dec 2017 09:36:31 +0000 Subject: [PATCH] Remove primeshop request if transaction canceled. --- .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 3 +++ .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 3 +++ .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 3 +++ .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 3 +++ .../network/clientpackets/primeshop/RequestBRBuyProduct.java | 3 +++ 5 files changed, 15 insertions(+) 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 78e9e90b8b..f178775376 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 @@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (paymentId < 0) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } else if (paymentId > 0) @@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } } @@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (activeChar.getPrimePoints() < price) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } activeChar.setPrimePoints(activeChar.getPrimePoints() - price); 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 78e9e90b8b..f178775376 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 @@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (paymentId < 0) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } else if (paymentId > 0) @@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } } @@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (activeChar.getPrimePoints() < price) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } activeChar.setPrimePoints(activeChar.getPrimePoints() - price); 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 78e9e90b8b..f178775376 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 @@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (paymentId < 0) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } else if (paymentId > 0) @@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } } @@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (activeChar.getPrimePoints() < price) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } activeChar.setPrimePoints(activeChar.getPrimePoints() - price); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java index 78e9e90b8b..f178775376 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java @@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (paymentId < 0) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } else if (paymentId > 0) @@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } } @@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (activeChar.getPrimePoints() < price) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } activeChar.setPrimePoints(activeChar.getPrimePoints() - price); 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 78e9e90b8b..f178775376 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 @@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (paymentId < 0) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } else if (paymentId > 0) @@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } } @@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket if (activeChar.getPrimePoints() < price) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + activeChar.removeRequest(PrimeShopRequest.class); return; } activeChar.setPrimePoints(activeChar.getPrimePoints() - price);