WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   UnitPower, combo points and vehicles (https://www.wowinterface.com/forums/showthread.php?t=53496)

p3lim 05-27-16 05:58 AM

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.

zork 05-27-16 06:20 AM

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.

p3lim 05-27-16 10:19 AM

I tested it yesterday, UnitPower returned 0 regardless of game version.

syncrow 05-27-16 10:55 AM

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?

nebula 06-21-16 12:57 PM

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 :p )

p3lim 06-22-16 05:33 AM

Quote:

Originally Posted by syncrow (Post 315272)
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.

Stanzilla 07-04-16 06:29 AM

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.

p3lim 07-04-16 08:31 AM

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

Resike 07-04-16 08:36 AM

Have you guys tried UnitPower(unit, ALTERNATE_POWER_INDEX)? Or that would just point to the dragon's energy bar?

p3lim 07-04-16 08:41 AM

Quote:

Originally Posted by Resike (Post 316157)
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.

Ketho 07-04-16 09:28 AM

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

Stanzilla 07-04-16 01:55 PM

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.

p3lim 07-05-16 06:47 AM

Quote:

Originally Posted by Stanzilla (Post 316165)
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.


All times are GMT -6. The time now is 01:39 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI