Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-13-18, 03:20 PM   #1
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
oUF Style already registered..

I can't figure out for the life of me how to fix that error.

oUF: Error: Style [LiteUI_Boss] already registered.

Code:
local addon, ns = ...
local E, C, M, UF, oUF = ns.E, ns.C, ns.M, ns.UF, ns.oUF


if not C.SETTINGS.units.boss.enabled then return end


local CreateBoss = function(self)

   local unit = "boss"

   self:SetSize(112, 47)
   self:SetFrameLevel(3)

   UF.CreateHealth(self, unit, 107, 32, "CENTER", "CENTER", -2, 8)
   UF.CreatePower(self, unit, 87, 5, "CENTER", "CENTER", 2, -20)

   UF.CreateNameText(self, "LEFT", "LEFT", 4, 15, 11, "OUTLINE", "LEFT")
   UF.CreateHealthTextPercent(self, "RIGHT", "RIGHT", 0, -6, 11, "OUTLINE", "RIGHT")

   UF.CreateArtwork(self, unit)

   UF.CreateRaidIcon(self, "BOTTOM", "TOP", 0, 14)

   UF.SetTooltip(self, unit)

end



oUF:RegisterStyle(addon.."_Boss", CreateBoss)
oUF:SetActiveStyle(addon.."_Boss")

local boss = {}

for i = 1, MAX_BOSS_FRAMES do

   boss[i] = oUF:Spawn("boss"..i, addon.."_Boss"..i)

   if (i == 1) then

      boss[i]:SetPoint(unpack(C.SETTINGS.units.boss.pos))

   else

      boss[i]:SetPoint("TOP", boss[i-1], "BOTTOM", 0, -10)

   end

end
__________________
AddOns: Tim @ WoWInterface
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF Style already registered..


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