Skip to content

Native Server API ‐ Attunables

Jonas Söderberg edited this page Jul 13, 2024 · 5 revisions

Tables

ItemAttuneSkip

Used to contain information about unattunable items

ItemAttuneStats

Contains a list of stat categories (table), that in turn contain key/val pairs for attunable stats for an item. Note! Only populated after the attunement summary window has been opened, and is probably not intended for use.

Field Type Description
valid bool Category valid for the current character?
stats table A table containing statId:statValue pairs
count int How many items are in this category

ItemAttuneOverwrite

Contains key/val pairs for stats gained for attunable weapons. Not always populated, and is probably not intended for use.

ItemAttuneAffix

Contains a list of all affixes (suffixes), and a table with the stats they would grant

Field Type Description
ex int Blizzard suffixId?
index int ?
stats table A list of stat values granted by this suffix
name string Name of the suffix, for example of The Monkey
prop bool ?

Functions

CanAttuneItemHelper

CanAttuneItemHelper(int: itemId) -> int

Check if the item can be attuned by the current character, taking level, class, and armor proficiency into account

IsAttunableBySomeone

IsAttunableBySomeone(int: itemId) -> bool

Check if the item can be attuned at all, ignoring class, level, etc.

GetItemAttuneOverwrite

GetItemAttuneOverwrite(int: itemId) -> table { int: stat1type, int: stat1value }

Get a list of tables (key/val pairs) when attuning weapons

GetAttuneStatName

GetAttuneStatName(int: statId) -> string

Returns the name of a stat, given a statId

GetItemAttuneProgress

GetItemAttuneProgress(int: itemid, nil|int: affixid, nil|int: titanforged) -> int

Returns the attunment progress for an itemId (optional affixId, optional titanforged) 1 = Titanforged, 2 = Warforged, 3 = Lightforged

GetItemAttuneForge

GetItemAttuneForge(int: itemid) -> int

Returns the attuned forge level for an itemid 1 = Titanforged, 2 = Warforged, 3 = Lightforged

GetAttuneAffixName

GetAttuneAffixName(int: itemId, int: affixId) -> string

Returns the affix name

HasAttunedAnyVariantOfItem

HasAttunedAnyVariantOfItem(int: itemId) -> bool

GetItemAffixMask

GetItemAffixMask(int: itemId) -> int: possibleMask1, int: possibleMask2, int: attunedMask1, int: attunedMask2, int: activeIndex

All masks are uint32