mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 13:40:13 -05:00
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 f845e20c05
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user