(BCC and format) Tag: WoW API docs |
m (Fixing a link) Tag: WoW API docs |
||
Line 9: | Line 9: | ||
| WOW_PROJECT_MAINLINE || 1 || [[Retail]] |
| WOW_PROJECT_MAINLINE || 1 || [[Retail]] |
||
|- |
|- |
||
− | | WOW_PROJECT_CLASSIC || 2 || [[Classic |
+ | | WOW_PROJECT_CLASSIC || 2 || [[Classic|Classic Era]] |
|- |
|- |
||
| WOW_PROJECT_BURNING_CRUSADE_CLASSIC || 5 || [[Burning Crusade Classic]] |
| WOW_PROJECT_BURNING_CRUSADE_CLASSIC || 5 || [[Burning Crusade Classic]] |
Revision as of 14:28, 8 May 2021
- These constants are defined in
FrameXML/BNet.lua
.
- These constants are defined in
WOW_PROJECT_ID
identifies the current client.
Values
Constant | Value | Description |
---|---|---|
WOW_PROJECT_MAINLINE | 1 | Retail |
WOW_PROJECT_CLASSIC | 2 | Classic Era |
WOW_PROJECT_BURNING_CRUSADE_CLASSIC | 5 | Burning Crusade Classic |
Details
WOW_PROJECT_ID
will always equal one of the other constants; so addons can trigger different code through conditional statements.
Examples
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
-- classic era
elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
-- bcc
else
-- retail
end
MyAddon.IsClassic = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC)
if MyAddon.IsClassic then
-- doSomething()
end
See also
External links
- GitHub FrameXML, Gethe
- Globe "wut?" Tool, Townlong-Yak