Terraria.Player.HasAmmo C# (CSharp) Method

HasAmmo() public method

public HasAmmo ( Item sItem, bool canUse ) : bool
sItem Item
canUse bool
return bool
        public bool HasAmmo(Item sItem, bool canUse)
        {
            if (sItem.useAmmo > 0)
            {
                canUse = false;
                for (int index = 0; index < 58; ++index)
                {
                    if (this.inventory[index].ammo == sItem.useAmmo && this.inventory[index].stack > 0)
                    {
                        canUse = true;
                        break;
                    }
                }
            }
            return canUse;
        }
Player