diff --git a/Categories/Cast.lua b/Categories/Cast.lua index bee1748..f16f1ad 100644 --- a/Categories/Cast.lua +++ b/Categories/Cast.lua @@ -20,7 +20,7 @@ local UnitGUID = UnitGUID local IsNormalUnit = DogTag.IsNormalUnit local wow_ver = select(4, GetBuildInfo()) -local wow_classic = wow_ver < 20000 and wow_ver > 11300 +local wow_classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC local wow_800 = wow_ver >= 80000 local playerGuid = nil diff --git a/Categories/Characteristics.lua b/Categories/Characteristics.lua index 8406b8f..b78d2a6 100644 --- a/Categories/Characteristics.lua +++ b/Categories/Characteristics.lua @@ -21,8 +21,9 @@ 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 GetQuestDifficultyColor -if not wow_320 then +if not wow_320 and not wow_classic then GetQuestDifficultyColor = _G.GetDifficultyColor else GetQuestDifficultyColor = _G.GetQuestDifficultyColor @@ -551,7 +552,7 @@ DogTag:AddTag("Unit", "HostileColor", { -- either enemy or friend, no violence r, g, b = unpack(DogTag.__colors.civilian) end - elseif (not wow_700 and UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) or (wow_700 and UnitIsTapDenied(unit)) or UnitIsDead(unit) then + elseif (not wow_700 and not wow_classic and UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) or ((wow_700 or wow_classic) and UnitIsTapDenied(unit)) or UnitIsDead(unit) then r, g, b = unpack(DogTag.__colors.tapped) else local reaction = UnitReaction(unit, "player") diff --git a/Categories/Misc.lua b/Categories/Misc.lua index 80730a3..d7741f6 100644 --- a/Categories/Misc.lua +++ b/Categories/Misc.lua @@ -26,9 +26,9 @@ DogTag:AddTag("Unit", "Combos", { end else if wow_600 then - return UnitPower(UnitHasVehicleUI("player") and "vehicle" or "player", 4) + return UnitPower((UnitHasVehicleUI and UnitHasVehicleUI("player")) and "vehicle" or "player", 4) else - return GetComboPoints(UnitHasVehicleUI("player") and "vehicle" or "player", "target") + return GetComboPoints((UnitHasVehicleUI and UnitHasVehicleUI("player")) and "vehicle" or "player", "target") end end end, diff --git a/Categories/Status.lua b/Categories/Status.lua index 9ece1df..8e7b0c1 100644 --- a/Categories/Status.lua +++ b/Categories/Status.lua @@ -26,7 +26,7 @@ local deadTimes = {} -- Parnic: support for cataclysm; Divine Intervention was removed local wow_ver = select(4, GetBuildInfo()) -local wow_classic = wow_ver < 20000 and wow_ver > 11300 +local wow_classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC local wow_400 = wow_ver >= 40000 local wow_500 = wow_ver >= 50000 local wow_600 = wow_ver >= 60000