12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

642 Part IV ■ <strong>Reference</strong>quantity—If applicable, number <strong>of</strong> steps taken towards completing thecriterion (e.g. <strong>for</strong> the only criterion <strong>of</strong> ‘‘Did Somebody Order a KnuckleS<strong>and</strong>wich?‘‘, the player’s current Unarmed skill; <strong>for</strong> the first criterion <strong>of</strong>‘‘Pest Control‘‘, 1 if the player has killed an Adder, 0 otherwise (number)requiredQuantity—If applicable, number <strong>of</strong> steps required to completethe criterion (e.g. 400 <strong>for</strong> the only criterion <strong>of</strong> ‘‘Did Somebody Order aKnuckle S<strong>and</strong>wich?‘‘; 1 <strong>for</strong> any criterion <strong>of</strong> ‘‘Pest Control’’ (number)characterName—Character name with which the criterion was completed.Currently always the player character’s name <strong>for</strong> completed criteria (string)flags—Test against the following masks with bit.b<strong>and</strong>() to reveal additionalin<strong>for</strong>mation: (bitfield)0x00000001—Criterion should be displayed as a progress bar0x00000002—Criterion should be hidden in normal achievement displaysassetID—Internal ID number <strong>of</strong> the quest to complete, NPC to kill, itemto acquire, world object to interact with, achievement to earn, or othergame entity related to completing the criterion. (Note: some but not all<strong>of</strong> these ID types are usable elsewhere in the <strong>WoW</strong> API) (number)quantityString—Text to be shown when displaying quantity <strong>and</strong>requiredQuantity in a UI element. (Not always the same as <strong>for</strong>mat(“%d /%d“, quantity, requiredQuantity); e.g. ‘‘Got My Mind On My Money’’shows monetary amounts with embedded textures <strong>for</strong> gold, silver, <strong>and</strong> copper)(string)criteriaID—Unique ID number identifying the criterion; usable withGetAchievementInfoFromCriteria() (number)GetAchievementInfoGets in<strong>for</strong>mation about an achievement or statistic.id, name, points, completed, month, day, year, description, flags, iicon, rewardText = GetAchievementInfo(category, index) or iGetAchievementInfo(id)Arguments:category—Numeric ID <strong>of</strong> an achievement category (number)index—Index <strong>of</strong> an achievement within a category (between 1 <strong>and</strong> GetCategoryNumAchievements())(number)id—The numeric ID <strong>of</strong> an achievement or statistic (number)Returns:id—The numeric ID <strong>of</strong> the achievement or statistic (number)name—Name <strong>of</strong> the achievement or statistic (string)points—Amount <strong>of</strong> achievement points awarded <strong>for</strong> completing the achievement(number)completed—True if the player has completed the achievement; otherwisefalse (boolean)month—Month in which the player completed the achievement (number)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!