WoW API type: AchievementString

From AddOn Studio
Jump to navigation Jump to search

API types

Format[edit]

Item strings consist of the string "achievement:" followed by 10 colon delimited portions, which describe the achievement, its status of completion (completed criteria) and the character whose status of completion is related to.

achievement:achievementId:characterId:finished:month:day:year:criteria1:criteria2:criteria3:criteria4
achievementID
Achievement ID that can be used for GetAchievementLink calls.
characterId
Character ID whose the achievement is related to.
finished
Status of this achievement. "1" means finished, and vice versa.
month
Month this was finished.
day
Day this was finished.
year
Year this was finished, starts from 2000.
criteria1, criteria2, criteria3, criteria4
Bitset list representing which criteria are finished.

Character Ids[edit]

The character ID corresponds to the character's GUID but it doesn't include the first 2 characters. One might determine whether the given ID is that of the player like so:

local PlayerGUID = strsub(UnitGUID("player"), 3)
local _, id, GUID = strsplit(":", achievementLink);
if (PlayerGUID == GUID) then
  -- Do something only with the player's own achievement links
end

Examples[edit]

"achievement:2186:00000000002FDDE9:1:12:19:8:4294967295:4294967295:4294967295:4294967295"

Finished string of The Immortal achievement

"achievement:1284:00000000002FDDE9:0:0:0:-1:65529:0:0:0"

Unfinished string of the Outland Dungeon Master achievement