Skip to content

Commit

Permalink
Fix item purchase logic to correctly handle coin requirements in Core…
Browse files Browse the repository at this point in the history
…Advanced.cs
  • Loading branch information
PUNK3DAF committed Feb 13, 2025
1 parent e0b872f commit 9faa1a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CoreAdvanced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private void _BuyItem(string map, int shopID, ShopItem item, int quant = 1, int
Core.DebugLogger(this);

ShopItem? mainItem = Bot.Shops.Items.FirstOrDefault(x =>
x.ID == item.ID && !x.Coins && item.Requirements.All(r => Core.CheckInventory(r.ID, r.Quantity)));
x.ID == item.ID && !(x.Coins && x.Cost > 0) && item.Requirements.All(r => Core.CheckInventory(r.ID, r.Quantity)));

if (mainItem != null)
{
Expand Down

0 comments on commit 9faa1a3

Please sign in to comment.