-
Notifications
You must be signed in to change notification settings - Fork 9
Home
Rainrider edited this page Jun 27, 2016
·
12 revisions
The data is laid out as follows:
artifacts = {
knowledgeLevel = number,
knowledgeMultiplier = number,
[artifactID] = { -- itemID of the artifact
name = string,
icon = number,
unspentPower = number, -- amount of artifact power that can be spent for purchasing traits
numRanksPurchased = number, -- amount of purchased ranks
numRanksPurchasable = number, -- amount of ranks available for purchase
power = number, -- amount of power gained for the next rank (the bar value of the artifact xp bar)
maxPower = number, -- amount of total power until the next rank
powerForNextRank = number, -- amount of power needed for the next rank (=maxPower - power)
traits = { -- a table containing the known traits
{
traitID = number,
spellID = number,
name = string,
icon = number,
currentRank = number,
maxRank = number,
bonusRanks = number, -- amount of bonus ranks from relics
isGold = boolean, -- true for traits that have the elite border in the stock ui
isStart = boolean, -- true for the first learnable trait
isFinal = boolean, -- true for the last purchasable trait
},
},
relics = { -- a table containing the artifact relics slots
{
type = string, -- use _G["RELIC_SLOT_TYPE_"..type:upper()] to get a localized string
isLocked = boolean, -- true if the slot is locked and relics cannot be placed in it
name = string|nil, -- name of the currently placed relic if the slot is unlocked
icon = number|nil, -- icon of the currently placed relic if the slot is unlocked
itemID = number|nil, -- itemID of the currently placed relic if the slot is unlocked
link = string|nil, -- item link of the currently placed relic if the slot is unlocked
},
},
},
}
-
:GetAllArtifactsInfo()
- returns a complete copy of table from above.-
artifacts
(table)
-
-
:GetArtifactInfo(artifactID)
- returns the data available for the requested artifact. If artifactID is omitted, the data for the currently equipped artifact is returned.-
artifactID
(number) -
artifacts[artifactID]
(table)
-
-
:GetNumObtainedArtifacts()
- returns the amount of found artifacts. Can be compared toC_ArtifactUI.GetNumObtainedArtifacts()
to verify that data for all obtained artifacts is collected.-
numObtained
(number)
-
-
:GetArtifactTraits(artifactID)
- returns the known traits for the requested artifact. If artifactID is omitted, the traits for the currently equipped artifact are returned.-
artifactID
(number) -
artifacts[artifactID].traits
(table)
-
-
:GetArtifactRelics(artifactID)
- returns the relics for the requested artifact. If artifactID is omitted, the relics for the currently equipped artifact are returned.-
artifactID
(number) -
data
(table)
-
-
:GetArtifactPower(artifactID)
- returns power data for the requested artifact. If artifactID is omitted, the values for the currently equipped artifact are returned.-
artifactID
(number) -
unspentPower
(number) -
power
(number) -
maxPower
(number) -
powerForNextRank
(number) -
numRanksPurchased
(number) -
numRanksPurchasable
(number)
-
-
:GetArtifactKnowledge()
- return the artifact knowledge level and multiplier. Those are shared among all artifacts.-
knowledgeLevel
(number) -
knowledgeMultiplier
(number)
-
-
:ForceUpdate()
- forces a complete scan of all obtained artifacts.
The following messages can be registered through CallbackHandler-1.0:
-
"ARTIFACT_ADDED"
- fired after a new artifact has been added-
artifactID
(number) - itemID of the added artifact
-
-
"ARTIFACT_EQUIPPED_CHANGED"
- fired after a new weapons was equipped-
oldArtifactID|nil
(number) - itemID of the previously equipped artifact or nil if either no artifact was equipped or LAD just got the data -
newArtifactID|nil
(number) - itemID of the newly equipped artifact or nil if it is not an artifact
-
-
"ARTIFACT_KNOWLEDGE_CHANGED"
-
knowledgeLevel
(number) -
knowledgeMultiplier
(number)
-
-
"ARTIFACT_TRAITS_UPDATED"
-
artifactID
(number) -
numRanksPurchased
(number) -
artifacts[artifactID].traits
(table)
-
-
"ARTIFACT_XP_UPDATED"
-
artifactID
(number) -
unspentPower
(number) -
power
(number) -
maxPower
(number) -
powerForNextRank
(number) -
numRanksPurchased
(number) -
numRanksPurchasable
(number)
-
-
"ARTIFACT_DATA_MISSING"
-
type
(string) - the type of missing data. Currently either "artifact", meaning some artifact(s) was/were not scanned at all, or "knowledge", meaning the stored knowledgeMultiplier does not correspond to the knowledgeLevel. -
numArtifactsMissing
orknowledgeLevel
(number) - The return depends on the type. For type "artifact" - how many artifacts are not yet found (open your bank!). For type "knowledge" - the new knowledge level. The multiplier can be only acquired if an artifact is viewed or the addon keeps a table of level-multiplier pairs (those relationships are likely to change through the course of the expansion though as this is intended as a catch-up mechanic).
-