Skip to content

Commit

Permalink
Add unitsuffix to the unit.
Browse files Browse the repository at this point in the history
Cleaned up version of yaroot's patch.
  • Loading branch information
yaroot authored and haste committed Sep 12, 2010
1 parent e5c1a67 commit 4efe61c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ouf.lua
Expand Up @@ -396,12 +396,17 @@ local initObject = function(unit, style, styleFunc, ...)

-- Attempt to guess what the header is set to spawn.
local parent = object:GetParent()
local suffix = object:GetAttribute'unitsuffix'
if(not unit) then
if(parent:GetAttribute'showRaid') then
unit = 'raid'
elseif(parent:GetAttribute'showParty') then
unit = 'party'
end

if(unit and suffix) then
unit = unit .. suffix
end
end

-- Run it before the style function so they can override it.
Expand All @@ -425,7 +430,6 @@ local initObject = function(unit, style, styleFunc, ...)
local height = object:GetAttribute'initial-height'
local width = object:GetAttribute'initial-width'
local scale = object:GetAttribute'initial-scale'
local suffix = object:GetAttribute'unitsuffix'
local combat = InCombatLockdown()

if(height) then
Expand Down

0 comments on commit 4efe61c

Please sign in to comment.