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

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