Skip to content

Commit

Permalink
RangedPrefix now also counts throwing (#2839)
Browse files Browse the repository at this point in the history
  • Loading branch information
direwolf420 authored Aug 16, 2022
1 parent c4c0ca0 commit e862cf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion patches/tModLoader/Terraria/ModLoader/ItemLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ internal static bool WeaponPrefix(Item item)
=> item.ModItem != null && GeneralPrefix(item) && item.ModItem.WeaponPrefix();

internal static bool RangedPrefix(Item item)
=> item.ModItem != null && GeneralPrefix(item) && item.ModItem.RangedPrefix(); //(item.ranged || item.thrown);
=> item.ModItem != null && GeneralPrefix(item) && item.ModItem.RangedPrefix();

internal static bool MagicPrefix(Item item)
=> item.ModItem != null && GeneralPrefix(item) && item.ModItem.MagicPrefix();
Expand Down
2 changes: 1 addition & 1 deletion patches/tModLoader/Terraria/ModLoader/ModItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public virtual bool WeaponPrefix()
/// Takes priority over MagicPrefix
/// </summary>
public virtual bool RangedPrefix()
=> Item.ranged;
=> Item.ranged || Item.CountsAsClass(DamageClass.Throwing);

/// <summary>
/// Allows you to change whether or not a weapon receives magic prefixes. Return true if the item should receive magic prefixes and false if it should not.
Expand Down

0 comments on commit e862cf4

Please sign in to comment.