On some cases we might want to trade with enchanted items.

This commit is contained in:
MobiusDevelopment
2021-05-19 22:53:01 +00:00
parent 0fc220755a
commit e09d574f6d
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);