Thread Tools Display Modes
06-30-16, 10:17 AM   #1
pdxaddon
A Defias Bandit
Join Date: Oct 2007
Posts: 3
UnitPower only for blood runes

Hello,

I can successfully get several types of unit power using UnitPower call but am stumped when it comes to runes. I'm trying to get only the value for the number of available Blood runes. I can only get this to return 0 no matter what:

local p = UnitPower("player", SPELL_POWER_RUNES)

This post is helpful but does not answer my question:

http://www.wowinterface.com/forums/s...ad.php?t=48552

Thanks
  Reply With Quote
06-30-16, 10:51 AM   #2
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Try this instead:

lua Code:
  1. local runes = 0
  2. for rune = 1, 6 do
  3.   if GetRuneType(rune) == 1 then
  4.     local _, _, ready = GetRuneCooldown(rune)
  5.     if ready then
  6.       runes = runes + 1
  7.     end
  8.   end
  9. end
  10. print("Runes:", runes)

Last edited by Rainrider : 06-30-16 at 10:55 AM. Reason: Fixed rune type
  Reply With Quote
06-30-16, 01:09 PM   #3
pdxaddon
A Defias Bandit
Join Date: Oct 2007
Posts: 3
That works great thanks for the quick response.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » UnitPower only for blood runes


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