Thread Tools Display Modes
05-27-16, 05:58 AM   #1
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
UnitPower, combo points and vehicles

Code:
UnitPower("vehicle", SPELL_POWER_COMBO_POINTS)
This always returns 0 on fights like Malygos, even though UnitPowerMax works fine.
Issue is present on live (WoD) clients too.
 
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.
 
05-27-16, 10:19 AM   #3
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
I tested it yesterday, UnitPower returned 0 regardless of game version.
 
05-27-16, 10:55 AM   #4
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Isn't it easier to show/hide class power bar based on class/spec behaviors, triggered by:
  • PLAYER_ENTERING_WORLD
  • PLAYER_TALENT_UPDATE
  • UNIT_EXITED_VEHICLE
  • UNIT_ENTERED_VEHICLE

rather than checking the UnitPowerType?
__________________
 
06-22-16, 05:33 AM   #5
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by syncrow View Post
Isn't it easier to show/hide class power bar based on class/spec behaviors, triggered by:
  • PLAYER_ENTERING_WORLD
  • PLAYER_TALENT_UPDATE
  • UNIT_EXITED_VEHICLE
  • UNIT_ENTERED_VEHICLE

rather than checking the UnitPowerType?
Irrelevant to this issue, this is about UnitPower not respecting vehicles, has nothing to do with class/spec powers.
 
06-21-16, 12:57 PM   #6
nebula
A Deviate Faerie Dragon
 
nebula's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 16
It has been an "issue" since WoD, whenever they shifted CP to the player. vehicle was weird and you still needed to use GetComboPoints for it as they were only on the target. Not sure when zork's code would have actually worked, his commit is after the issue came up in irc and people switched back to checking UnitHasVehicleUI + GetComboPoints after the initial adoption of using UnitPower.

(bit late, Stanzilla linked me )

Last edited by nebula : 06-21-16 at 01:49 PM.
 
07-04-16, 06:29 AM   #7
Stanzilla
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 34
http://us.battle.net/wow/en/forum/to...16?page=33#649

everything about that fight seems broken atm.

I tried
GetComboPoints("player", "target") => 0
GetComboPoints("vehicle", "target") => 0
UnitPower("vehicle", SPELL_POWER_COMBO_POINTS) => 0
UnitPower("player", SPELL_POWER_COMBO_POINTS) => 0

all the time.

Last edited by Stanzilla : 07-04-16 at 06:54 AM.
 
07-04-16, 08:31 AM   #8
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Might have been broken further then in the later builds, this worked when I was working with the API:

https://github.com/haste/oUF/pull/26...cf24efa4bd4R98
 
07-04-16, 08:36 AM   #9
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Have you guys tried UnitPower(unit, ALTERNATE_POWER_INDEX)? Or that would just point to the dragon's energy bar?

Last edited by Resike : 07-04-16 at 08:38 AM.
 
07-04-16, 08:41 AM   #10
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Resike View Post
Have you guys tried UnitPower(unit, ALTERNATE_POWER_INDEX)? Or that would just point to the dragon's energy bar?
Pretty sure it does, ALTERNATE_POWER_INDEX usually equates to mana.

Last edited by p3lim : 07-04-16 at 08:55 AM.
 
07-04-16, 09:28 AM   #11
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Don't know if related at all, but for the Scrolling Combat Text on Self,
combo points are now categorized under floatingCombatTextEnergyGains instead of floatingCombatTextComboPoints

Did they rework the combo points everywhere?

http://us.battle.net/wow/en/forum/topic/20745236385#10
 
07-04-16, 01:55 PM   #12
Stanzilla
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 34
The fight is just broken imo, the dps generator does not build CP, when I use the heal
both GetComboPoints("vehicle", "vehicle") and GetComboPoints("vehicle", "target") return the correct number, the others still don't.
 
07-05-16, 06:47 AM   #13
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Stanzilla View Post
The fight is just broken imo, the dps generator does not build CP, when I use the heal
both GetComboPoints("vehicle", "vehicle") and GetComboPoints("vehicle", "target") return the correct number, the others still don't.
By the way, the 2nd argument is irrelevant for vehicles, it only applied to rogue/feral combo points that were tied to a specific target (which is not a mechanic any more).
You can run GetComboPoints('vehicle') and it'll work just fine.

Also, it's not just Malygos, it's also other (if not all) vehicles, the daily at Wyrmrest Temple is "broken" as well.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » UnitPower, combo points and vehicles

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off