@@ -1026,20 +1026,37 @@ end,
10261026 self :Tag (htext , ' [player:hp]' )
10271027 self .Power .value :SetPoint (" TOPRIGHT" , htext , " BOTTOMRIGHT" , 0 , - 2 )
10281028
1029- local Auras = CreateFrame (" Frame" , nil , self )
1030- Auras :SetHeight (cfg .heightPA )
1031- Auras :SetPoint (" TOPRIGHT" , self , " TOPLEFT" , 300 , 30 )
1032- Auras .initialAnchor = " TOPLEFT"
1033- Auras .size = cfg .BuffSize
1034- Auras :SetWidth (Auras .size * 13 )
1035- Auras .gap = false
1036- Auras .numBuffs = 8
1037- Auras .numDebuffs = 4
1038- Auras .spacing = 2
1039- Auras [" growth-x" ] = " RIGHT"
1040-
1041- Auras .PostCreateIcon = PostCreateIcon
1042- self .Auras = Auras
1029+ if cfg .showArenaBuffs then
1030+ createBuffs (self )
1031+ self .Buffs :SetPoint (" BOTTOMLEFT" , self .Health , " TOPLEFT" , 0 , 4 )
1032+ self .Buffs .initialAnchor = " BOTTOMLEFT"
1033+ self .Buffs [" growth-x" ] = " RIGHT"
1034+ self .Buffs [" growth-y" ] = " UP"
1035+ self .Buffs .num = 7
1036+ self .Buffs .size = cfg .BuffSize
1037+ self .Buffs .spacing = 5
1038+ self .Buffs :SetSize (cfg .widthPA , self .Buffs .size )
1039+
1040+ if cfg .onlyShowPlayerBuffsFocus then
1041+ self .Buffs .onlyShowPlayer = true
1042+ end
1043+ end
1044+
1045+ if cfg .showArenaDebuffs then
1046+ createDebuffs (self )
1047+ self .Debuffs :SetPoint (" LEFT" , self .Health , " LEFT" , (cfg .DebuffSize *- 1 )- 4 , - 3 )
1048+ self .Debuffs .initialAnchor = " LEFT"
1049+ self .Debuffs [" growth-x" ] = " LEFT"
1050+ self .Debuffs [" growth-y" ] = " UP"
1051+ self .Debuffs .num = 6
1052+ self .Debuffs .size = cfg .DebuffSize
1053+ self .Debuffs .spacing = 4
1054+ self .Debuffs :SetSize (self .Debuffs .size * self .Debuffs .num + (self .Debuffs .spacing * self .Debuffs .num ), self .Debuffs .size )
1055+
1056+ if cfg .onlyShowPlayerDebuffsFocus then
1057+ self .Debuffs .onlyShowPlayer = true
1058+ end
1059+ end
10431060
10441061 -- plugins
10451062 SpellRange (self )
@@ -1235,27 +1252,6 @@ local spawnHelper = function(self, unit, ...)
12351252 end
12361253end
12371254
1238- if cfg .ArenaFrames then
1239- oUF :RegisterStyle (' oUF_Farva_Arena' , UnitSpecific .arenaframes )
1240- oUF :SetActiveStyle (' oUF_Farva_Arena' )
1241- local arena = {}
1242- local arenatarget = {}
1243- for i = 1 , 5 do
1244- arena [i ] = oUF :Spawn (" arena" .. i , " oUF_Arena" .. i )
1245- if i == 1 then
1246- arena [i ]:SetPoint (' LEFT' , UIParent , ' LEFT' , 250 , - 200 )
1247- else
1248- arena [i ]:SetPoint (" BOTTOMRIGHT" , arena [i - 1 ], " TOPRIGHT" , 0 , 50 )
1249- end
1250- end
1251-
1252- oUF :RegisterStyle (" oUF_Farva_ArenaTarget" , UnitSpecific .arenatargets )
1253- oUF :SetActiveStyle (" oUF_Farva_ArenaTarget" )
1254- for i = 1 , 5 do
1255- arenatarget [i ] = oUF :Spawn (" arena" .. i .. " target" , " oUF_Arena" .. i .. " target" ):SetPoint (" TOPLEFT" ,arena [i ], " TOPRIGHT" , 8 , 0 )
1256- end
1257- end
1258-
12591255oUF :Factory (function (self )
12601256 local player = spawnHelper (self , ' player' , " BOTTOM" , - 338 , 233 )
12611257 spawnHelper (self , ' pet' , " RIGHT" , player , " LEFT" , - 10 , 0 )
@@ -1264,9 +1260,33 @@ oUF:Factory(function(self)
12641260 local focus = spawnHelper (self , ' focus' , " CENTER" , 360 , - 164 )
12651261 spawnHelper (self , ' focustarget' , " CENTER" , 436 , - 209 )
12661262
1263+ local arena = {}
1264+ local arenatarget = {}
1265+
12671266 local spec = GetSpecialization ()
12681267 local class = UnitClass (" Player" )
12691268
1269+ if cfg .ArenaFrames then
1270+ self :RegisterStyle (' oUF_Farva_Arena' , UnitSpecific .arenaframes )
1271+ self :SetActiveStyle (' oUF_Farva_Arena' )
1272+
1273+ for i = 1 , 5 do
1274+ arena [i ] = self :Spawn (" arena" .. i , " oUF_Arena" .. i )
1275+ arena [i ]:SetAttribute (' oUF-enableArenaPrep' , false )
1276+
1277+ if i == 1 then
1278+ arena [i ]:SetPoint (' LEFT' , UIParent , ' LEFT' , 250 , - 200 )
1279+ else
1280+ arena [i ]:SetPoint (" BOTTOMRIGHT" , arena [i - 1 ], " TOPRIGHT" , 0 , 50 )
1281+ end
1282+ end
1283+ self :RegisterStyle (" oUF_Farva_ArenaTarget" , UnitSpecific .arenatargets )
1284+ self :SetActiveStyle (" oUF_Farva_ArenaTarget" )
1285+ for i = 1 , 5 do
1286+ arenatarget [i ] = self :Spawn (" arena" .. i .. " target" , " oUF_Arena" .. i .. " target" ):SetPoint (" TOPLEFT" ,arena [i ], " TOPRIGHT" , 8 , 0 )
1287+ end
1288+ end
1289+
12701290 if cfg .PartyFrames then
12711291 local EventFrame = CreateFrame (" Frame" )
12721292 EventFrame :RegisterEvent (" PLAYER_TALENT_UPDATE" )
@@ -1352,6 +1372,7 @@ oUF:Factory(function(self)
13521372 arenaprepupdate :RegisterEvent (' ARENA_OPPONENT_UPDATE' )
13531373 arenaprepupdate :RegisterEvent (' ARENA_PREP_OPPONENT_SPECIALIZATIONS' )
13541374 arenaprepupdate :SetScript (' OnEvent' , function (self , event )
1375+
13551376 if event == ' PLAYER_LOGIN' then
13561377 for i = 1 , 5 do
13571378 arenaprep [i ]:SetAllPoints (_G [' oUF_Arena' .. i ])
@@ -1365,22 +1386,14 @@ oUF:Factory(function(self)
13651386 if numOpps > 0 then
13661387 for i = 1 , 5 do
13671388 local f = arenaprep [i ]
1368-
13691389 if i <= numOpps then
13701390 local s = GetArenaOpponentSpec (i )
13711391 local _ , spec , class = nil , ' UNKNOWN' , ' UNKNOWN'
1372-
13731392 if s and s > 0 then
13741393 _ , spec , _ , _ , _ , class = GetSpecializationInfoByID (s )
13751394 end
1376-
13771395 if class and spec then
1378- local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS )[class ]
1379- if cfg .class_colorbars and color then
1380- f .Health :SetStatusBarColor (color .r , color .g , color .b )
1381- else
13821396 f .Health :SetStatusBarColor (40 / 255 , 40 / 255 , 40 / 255 )
1383- end
13841397 f .Spec :SetText (spec .. ' - ' .. LOCALIZED_CLASS_NAMES_MALE [class ])
13851398 f :Show ()
13861399 end
0 commit comments