Skip to content

Commit 45dcf57

Browse files
committed
Improving combo points detection.
1 parent 1bde386 commit 45dcf57

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

Core.lua

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ function cPointDisplay:UpdatePointDisplay(...)
441441
-- Do we hide the Display
442442
if ((Points[tid] == 0 and not db[ic].types[tid].general.showatzero)
443443
or (ic ~= PlayerClass and ic ~= "GENERAL") -- Not my class
444-
or ((PlayerClass ~= "ROGUE") and (ic == "GENERAL") and not UnitHasVehicleUI("player")) -- Impossible to have Combo Points
445-
or (db[ic].types[tid].general.hidein.vehicle and UnitHasVehicleUI("player")) -- Hide in vehicle
444+
or ((PlayerClass ~= "ROGUE" and (PlayerClass ~= "DRUID" and PlayerSpec ~= 1)) and (ic == "GENERAL") and not UnitHasVehicleUI("player")) -- Impossible to have Combo Points
445+
or (db[ic].types[tid].general.hidein.vehicle and UnitHasVehicleUI("player")) -- Hide in vehicle
446446
or ((db[ic].types[tid].general.hidein.spec - 1) == PlayerSpec)) -- Hide in spec
447447
and not db[ic].types[tid].configmode.enabled then -- Not in config mode
448448
-- Hide Display
@@ -506,7 +506,14 @@ function cPointDisplay:GetPoints(CurClass, CurType)
506506
if CurClass == "GENERAL" then
507507
-- Combo Points
508508
if CurType == "cp" then
509-
NewPoints = GetComboPoints(UnitHasVehicleUI("player") and "vehicle" or "player", "target")
509+
if (UnitHasVehicleUI("player") and UnitHasVehiclePlayerFrameUI("player")) then
510+
NewPoints = GetComboPoints("vehicle")
511+
if (NewPoints == 0) then
512+
NewPoints = GetComboPoints("vehicle", "vehicle")
513+
end
514+
else
515+
NewPoints = UnitPower("player", SPELL_POWER_COMBO_POINTS)
516+
end
510517
end
511518
-- Paladin
512519
elseif CurClass == "PALADIN" then

0 commit comments

Comments
 (0)