Quantcast Legion UnitPowerTypes and ClassBars - WoWInterface
 
Thread Tools Display Modes
02-23-16, 12:49 PM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,731
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
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

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

Last edited by zork : 02-24-16 at 04:41 AM.
 
02-24-16, 03:31 AM   #2
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 920
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
__________________
Knowledge = Power; Be OP

 
02-24-16, 04:37 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,731
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?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

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

Last edited by zork : 02-24-16 at 04:50 AM.
 
02-24-16, 10:31 AM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,691
Originally Posted by zork View Post
seems like soul shards are now the resource for all specs?!
Yes.

Originally Posted by zork View Post
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.

Originally Posted by zork View Post
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

Last edited by p3lim : 02-24-16 at 10:50 AM.
 
05-17-16, 09:24 PM   #5
ebonyfaye
A Fallenroot Satyr
 
ebonyfaye's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 23
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.
 
05-17-16, 11:40 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,117
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)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 05-18-16 at 01:51 AM.
 
05-17-16, 11:43 PM   #7
galvin
A Frostmaul Preserver
Join Date: Nov 2006
Posts: 263
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.
 
05-17-16, 11:45 PM   #8
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,117
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
 
05-18-16, 09:53 AM   #9
ebonyfaye
A Fallenroot Satyr
 
ebonyfaye's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 23
Originally Posted by Fizzlemizz View Post
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.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Legion UnitPowerTypes and ClassBars

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