Thread Tools Display Modes
10-18-14, 12:23 AM   #1
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Enhanced shadow orbs

So my shaodw orbs bar is giving me a nice little error

Interface\AddOns\oUF_Bob\embeds\oUF_ShadowOrbsBar.lua:29: 'for' limit must be a number
so I take a peak in my oUF_ShadowOrbsBar.lua\

on line 29 I have
Code:
for i = 1, PRIEST_BAR_NUM_ORBS do
  if i <= numOrbs then
    pb[i]:SetAlpha(1)
  else
    pb[i]:SetAlpha(.2)
  end
end
however there is a new perk that I discovered called Enhanced Shadow Orbs, now I have no idea what this actually is but apparently because of it I can't use PRIEST_BAR_NUM_ORBS to give me the maximum number of shadow orbs now

I'm wondering if this shows as a buff or not.

EDIT:
Actually scratch this entire thing I looked at what tukz was doing in tukui

Code:
local numOrbs = UnitPower("player", SPELL_POWER_SHADOW_ORBS)
local totalOrbs = IsSpellKnown(SHADOW_ORB_MINOR_TALENT_ID) and 5 or 3

for i = 1, totalOrbs do
	if i <= numOrbs then
		pb[i]:SetAlpha(1)
	else
		pb[i]:SetAlpha(.2)
	end
end

if(pb.PostUpdate) then
	return pb:PostUpdate(numOrbs)
end
__________________
Tweets YouTube Website

Last edited by 10leej : 10-18-14 at 12:27 AM.
  Reply With Quote
10-19-14, 11:45 PM   #2
kurapica.igas
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 152
You can get the max number by using
Lua Code:
  1. UnitPowerMax("player", SPELL_POWER_SHADOW_ORBS)
, also an event "UNIT_MAXPOWER" can be used to get the new max number.
  Reply With Quote
10-20-14, 12:48 PM   #3
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Or just use the ClassIcons element in oUF, it does all this for you.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Enhanced shadow orbs

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