-
Notifications
You must be signed in to change notification settings - Fork 2
SynastriaCoreLib ‐ Attunement
The Attunement module contains all functions related to item attunement.
SynastriaCoreLib.getItemStatus(string: itemLink) -> int
Deprecated.
SynastriaCoreLib.CheckItemValid(int|string: itemIdOrLink) -> int
Checks if the specified item is valid for attunement for the current player.
SynastriaCoreLib.IsItemValid(int|string: itemIdOrLink) -> bool
`
Same as above, but simply returns a true/false.
## GetAttuneProgress
```lua
SynastriaCoreLib.GetAttuneProgress(int|string: itemIdOrLink, nil|int: suffixId, nil|int: forgedType) -> int
Returns the attunement progress for the specified item. The suffixId and forgedType parameters are optional, and only used when the first parameter is an itemId.
SynastriaCoreLib.GetItemAttuneForge(int|string: itemIdOrLink) -> int
Get the forged level attuned for a particular item.
Description | Value |
---|---|
Unknown / Error | -1 |
None | 0 |
Titanforged | 1 |
Warforged | 2 |
Lightforged | 3 |
SynastriaCoreLib.IsAttuned(int|string: itemIdOrLink) -> bool
Check if an item is attuned. Uses GetItemAttuneProgress behind the scenes.
SynastriaCoreLib.HasAttunedAnyVariant(int|string: itemIdOrLink) -> bool
Check if ANY variant of the item is attuned. This could be either a suffix or a forgetype.
SynastriaCoreLib.HasAttunedAllVariants(int|string: itemIdOrLink) -> bool
Check if ALL variants of the item have been attuned. This means all suffixes, and all forgetypes.
SynastriaCoreLib.IsAttunable(int|string: itemIdOrLink) -> bool
Check if the item is attunable by the current player. Uses IsItemValid behind the scenes. Will return false for already attuned items since you cannot attune an item that's already been attuned.
SynastriaCoreLib.IsAttunableBySomeone(int|string: itemIdOrLink) -> bool
Check if the item can be attuned at all, not necessarily by the current player.
SynastriaCoreLib.HasAttuneProgress(int|string: itemIdOrLink) -> bool
Check if the attunement progress for an item is greater than 0, yet less than 100.
SynastriaCoreLib.InProgressItems() -> Iterator
Returns an iterator for use in for .. in
for all items that have a progress between 0 and 100.
SynastriaCoreLib.GetAttunedSuffix(itemId) -> nil|int
Broken / Deprecated since Client Patch 16. Used to return the one suffix that had been attuned.
SynastriaCoreLib.GetSuffixName(int: itemId, int: suffixId) -> nil|string
Returns the suffix name.
SynastriaCoreLib.GetItemAffixMask(int: itemId) -> int: possibleMask1, int: possibleMask2, int: attunedMask1, int: attunedMask2, int: activeIndex
Returns suffix information about an item. possibleMask1 and possibleMask2 contains information about which suffixes are possible to attune, while attunedMask1 and attunedMask2 contains which have actually been attuned. The activeIndex is which suffix is currently active (according to the priority specified by the player.)
SynastriaCoreLib.GetItemStats(string: itemLink, int: suffixId) -> table
Deprecated. Broken since Client Patch 16. Get the stats for an item with a particular suffix.
SynastriaCoreLib.GetItemAttuneOverwrite(int: itemId) -> nil|table
Returns override stats for certain items. Currently only weapons, but may be expanded in the future.
SynastriaCoreLib.GetAttuneStatName(int: statId) -> nil|string
Returns the name of a specific stat.
SynastriaCoreLib.GetItemInfo(string: itemLink) -> nil|table
Returns a table containing attunement information about the specified item.
Field | Type | Description |
---|---|---|
itemId | int | The item's ID |
attuned | bool | If the item is attuned or not, according to GetAttuneProgress() |
progress | int | The item's attunement progress |
suffixMask | table{int} | The item's suffixMask |
SynastriaCoreLib.GetItemInfoCustom(int: itemId) -> ...
Same as native GetItemInfo, but returns a bit fewer pieces of information. The benefit its that it doesn't require the item to be loaded/cached on the server.
SynastriaCoreLib.GetItemExtraCustom(int: itemId) -> ...
SynastriaCoreLib.ItemHasRandomSuffix(int: itemId) -> bool
Check if the item has a suffix.
SynastriaCoreLib.ItemAffixCanRollResist(int: itemId) -> bool
Check if the item can roll a resistance suffix.
SynastriaCoreLib.ItemHasBaseResist(int: itemId) -> bool
Check if the item has any base resistance.