From e8957da9f931da0f7c63b01acda851bc46793d1e Mon Sep 17 00:00:00 2001 From: bobfishkins23 Date: Tue, 28 May 2024 00:17:59 -0400 Subject: [PATCH] Infusion right click fix --- Content/Abilities/AbilityHandler.cs | 2 +- Content/Abilities/InfusionItem.ModItemMethods.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Content/Abilities/AbilityHandler.cs b/Content/Abilities/AbilityHandler.cs index cb58f3478..ea1bf9a28 100644 --- a/Content/Abilities/AbilityHandler.cs +++ b/Content/Abilities/AbilityHandler.cs @@ -252,7 +252,7 @@ public bool CanSetInfusion(InfusionItem Item) } } - return true; + return infusions.Count(n => n != null) < InfusionLimit; } /// diff --git a/Content/Abilities/InfusionItem.ModItemMethods.cs b/Content/Abilities/InfusionItem.ModItemMethods.cs index 46eee669e..991b6cf48 100644 --- a/Content/Abilities/InfusionItem.ModItemMethods.cs +++ b/Content/Abilities/InfusionItem.ModItemMethods.cs @@ -74,13 +74,16 @@ public override void RightClick(Player Player) for (int i = 0; i < mp.InfusionLimit; i++) { - if (mp.GetInfusion(i) == null || i == mp.InfusionLimit - 1) + if (mp.GetInfusion(i) == null) { mp.SetInfusion(Item.Clone().ModItem as InfusionItem, i); Item.TurnToAir(); + return; } } + + Item.stack = 1; } } } \ No newline at end of file