Skip to content

Commit

Permalink
Infusion right click fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ScalarVector1 committed May 28, 2024
1 parent e49da1e commit e8957da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Content/Abilities/AbilityHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public bool CanSetInfusion(InfusionItem Item)
}
}

return true;
return infusions.Count(n => n != null) < InfusionLimit;
}

/// <summary>
Expand Down
5 changes: 4 additions & 1 deletion Content/Abilities/InfusionItem.ModItemMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

0 comments on commit e8957da

Please sign in to comment.