WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Legion UnitPowerTypes and ClassBars (https://www.wowinterface.com/forums/showthread.php?t=53140)

zork 02-23-16 12:49 PM

Legion UnitPowerTypes and ClassBars
 
I wanted to create a thread to gather all the information on unit power type tokens that can be used for class bars in Legion.

The new Blizzard nameplates will have a lot of classbars:
https://github.com/tomrus88/Blizzard...ard_NamePlates

ClassPowerBar and ClassResourceOverlay from the FrameXML folder:
https://github.com/tomrus88/Blizzard...ssPowerBar.lua
https://github.com/tomrus88/Blizzard...rceOverlay.lua

Class related files:
https://github.com/tomrus88/Blizzard...inPowerBar.lua
https://github.com/tomrus88/Blizzard...layPaladin.lua
https://github.com/tomrus88/Blizzard...erlayRogue.lua (Combo points, maybe for druid aswell)
https://github.com/tomrus88/Blizzard...ChargesBar.lua
https://github.com/tomrus88/Blizzard...HarmonyBar.lua
https://github.com/tomrus88/Blizzard...StaggerBar.lua
https://github.com/tomrus88/Blizzard.../PriestBar.lua
https://github.com/tomrus88/Blizzard...nsanityBar.lua
https://github.com/tomrus88/Blizzard...L/ShardBar.lua
https://github.com/tomrus88/Blizzard...emonHunter.lua
https://github.com/tomrus88/Blizzard...seBarFrame.lua
https://github.com/tomrus88/Blizzard...TotemFrame.lua

Alternate power bars:
https://github.com/tomrus88/Blizzard...tePowerBar.lua
https://github.com/tomrus88/Blizzard...owerBarAlt.lua

Some time ago I wrote rClassBars to unify the process of creating class bars.
http://www.wowinterface.com/download...ClassBars.html

To do that 4 informations are mostly sufficient. Max value can be obtained later on and used to create frames on the fly if needed.

Example from rClassBars: https://github.com/zorker/rothui/blo...rs/chi.lua#L19
Lua Code:
  1. --cfg
  2.   cfg.POWER_TYPE_INDEX = SPELL_POWER_CHI
  3.   cfg.POWER_TYPE_TOKEN = "CHI"
  4.   cfg.REQ_SPEC         = nil
  5.   cfg.REQ_SPELL        = nil

On top of that you want the class, because specs are class specific.

Example for the new nameplate classbar for monks: https://github.com/tomrus88/Blizzard...BarMonk.lua#L4

So lets start.

WINDWALKER MONK
Code:

CLASS            = "MONK"
POWER_TYPE_INDEX = SPELL_POWER_CHI
POWER_TYPE_TOKEN = "CHI"
REQ_SPEC        = SPEC_MONK_WINDWALKER
REQ_SPELL        = nil

ARCANE MAGE
Code:

CLASS            = "MAGE"
POWER_TYPE_INDEX = SPELL_POWER_ARCANE_CHARGES
POWER_TYPE_TOKEN = "ARCANE_CHARGES"
REQ_SPEC        = SPEC_MAGE_ARCANE
REQ_SPELL        = nil

RETRIBUTION PALADIN
Code:

CLASS            = "PALADIN"
POWER_TYPE_INDEX = SPELL_POWER_HOLY_POWER
POWER_TYPE_TOKEN = "HOLY_POWER"
REQ_SPEC        = SPEC_PALADIN_RETRIBUTION
REQ_SPELL        = nil

ALL WARLOCK ... seems like soul shards are now the resource for all specs?!
Code:

CLASS            = "WARLOCK"
POWER_TYPE_INDEX = SPELL_POWER_SOUL_SHARDS
POWER_TYPE_TOKEN = "SOUL_SHARDS"
REQ_SPEC        = nil
REQ_SPELL        = nil

ROGUE ... adjustable for feral druid!
Code:

CLASS            = "ROGUE"
POWER_TYPE_INDEX = SPELL_POWER_COMBO_POINTS
POWER_TYPE_TOKEN = "COMBO_POINTS"
REQ_SPEC        = nil
REQ_SPELL        = nil

SHADOW PRIEST ... Currently I have no clue about shadow priests. There are two files. One for Insanity and one for shadow orbs. I will post the one for Insanity.
Code:

CLASS            = "PRIEST"
POWER_TYPE_INDEX = SPELL_POWER_INSANITY
POWER_TYPE_TOKEN = "INSANITY"
REQ_SPEC        = SPEC_PRIEST_SHADOW
REQ_SPELL        = nil

Havoc DEMONHUNTER
Code:

CLASS            = "DEMONHUNTER"
POWER_TYPE_INDEX = SPELL_POWER_FURY
POWER_TYPE_TOKEN = "FURY"
REQ_SPEC        = ???
REQ_SPELL        = nil

Vengeance DEMONHUNTER
Code:

CLASS            = "DEMONHUNTER"
POWER_TYPE_INDEX = SPELL_POWER_PAIN
POWER_TYPE_TOKEN = "PAIN"
REQ_SPEC        = ???
REQ_SPELL        = nil

BALANCE DRUID
Code:

CLASS            = "DRUID"
POWER_TYPE_INDEX = SPELL_POWER_LUNAR_POWER
POWER_TYPE_TOKEN = LUNAR_POWER
REQ_SPEC        = ???
REQ_SPELL        = nil

ENHANCEMENT SHAMAN
Code:

CLASS            = "SHAMAN"
POWER_TYPE_INDEX = SPELL_POWER_MAELSTROM
POWER_TYPE_TOKEN = MAELSTROM
REQ_SPEC        = ???
REQ_SPELL        = nil


Gethe 02-24-16 03:31 AM

You're missing a few power type removals and additions, see Constants.lua and UnitFrame.lua.

Balance Druid
SPELL_POWER_ECLIPSE -> SPELL_POWER_LUNAR_POWER

Enhancement Shaman
SPELL_POWER_MAELSTROM

Demon Hunter
SPELL_POWER_FURY is Havoc DH
SPELL_POWER_PAIN is Vengeance DH

zork 02-24-16 04:37 AM

Thanks.

Hmm imo there are two issues here:
https://github.com/Gethe/wow-ui-sour...tFrame.lua#L24

Chi has the wrong PowerColor Index. Should be 12.
Arcane_Charges has no PowerColor Index. Should be 16.

Here is the updated index table
Code:

INDEX_VARIABLE              INDEX  TOKEN
======================================================
SPELL_POWER_MANA            0      "MANA"
SPELL_POWER_RAGE            1      "RAGE"
SPELL_POWER_FOCUS          2      "FOCUS"
SPELL_POWER_ENERGY          3      "ENERGY"
SPELL_POWER_COMBO_POINTS    4      "COMBO_POINTS"
SPELL_POWER_RUNES          5      "RUNES"
SPELL_POWER_RUNIC_POWER    6      "RUNIC_POWER"
SPELL_POWER_SOUL_SHARDS    7      "SOUL_SHARDS"
SPELL_POWER_LUNAR_POWER    8      "LUNAR_POWER"
SPELL_POWER_HOLY_POWER      9      "HOLY_POWER"
SPELL_POWER_ALTERNATE_POWER 10      ???
SPELL_POWER_MAELSTROM      11      "MAELSTROM"
SPELL_POWER_CHI            12      "CHI"
SPELL_POWER_INSANITY        13      "INSANITY"
SPELL_POWER_OBSOLETE        14      ???
SPELL_POWER_OBSOLETE2      15      ???
SPELL_POWER_ARCANE_CHARGES  16      "ARCANE_CHARGES"
SPELL_POWER_FURY            17      "FURY"
SPELL_POWER_PAIN            18      "PAIN"

Anyone got the token for alternate power?

p3lim 02-24-16 10:31 AM

Quote:

Originally Posted by zork (Post 313174)
seems like soul shards are now the resource for all specs?!

Yes.

Quote:

Originally Posted by zork (Post 313174)
Currently I have no clue about shadow priests. There are two files. One for Insanity and one for shadow orbs. I will post the one for Insanity.

Insanity replaces mana for shadow priests, it works like rage (ish).
Shadow Orbs were removed entirely.

Quote:

Originally Posted by zork (Post 313194)
Anyone got the token for alternate power?

Altpower doesn't have a token, there are no assigned colors for it, it solely depends on textures.


Nice compilation of information, some of it incorrect and/or missing however, I did a writeup of this in November: https://github.com/haste/oUF/issues/260

ebonyfaye 05-17-16 09:24 PM

Deathkights

SPELL_POWER_RUNES 5 "RUNES"

using UnitPower ( "player", 5 )

always returns 6 even after spending them.

so i take it has its own API to pull spent runes.

Fizzlemizz 05-17-16 11:40 PM

CURRENT_MAX_RUNES = 0
MAX_RUNE_CAPACITY = 7


And to set the cooldown for a particular run it uses :

Code:

function RuneFrame_RunePowerUpdate(runeIndex, isEnergize)
....
      local start, duration, runeReady = GetRuneCooldown(runeIndex)
...
end


to get the current max. runes and hide the ones that exceed it:
Code:

CURRENT_MAX_RUNES = UnitPowerMax("player", SPELL_POWER_RUNES)

galvin 05-17-16 11:43 PM

Never understood why they use 7, since its always been 6.
Also GetRuneCooldown() will crash the client if you're not on a death knight. Unless its been fixed.

Fizzlemizz 05-17-16 11:45 PM

There are a couple of bars that have more then they use, I think ComboPoints is set to 9 where they only show 8 max.

ebonyfaye 05-18-16 09:53 AM

Quote:

Originally Posted by Fizzlemizz (Post 314913)
CURRENT_MAX_RUNES = 0
MAX_RUNE_CAPACITY = 7


And to set the cooldown for a particular run it uses :

Code:

function RuneFrame_RunePowerUpdate(runeIndex, isEnergize)
....
      local start, duration, runeReady = GetRuneCooldown(runeIndex)
...
end


to get the current max. runes and hide the ones that exceed it:
Code:

CURRENT_MAX_RUNES = UnitPowerMax("player", SPELL_POWER_RUNES)


am using
Code:

                --Deathkight Dity Hacky Hacky.
                if Class == "DEATHKNIGHT" then
                        for i=1, playerMaxCombo do
                                local start, duration, runeReady = GetRuneCooldown(i)
                                        if not runeReady then
                                                playerCombo = playerCombo - 1
                                        end       
                        end
                end

prob not the best way but its working.


All times are GMT -6. The time now is 01:15 PM.

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