WoW API type: ITEM QUALITY COLORS

From AddOn Studio
Jump to navigation Jump to search

API types < ITEM QUALITY COLORS

The global array ITEM_QUALITY_COLORS is a set of item quality colors, used to color the item name any place it appears.

Structure[edit]

Each ITEM_QUALITY_COLORS[] element returns a table with the same values as API GetItemQualityColor. The keys and values of this table are:

  • r (number) - red component of the color (0 to 1, inclusive).
  • g (number) - green component of the color (0 to 1, inclusive).
  • b (number) - blue component of the color (0 to 1, inclusive).
  • hex (string) - a full WoW text color hex string, like 'c|ffcc00ff'. See UI escape sequence

Values[edit]

  • 0 - Poor
  • 1 - Common
  • 2 - Uncommon
  • 3 - Rare
  • 4 - Epic
  • 5 - Legendary
  • 6 - Artifact
  • 7 - Heirloom
  • 8 - WoW Token

Details[edit]

You can refer to them using ITEM_QUALITY_COLORS[n], where 'n' is the quality number. The "description" of the item is given using the constant ITEM_QUALITYX_DESC, where 'X' is the quality number, which will be localized. The NUM_ITEM_QUALITIES global variable holds the count of ITEM_QUALITY_COLORS.

Changes[edit]

  • Patch 3.0.2 introduced quality 7 (Heirloom), but neither ITEM_QUALITY7_DESC nor ITEM_QUALITY_COLORS[7] exist as of Patch 3.0.3.
  • In Patch 3.1.1 it seems ITEM_QUALITY7_DESC is defined as "Heirloom," however ITEM_QUALITY_COLORS[7] still does not exist, however GetItemQualityColor(7) does return the correct colors.
  • As of Patch 5.3.0, ITEM_QUALITY_COLORS and NUM_ITEM_QUALITIES both go to 7.
  • Patch 6.1.2 added quality 8 aqua cyan for WoW Token.
  • As of Patch 7.0.3, purportedly the Heirloom color for _G["ITEM_QUALITY7_DESC"] or ITEM_QUALITY_COLORS[7] has changed from Heirloom ffe6cc80 (#e6cc80; the leading ff is probably for alpha) to Heirloom ff00ccff[1][citation needed] (#00ccff). As of current released trial version Patch 6.2.4 on this 2nd day of July, 2016, the value is still ffe6cc80. The color change can be also seen at BAG_ITEM_QUALITY_COLORS, but also doesn't show up in-game as of Patch 7.0.3hotfix15.

References[edit]

  1. Items (Heirloom only). Legion Wowhead. Retrieved on 2016-06-30.

See also[edit]