From a2b3c73085cdb12f2ed91ea85aa8fd47cc090bff Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Tue, 24 Aug 2021 19:58:43 -0700 Subject: [PATCH] Fix https://github.com/ascott18/TellMeWhen/issues/1907 - We can't use feature detection for combo points because GetComboPoints is still defined on retail for some reason. Partially reverts f845e20c05d87b4448c870817ff98c4029a53cd1 --- Categories/Misc.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Categories/Misc.lua b/Categories/Misc.lua index 44f4941..2de1a69 100644 --- a/Categories/Misc.lua +++ b/Categories/Misc.lua @@ -13,18 +13,19 @@ DogTag_Unit_funcs[#DogTag_Unit_funcs+1] = function(DogTag_Unit, DogTag) local L = DogTag_Unit.L local wow_ver = select(4, GetBuildInfo()) +local wow_600 = wow_ver >= 60000 local wow_700 = wow_ver >= 70000 DogTag:AddTag("Unit", "Combos", { code = function (unit, target) if unit and target then - if not GetComboPoints then + if wow_600 then return UnitPower(unit, 4) else return GetComboPoints(unit, target) end else - if not GetComboPoints then + if wow_600 then return UnitPower((UnitHasVehicleUI and UnitHasVehicleUI("player")) and "vehicle" or "player", 4) else return GetComboPoints((UnitHasVehicleUI and UnitHasVehicleUI("player")) and "vehicle" or "player", "target")