Remove primeshop request if transaction canceled.

This commit is contained in:
MobiusDev
2017-12-03 09:36:31 +00:00
parent c1d931342c
commit 98a1a39156
5 changed files with 15 additions and 0 deletions

View File

@@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (paymentId < 0) if (paymentId < 0)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
else if (paymentId > 0) else if (paymentId > 0)
@@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true))
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
} }
@@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (activeChar.getPrimePoints() < price) if (activeChar.getPrimePoints() < price)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
activeChar.setPrimePoints(activeChar.getPrimePoints() - price); activeChar.setPrimePoints(activeChar.getPrimePoints() - price);

View File

@@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (paymentId < 0) if (paymentId < 0)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
else if (paymentId > 0) else if (paymentId > 0)
@@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true))
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
} }
@@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (activeChar.getPrimePoints() < price) if (activeChar.getPrimePoints() < price)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
activeChar.setPrimePoints(activeChar.getPrimePoints() - price); activeChar.setPrimePoints(activeChar.getPrimePoints() - price);

View File

@@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (paymentId < 0) if (paymentId < 0)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
else if (paymentId > 0) else if (paymentId > 0)
@@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true))
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
} }
@@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (activeChar.getPrimePoints() < price) if (activeChar.getPrimePoints() < price)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
activeChar.setPrimePoints(activeChar.getPrimePoints() - price); activeChar.setPrimePoints(activeChar.getPrimePoints() - price);

View File

@@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (paymentId < 0) if (paymentId < 0)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
else if (paymentId > 0) else if (paymentId > 0)
@@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true))
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
} }
@@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (activeChar.getPrimePoints() < price) if (activeChar.getPrimePoints() < price)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
activeChar.setPrimePoints(activeChar.getPrimePoints() - price); activeChar.setPrimePoints(activeChar.getPrimePoints() - price);

View File

@@ -77,6 +77,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (paymentId < 0) if (paymentId < 0)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
else if (paymentId > 0) else if (paymentId > 0)
@@ -84,6 +85,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true)) if (!activeChar.destroyItemByItemId("PrimeShop-" + item.getBrId(), paymentId, price, activeChar, true))
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
} }
@@ -92,6 +94,7 @@ public final class RequestBRBuyProduct implements IClientIncomingPacket
if (activeChar.getPrimePoints() < price) if (activeChar.getPrimePoints() < price)
{ {
activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT));
activeChar.removeRequest(PrimeShopRequest.class);
return; return;
} }
activeChar.setPrimePoints(activeChar.getPrimePoints() - price); activeChar.setPrimePoints(activeChar.getPrimePoints() - price);