Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-04-10, 06:24 AM   #21
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
right lets start from the start.

now i have a dri its called abbrev inside this i have

abbrev.toc and abbrev.lua

the toc i have abbrev.lua to call the lua.

and inside the abbrev.lua
i have

Code:
  classabbrev = {
      DRUID = "DR",
      HUNTER = "HT",
      MAGE = "MG",
      PALADIN = "PD",
      PRIEST = "PT",
      ROGUE = "RG",
      SHAMAN = "SH",
      WARLOCK = "WL",
      WARRIOR = "WR",
      DEATHKNIGHT = "DK",
  };
now i need somthing to call this into the oUF_Classic

now to do this i would like to add it next to the L80 "HT" of the mana bar

so i looked over and see that what was used was

Code:
		-- Info string
		local info = pp:CreateFontString(nil, "OVERLAY", "GameFontNormal")
		info:SetPoint("LEFT", 2, -1)
		info:SetPoint("RIGHT", -2, 0)
		info:SetJustifyH"LEFT"
		info:SetFont(GameFontNormal:GetFont(), 11)
		info:SetTextColor(1, 1, 1)

		self:Tag(info, 'L[level][shortclassification] [raidcolor][smartclass]')
		self.Info = info
so i see it uses smartclass that in game shows Hunter so there has to be a way i could add classabbev into that self:Tag

ie
Code:
self:Tag(info, 'L[level][shortclassification] [raidcolor][classabbrev]')
but that dont work due to it seems to be looking into the OUF code for classabbrev so i have to tell it otherwise.

so maybe the use of

Code:
oUF.Tags['shortclass'] = function(unit)
     local _, class = UnitClass(unit)
     return classabbrev[class]
end
oUF.TagEvents['shortclass'] = 'UNIT_NAME_CHANGED'
and then call

Code:
self:Tag(info, 'L[level][shortclassification] [raidcolor][shortclass]')
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Race & class


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