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 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.

ItemAttuneOverwrite

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

ItemAttuneAffix

Contains all affixes, and a table with the stats they would grant

Functions

CanAttuneItemHelper(itemId) -> int

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

IsAttunableBySomeone(itemId) -> bool

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

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

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

GetAttuneStatName(statId) -> string

Returns the name of a stat, given a statId

GetItemAttuneProgress(itemid, affixid, titanforged) -> int

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

GetItemAttuneForge(itemid) -> int

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

GetAttuneAffixName(itemId, affixId) -> string

Returns the affix name

HasAttunedAnyVariantOfItem(itemId) -> bool

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