View Single Post
07-10-10, 11:18 PM   #4
Sojik
A Wyrmkin Dreamwalker
 
Sojik's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 53
Try replacing
Code:
    if(unit == 'focus' or unit:find('target')) then
        local name = health:CreateFontString(nil, 'OVERLAY')
        name:SetPoint('LEFT', health, 2, 0)
        name:SetPoint('RIGHT', healthValue, 'LEFT')
        name:SetFont(FONT, 8, 'OUTLINE')
        name:SetJustifyH('LEFT')
        self:Tag(name, '[p3lim:name< ][|cff0090ff>rare<|r]')

        local debuffs = CreateFrame('Frame', nil, self)
        debuffs.spacing = 4
        debuffs.initialAnchor = 'TOPLEFT'
        debuffs.PostCreateIcon = PostCreateAura
        self.Debuffs = debuffs

        if(unit == 'target') then
            debuffs.num = 20
            debuffs.size = 19.4
            debuffs['growth-y'] = 'DOWN'
            debuffs.PostUpdateIcon = PostUpdateDebuff
            debuffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -4)
        else
            debuffs.num = 3
            debuffs.size = 19

            health:SetAllPoints()
            self:SetAttribute('initial-height', 19)
            self:SetAttribute('initial-width', 161)
        end

        if(unit == 'focus') then
            debuffs:SetPoint('TOPLEFT', self, 'TOPRIGHT')
            debuffs.onlyShowPlayer = true
        elseif(unit ~= 'target') then
            debuffs:SetPoint('TOPRIGHT', self, 'TOPLEFT', -4, 0)
            debuffs.initialAnchor = 'TOPRIGHT'
            debuffs['growth-x'] = 'LEFT'
        end

        debuffs:SetSize(230, debuffs.size)
    end
with
Code:
    if(unit ~= 'pet') then
        local debuffs = CreateFrame('Frame', nil, self)
        debuffs.spacing = 4
        debuffs.initialAnchor = 'TOPLEFT'
        debuffs.PostCreateIcon = PostCreateAura
        self.Debuffs = debuffs

        if(unit == 'player' or unit == 'target') then
            debuffs.num = 20
            debuffs.size = 19.4
            debuffs['growth-y'] = 'DOWN'
            debuffs.PostUpdateIcon = PostUpdateDebuff

            if(unit == 'player') then
                debuffs:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -4)
                debuffs.initialAnchor = 'TOPRIGHT'
                debuffs['growth-x'] = 'LEFT'
            else
                debuffs:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -4)
            end
        else
            debuffs.num = 3
            debuffs.size = 19

            health:SetAllPoints()
            self:SetAttribute('initial-height', 19)
            self:SetAttribute('initial-width', 161)

            if(unit == 'focus') then
                debuffs:SetPoint('TOPLEFT', self, 'TOPRIGHT')
                debuffs.onlyShowPlayer = true
            else
                debuffs:SetPoint('TOPRIGHT', self, 'TOPLEFT', -4, 0)
                debuffs.initialAnchor = 'TOPRIGHT'
                debuffs['growth-x'] = 'LEFT'
            end
        end

        if(unit ~= 'player') then
            local name = health:CreateFontString(nil, 'OVERLAY')
            name:SetPoint('LEFT', health, 2, 0)
            name:SetPoint('RIGHT', healthValue, 'LEFT')
            name:SetFont(FONT, 8, 'OUTLINE')
            name:SetJustifyH('LEFT')
            self:Tag(name, '[p3lim:name< ][|cff0090ff>rare<|r]')
        end

        debuffs:SetSize(230, debuffs.size)
    end

Last edited by Sojik : 07-10-10 at 11:38 PM.
  Reply With Quote