Thread: Race & class
View Single Post
06-20-10, 10:44 AM   #26
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Well this is where i am.

no errors. but the short class is not showing.

where have i gone worng.

Code:
  local classabbrev = {
      DRUID = "DR",
      HUNTER = "HT",
      MAGE = "MG",
      PALADIN = "PD",
      PRIEST = "PT",
      ROGUE = "RG",
      SHAMAN = "SH",
      WARLOCK = "WL",
      WARRIOR = "WR",
      DEATHKNIGHT = "DK",
   };
==

Code:
 local function updatePower(self, event, unit, bar, min, max)
    Class:SetText((classabbrev[UnitClass(unit)]) or (UnitCreatureType(unit)))
==

Code:
local function createTextStrings(self,unit)
    Class = SetFontString(self.Power, myfont, 13, "THINOUTLINE")
    Class:SetPoint("LEFT", self.Power, "LEFT", 2, 0)
    Class:SetJustifyH("LEFT")
==

self:Tag(Class, "[classtext]")


Code:
oUF.Tags["[classtext]"] = function(unit) 
    local string, tmpstring, sp = "", "", " "
    if UnitLevel(unit) ~= -1 then
      string = UnitLevel(unit)
    else
      string = "??"
    end

thanks for your time

Last edited by weasoug : 06-20-10 at 10:49 AM.
  Reply With Quote