# Method SpellInfo:HasAttribute [-] [+]

Checks if the SpellInfo has a specific attribute.

Attributes are characteristics or properties that spells can possess. Attributes are divided into different categories (from 0 to 8 in this context).

Here is how each attribute is inspected:

    0 : SpellAttr0
    1 : SpellAttr1
    2 : SpellAttr2
    3 : SpellAttr3
    4 : SpellAttr4
    5 : SpellAttr5
    6 : SpellAttr6
    7 : SpellAttr7
    -1 : SpellCustomAttributes
    -2 : SpellCustomAttributesEx
    -3 : SpellCustomAttributesEx2

@return boolean : Returns true if SpellInfo has the attribute, else false.

## Synopsis

`SpellInfo:HasAttribute( attributeType, attribute )`

## Arguments

`number attributeType`

  The type of the attribute..

  Valid numbers: integers from -127 to 127.

`number attribute`

  The specific attribute to check..

  Valid numbers: integers from 0 to 4,294,967,295.

## Returns

Nothing.

# Keyboard shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

# Search tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct` (or `str`), `enum`, `trait`, `typedef` (or `tdef`).

Generated on
© 2010 - 2024 Eluna Lua Engine