API GetArtifactInfoByRace

Returns the information for a specific race's artifact.

artifactName, artifactDescription, artifactRarity, artifactIcon, hoverDescription, keystoneCount, bgTexture, firstCompletionTime, completionCount = GetArtifactInfoByRace(raceIndex, artifactIndex);

Arguments

 * raceIndex : Integer - Index of the race to pick the artifact from.
 * artifactIndex : Table - Index of the artifact.

Returns

 * artifactName : String - The name of the artifact.
 * artifactDescription : String - The description displayed on the artifact detail page. Only visible after completion for rare artifacts.
 * artifactRarity : Integer - The rarity of the artifact, 0 for Common and 1 for Rare.
 * artifactIcon : String - The path to the artifact's icon texture.
 * hoverDescription : String - The description shown in the tooltip when hovering over the completed artifact. Not visible before the artifact is completed.
 * keystoneCount : Integer - The number of Keystone slots this artifact has. Only visible when this is the in progress artifact.
 * bgTexture : String - The path to the artifact's background texture. Only displayed when the artifact is rare.
 * firstCompletionTime : Integer - The first time the artifact was ever completed, in the same format as time.
 * completionCount : Integer - The number of times this artifact has been completed.

Details

 * Rare artifacts are always at the front of the list of completed artifacts. For example, if you have two rare artifacts, their indices will always be 2 and 3.


 * The formatting used in the US client for the display of the firstCompletionTime tooltip is "%m/%d/%y %I:%M %p". You can view this formatting using the date function and the firstCompletionTime.

Example
The snippet below prints number of completed artifacts for the every Archaeology race. /run print("Total artifacts"); for x=1,9 do local c=GetNumArtifactsByRace(x); local a =0; for y=1,c do local t = select(9, GetArtifactInfoByRace(x, y)); a=a+t;end local rn = GetArchaeologyRaceInfo(x); if( c > 1 ) then print(rn .. ": " .. a); end end

ru:Справка:Статьи о функциях API/Предварительная загрузка