Thread: Stuf + Threat
View Single Post
06-10-11, 04:05 AM   #11
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Lily.Petal View Post
Thank you Nib and Seerah, was great help!

Hm having a different problem now, with all my classes I use:

For all my power bars; which isn't a problem, it works as intended for every class... But DK's & Warriors

Is there someway that I can have it show
I've never used Stuf, so I'm unfamiliar with those particular clauses or where they're used, however a simple if-then-else usually works for segregating different functionality for different classes. In this case, though, it may be better to determine what power type the unit is using.

Code:
local _, power_token = UnitPowerType(unit)  -- Lua Texts usually pass the unit arg, so leaving unit as is should work
if power_token == "RAGE" or power_token == "RUNIC_POWER" then
  -- Warrior / Teddy Bear Druid / DK
else
  -- Everything else
end

Last edited by Nibelheim : 06-10-11 at 04:12 AM.
  Reply With Quote