View Single Post
05-27-16, 06:20 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
This what I was doing in Roth UI since WoD where they introduced UnitPowerType 4 = Combo_Points.

Could not use the old method and had to use Unit_Power.
https://github.com/zorker/rothui/com...omboPoints.lua
https://github.com/zorker/rothui/com...ec7e1bf8cc5c2b

I tested the vehicle fight outside of the Malygos instance. Had no combo point issues.

Lua Code:
  1. if unit and (unit ~= "player" and unit ~= "vehicle") then return end
  2.   if powerType and powerType ~= "COMBO_POINTS" then return end
  3.   local bar = self.ComboBar
  4.   local cp = 0
  5.   if(UnitExists("vehicle") and UnitPower("vehicle",4) >= 1) then
  6.     cp = UnitPower("vehicle",4)
  7.   else
  8.     cp = UnitPower("player",4)
  9.   end
  10.   if cp < 1 and (UnitHasVehicleUI("player") or class ~= "ROGUE") then
  11.     bar:Hide()
  12.     return
  13.   else
  14.     bar:Show()
  15.   end
https://github.com/zorker/rothui/blo...oPoints.lua#L9

Maybe some later updated killed it. Have not tried it in some time.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-27-16 at 06:39 AM.