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]')