From e09d574f6d3c8f7ccb3d2889497afea8e0f7bd22 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 19 May 2021 22:53:01 +0000 Subject: [PATCH] On some cases we might want to trade with enchanted items. --- .../limitshop/RequestPurchaseLimitShopItemBuy.java | 2 +- .../limitshop/RequestPurchaseLimitShopItemBuy.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index a4c45a408e..45240dff94 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -153,7 +153,7 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket return; } } - else if (player.getInventory().getInventoryItemCount(_product.getIngredientIds()[i], _product.getIngredientEnchants()[i], true) < (_product.getIngredientQuantities()[i] * _amount)) + else if (player.getInventory().getInventoryItemCount(_product.getIngredientIds()[i], _product.getIngredientEnchants()[i] == 0 ? -1 : _product.getIngredientEnchants()[i], true) < (_product.getIngredientQuantities()[i] * _amount)) { player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); player.removeRequest(PrimeShopRequest.class); diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java index 36631494f0..ad9629acc2 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java @@ -169,7 +169,7 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket return; } } - else if (player.getInventory().getInventoryItemCount(_product.getIngredientIds()[i], _product.getIngredientEnchants()[i], true) < (_product.getIngredientQuantities()[i] * _amount)) + else if (player.getInventory().getInventoryItemCount(_product.getIngredientIds()[i], _product.getIngredientEnchants()[i] == 0 ? -1 : _product.getIngredientEnchants()[i], true) < (_product.getIngredientQuantities()[i] * _amount)) { player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); player.removeRequest(PrimeShopRequest.class);