Safer WoW Classic check

These constants are defined in 8.2 and Classic, so it shouldn't be an issue, but might as well make sure we retain as much compatibility with old versions as possible.
This commit is contained in:
Parnic
2019-08-11 20:42:18 -05:00
parent fd7cf8d938
commit 93a898dc15
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ local UnitGUID = UnitGUID
local IsNormalUnit = DogTag.IsNormalUnit
local wow_ver = select(4, GetBuildInfo())
local wow_classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local wow_classic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local wow_800 = wow_ver >= 80000
local playerGuid = nil

View File

@ -21,7 +21,7 @@ local L = DogTag_Unit.L
local wow_320 = select(4, GetBuildInfo()) >= 30200
local wow_700 = select(4, GetBuildInfo()) >= 70000
local wow_800 = select(4, GetBuildInfo()) >= 80000
local wow_classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local wow_classic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local GetQuestDifficultyColor
if not wow_320 and not wow_classic then
GetQuestDifficultyColor = _G.GetDifficultyColor

View File

@ -26,7 +26,7 @@ local deadTimes = {}
-- Parnic: support for cataclysm; Divine Intervention was removed
local wow_ver = select(4, GetBuildInfo())
local wow_classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local wow_classic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local wow_400 = wow_ver >= 40000
local wow_500 = wow_ver >= 50000
local wow_600 = wow_ver >= 60000