From af87258649fcf82034f396ab46034e36be42dd7d Mon Sep 17 00:00:00 2001 From: Steven Jackson Date: Fri, 11 Jul 2014 14:44:19 -0500 Subject: [PATCH] Monster changes to unitframe code --- Interface/AddOns/SVUI/Bindings.xml | 13 +- .../assets/artwork/Template/Tooltip/MINITIP-BG.blp | Bin 0 -> 6676 bytes .../artwork/Template/Tooltip/MINITIP-LEFT.blp | Bin 0 -> 2580 bytes .../artwork/Template/Tooltip/MINITIP-RIGHT.blp | Bin 0 -> 2580 bytes .../assets/artwork/Template/Tooltip/TOOLTIP.blp | Bin 0 -> 23060 bytes .../assets/artwork/Unitframe/Border/STATUS-BG.blp | Bin 6676 -> 0 bytes .../artwork/Unitframe/Border/STATUS-LEFT.blp | Bin 2580 -> 0 bytes .../artwork/Unitframe/Border/STATUS-RIGHT.blp | Bin 2580 -> 0 bytes Interface/AddOns/SVUI/packages/actionbar/SVBar.lua | 5 +- Interface/AddOns/SVUI/packages/aura/SVAura.lua | 279 ++++---- Interface/AddOns/SVUI/packages/chat/SVChat.lua | 7 +- Interface/AddOns/SVUI/packages/map/SVMap.lua | 2 +- .../SVUI/packages/override/common/mirror.lua | 57 +- Interface/AddOns/SVUI/packages/plates/SVPlate.lua | 5 +- .../AddOns/SVUI/packages/plates/common/auras.lua | 3 +- Interface/AddOns/SVUI/packages/stats/SVStats.lua | 5 +- .../SVUI/packages/stats/common/durability.lua | 5 +- .../SVUI/packages/stats/common/experience.lua | 5 +- .../SVUI/packages/stats/common/reputation.lua | 5 +- Interface/AddOns/SVUI/packages/tip/SVTip.lua | 249 +++++--- Interface/AddOns/SVUI/packages/unit/SVUnit.lua | 671 +++++++++----------- .../SVUI/packages/unit/class/deathknight.lua | 3 +- .../AddOns/SVUI/packages/unit/class/druid.lua | 9 +- Interface/AddOns/SVUI/packages/unit/class/mage.lua | 3 +- Interface/AddOns/SVUI/packages/unit/class/monk.lua | 3 +- .../AddOns/SVUI/packages/unit/class/paladin.lua | 3 +- .../AddOns/SVUI/packages/unit/class/priest.lua | 3 +- .../AddOns/SVUI/packages/unit/class/rogue.lua | 6 +- .../AddOns/SVUI/packages/unit/class/shaman.lua | 3 +- .../AddOns/SVUI/packages/unit/class/warlock.lua | 3 +- .../SVUI/packages/unit/common/actionpanel.lua | 14 +- .../AddOns/SVUI/packages/unit/common/aurabars.lua | 140 ++-- .../AddOns/SVUI/packages/unit/common/auras.lua | 56 +- .../AddOns/SVUI/packages/unit/common/castbar.lua | 1 - .../AddOns/SVUI/packages/unit/common/health.lua | 52 +- .../AddOns/SVUI/packages/unit/common/misc.lua | 46 +- .../AddOns/SVUI/packages/unit/common/portrait.lua | 126 ++-- .../AddOns/SVUI/packages/unit/common/power.lua | 15 +- .../AddOns/SVUI/packages/unit/common/secure.lua | 15 +- .../AddOns/SVUI/packages/unit/common/unique.lua | 1 - .../AddOns/SVUI/packages/unit/frames/_load.xml | 22 +- .../AddOns/SVUI/packages/unit/frames/all_units.lua | 26 +- .../AddOns/SVUI/packages/unit/frames/arenaboss.lua | 269 ++++++++ .../SVUI/packages/unit/frames/basic/focus.lua | 78 --- .../AddOns/SVUI/packages/unit/frames/basic/ft.lua | 55 -- .../AddOns/SVUI/packages/unit/frames/basic/pet.lua | 67 -- .../SVUI/packages/unit/frames/basic/player.lua | 214 ------- .../AddOns/SVUI/packages/unit/frames/basic/pt.lua | 55 -- .../SVUI/packages/unit/frames/basic/target.lua | 132 ---- .../AddOns/SVUI/packages/unit/frames/basic/tot.lua | 57 -- .../SVUI/packages/unit/frames/extra/arena.lua | 177 ------ .../SVUI/packages/unit/frames/extra/boss.lua | 89 --- .../AddOns/SVUI/packages/unit/frames/focus.lua | 102 +++ .../SVUI/packages/unit/frames/group/assist.lua | 106 ---- .../SVUI/packages/unit/frames/group/party.lua | 197 ------ .../SVUI/packages/unit/frames/group/raid.lua | 163 ----- .../SVUI/packages/unit/frames/group/rpet.lua | 166 ----- .../SVUI/packages/unit/frames/group/tank.lua | 106 ---- .../AddOns/SVUI/packages/unit/frames/party.lua | 208 ++++++ Interface/AddOns/SVUI/packages/unit/frames/pet.lua | 95 +++ .../AddOns/SVUI/packages/unit/frames/player.lua | 212 +++++++ .../AddOns/SVUI/packages/unit/frames/raid.lua | 282 ++++++++ .../SVUI/packages/unit/frames/tankassist.lua | 204 ++++++ .../AddOns/SVUI/packages/unit/frames/target.lua | 155 +++++ Interface/AddOns/SVUI/scripts/mounts.lua | 8 +- Interface/AddOns/SVUI/scripts/pvp.lua | 59 ++ Interface/AddOns/SVUI/system/cartography.lua | 3 +- Interface/AddOns/SVUI/system/classes/Database.lua | 174 ++--- Interface/AddOns/SVUI/system/classes/Registry.lua | 14 +- .../AddOns/SVUI/system/classes/Visibility.lua | 4 +- Interface/AddOns/SVUI/system/mentalo.lua | 10 +- Interface/AddOns/SVUI/system/slash.lua | 16 +- Interface/AddOns/SVUI/system/system.lua | 10 +- Interface/AddOns/SVUI/system/templates.lua | 3 +- Interface/AddOns/SVUI/system/updates.lua | 35 +- Interface/AddOns/SVUI/system/utilities.lua | 3 +- .../AddOns/SVUI_ConfigOMatic/modules/filter.lua | 34 +- Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua | 98 ++- .../SVUI_ConfigOMatic/modules/units/core.lua | 190 +++--- .../SVUI_ConfigOMatic/modules/units/focus.lua | 44 +- .../SVUI_ConfigOMatic/modules/units/other.lua | 42 +- .../SVUI_ConfigOMatic/modules/units/party.lua | 14 +- .../AddOns/SVUI_ConfigOMatic/modules/units/pet.lua | 44 +- .../SVUI_ConfigOMatic/modules/units/player.lua | 38 +- .../SVUI_ConfigOMatic/modules/units/raid.lua | 16 +- .../SVUI_ConfigOMatic/modules/units/target.lua | 52 +- 86 files changed, 2932 insertions(+), 3029 deletions(-) create mode 100644 Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-BG.blp create mode 100644 Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-LEFT.blp create mode 100644 Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-RIGHT.blp create mode 100644 Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/TOOLTIP.blp delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-BG.blp delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-LEFT.blp delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-RIGHT.blp create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/arenaboss.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/basic/focus.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/basic/ft.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/basic/pet.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/basic/player.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/basic/pt.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/basic/target.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/basic/tot.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/extra/arena.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/extra/boss.lua create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/focus.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/group/assist.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/group/party.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/group/raid.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/group/rpet.lua delete mode 100644 Interface/AddOns/SVUI/packages/unit/frames/group/tank.lua create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/party.lua create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/pet.lua create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/player.lua create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/raid.lua create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/tankassist.lua create mode 100644 Interface/AddOns/SVUI/packages/unit/frames/target.lua create mode 100644 Interface/AddOns/SVUI/scripts/pvp.lua diff --git a/Interface/AddOns/SVUI/Bindings.xml b/Interface/AddOns/SVUI/Bindings.xml index a3c5818..4071d30 100644 --- a/Interface/AddOns/SVUI/Bindings.xml +++ b/Interface/AddOns/SVUI/Bindings.xml @@ -3,21 +3,24 @@ RaidMark_HotkeyPressed(keystate) - FishingMode() + SVUIFishingMode() - FarmingMode() + SVUIFarmingMode() - ArchaeologyMode() + SVUIArchaeologyMode() - CookingMode() + SVUICookingMode() HideSuperDocks() - LetsRide() + SVUILetsRide() + + + SVUISayIncoming() \ No newline at end of file diff --git a/Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-BG.blp b/Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-BG.blp new file mode 100644 index 0000000000000000000000000000000000000000..45c6751b6c4715c2b845ddc1583b0f4f006e1c1d GIT binary patch literal 6676 zcmeI0Jx^0%6vrP34Wx?>4Atqzi7+}bFc@bC2XBCZ@F{Lchla+9IJ=lQ5GHbset;%A zcD#$WPPQWn4qa?Ika9ie_VnEI{QF8Ul91cvk^cCf=e%FAynOZg`HFLHbz^;{PG18$ z@7L&T(y7pS;@l59f9R||b#8Ns;~tX}^5Mww3;Gh!;cxLNUPT9r4ip`j+ksM=y>^<; zg=|>xgY3utg85dHoo1NE=i~X0_-e!F_{`@osIU6^C*3FUkM^kFiTBd@PWP#P@BRre z>Rr$=ejoH-z%AebaJqma(1*a7|2%(>tLn^P3hQ?_>T{zn7n#-?V%&e~gb@Gxh9V zUUw+I&RaMb_g7f^FRc9+J_mcQ$|y6yw()K8CXKUg26`F=B> zfIsR_+15w#Pc4&vW*P5eJUdU0hx6z|KEz)Bw2!(Ud>{Q$yujvz@h#VSyO)%|&VL49 zjQxqO`yj0IXO7J86XrdWzu0Sj%q`PT(Y0RTx{coje?wrZ$FnE@oQ#2)5(6W z9^K^o#`#5X{}|#AZ+!olKhEO_{Plqs-5-Gcus1vYw?VB(_3J(h>wXDqe}wgU5Y~Rp zV7!m^7*C&P@rU{%f2jX!#{6#O-_DckYngd5+vkP(5OkW?+;|iAzkU0f*@w;``;-`t zpNB=bwv$X}t~Z$Iz*^Z$pW(u{ebwErB zDSw;2E7)&H(T@k#5BhT#RWy43!_m+GDSVJ{*}0C)_pOe+4|>jg&%FNoex;8%`uC5{ p#bH)o#ud)ja8{4utbW7QByi=B|Nm@i;kTvr>>JT%=ibDV`d>&$AQS)q literal 0 HcmV?d00001 diff --git a/Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-LEFT.blp b/Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-LEFT.blp new file mode 100644 index 0000000000000000000000000000000000000000..8a2a8cc5b3d12a7f33df74e3d99afa8ecd36d8e8 GIT binary patch literal 2580 zcmZ?r2{2-0U|?Y4U}sbS(jYvA1&BF-n3I9w3J^a5;x9nV!o|QKLIh?2>Sq8N>Hwq! z&@hlY3PwX#{bXoa?+FPD^Eax`NKIZsiIY+j|!sDOgN?5M6=xR-vy!NXT z^Fcn0d7j8&3JPGTeKya3-vj!W3z=W~e^m#e@MjVR2EJJm+IgoF!O8Q|Gu|!6)1cm;a&UQ<~bz15&Y7Bt2hYRk1qe8;pFTV&nY61 z@D08C=s6@k?fb64zzYgssD1ms*S<%#4+o!Q`#EnNd;jm({QovU|B9NjhQjQ-_Z=J} zB=aSJ>C3=#0zCaDGMp`!K3kHbn+(pMs!Z&_`0vYwhyOB$pR=bIPF0HiQdPXGV_ literal 0 HcmV?d00001 diff --git a/Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-RIGHT.blp b/Interface/AddOns/SVUI/assets/artwork/Template/Tooltip/MINITIP-RIGHT.blp new file mode 100644 index 0000000000000000000000000000000000000000..842e349bfde2713fd45c1fd4a1ad42cd1db7980c GIT binary patch literal 2580 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 hJbk4bT527RKRz`(8*i@dzvtuh-ceq literal 0 HcmV?d00001 diff --git a/Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-BG.blp b/Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-BG.blp deleted file mode 100644 index 45c6751b6c4715c2b845ddc1583b0f4f006e1c1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6676 zcmeI0Jx^0%6vrP34Wx?>4Atqzi7+}bFc@bC2XBCZ@F{Lchla+9IJ=lQ5GHbset;%A zcD#$WPPQWn4qa?Ika9ie_VnEI{QF8Ul91cvk^cCf=e%FAynOZg`HFLHbz^;{PG18$ z@7L&T(y7pS;@l59f9R||b#8Ns;~tX}^5Mww3;Gh!;cxLNUPT9r4ip`j+ksM=y>^<; zg=|>xgY3utg85dHoo1NE=i~X0_-e!F_{`@osIU6^C*3FUkM^kFiTBd@PWP#P@BRre z>Rr$=ejoH-z%AebaJqma(1*a7|2%(>tLn^P3hQ?_>T{zn7n#-?V%&e~gb@Gxh9V zUUw+I&RaMb_g7f^FRc9+J_mcQ$|y6yw()K8CXKUg26`F=B> zfIsR_+15w#Pc4&vW*P5eJUdU0hx6z|KEz)Bw2!(Ud>{Q$yujvz@h#VSyO)%|&VL49 zjQxqO`yj0IXO7J86XrdWzu0Sj%q`PT(Y0RTx{coje?wrZ$FnE@oQ#2)5(6W z9^K^o#`#5X{}|#AZ+!olKhEO_{Plqs-5-Gcus1vYw?VB(_3J(h>wXDqe}wgU5Y~Rp zV7!m^7*C&P@rU{%f2jX!#{6#O-_DckYngd5+vkP(5OkW?+;|iAzkU0f*@w;``;-`t zpNB=bwv$X}t~Z$Iz*^Z$pW(u{ebwErB zDSw;2E7)&H(T@k#5BhT#RWy43!_m+GDSVJ{*}0C)_pOe+4|>jg&%FNoex;8%`uC5{ p#bH)o#ud)ja8{4utbW7QByi=B|Nm@i;kTvr>>JT%=ibDV`d>&$AQS)q diff --git a/Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-LEFT.blp b/Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-LEFT.blp deleted file mode 100644 index 8a2a8cc5b3d12a7f33df74e3d99afa8ecd36d8e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2580 zcmZ?r2{2-0U|?Y4U}sbS(jYvA1&BF-n3I9w3J^a5;x9nV!o|QKLIh?2>Sq8N>Hwq! z&@hlY3PwX#{bXoa?+FPD^Eax`NKIZsiIY+j|!sDOgN?5M6=xR-vy!NXT z^Fcn0d7j8&3JPGTeKya3-vj!W3z=W~e^m#e@MjVR2EJJm+IgoF!O8Q|Gu|!6)1cm;a&UQ<~bz15&Y7Bt2hYRk1qe8;pFTV&nY61 z@D08C=s6@k?fb64zzYgssD1ms*S<%#4+o!Q`#EnNd;jm({QovU|B9NjhQjQ-_Z=J} zB=aSJ>C3=#0zCaDGMp`!K3kHbn+(pMs!Z&_`0vYwhyOB$pR=bIPF0HiQdPXGV_ diff --git a/Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-RIGHT.blp b/Interface/AddOns/SVUI/assets/artwork/Unitframe/Border/STATUS-RIGHT.blp deleted file mode 100644 index 842e349bfde2713fd45c1fd4a1ad42cd1db7980c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2580 zcmZ?r2{2-0U|?Y4U}sbS(jYvA1&BF-n3I9w3J^a5;x9nV!o|QKLIh?2>Sq8N>Hwq! z&@hlY3PwX{9AE$Uu=qZp{(^`Q239ny2=XEJ zSDv#t7W#kHBAERU{woet{;CC!o`coPN1k)!U}$hC_|K5BNX6%pdSDL&LwIOtD7p6U zx>k7(X#WbBeNcWA8b9klD+AYy3w(AK#}qjNLc&7%qY8a)PvN}*^EH$3HrX4Exwm0_ z!tR0i|M$IJ*MRn~g4qY*zgngJ3MBuT{r5dbjspn+F&tMehOFA~_7u!~=6JKL+k9^h z!uZk(+uq)2Bi(+R=fCeE+b?q;WMYHEe+Gu;qaJ%K#DVD}1Q@_K7%C4P@tvdqvyZoH zgX`_GoWn4_8-vFr8_&rqFg~&VuYGUx9B985&_0#}2bfgmzE2VWCa3Us43_g$Vv3%_ z%v-|X>7-sd2~_KW0b@wh-J9Ez;r4Tz0|S2>@%~@45t5#2-vf;U1~4!^t*Y^#WC}H& z;Sj^gi7FE(tHb!g44y(ZHzyx~@e>&;C#ib&!ToE^;5bReXA+!G$p7pQ{(t1}FFYCZ zJdqgZ=APe%NN=1*W;w@6@Gqu&AnDKIm;xyOH|%F{ zXj1dKq~hrX 0) then self.nextUpdate = self.nextUpdate - elapsed; return - end; + end local expires = self.timeLeft local calc = 0; @@ -160,9 +158,9 @@ do if(self.timeLeft > AURA_FADE_TIME) then SuperVillain.Animate:StopFlash(self) else - SuperVillain.Animate:Flash(self,1) + SuperVillain.Animate:Flash(self, 1) end - end; + end local Aura_OnAttributeChanged = function(self, attribute, auraIndex) if(attribute == "index") then @@ -177,49 +175,49 @@ do self:SetScript("OnUpdate", RefreshAuraTime) else self.timeLeft = timeLeft - end; + end self.nextUpdate = -1; RefreshAuraTime(self, 0) else self.timeLeft = nil; self.time:SetText("") self:SetScript("OnUpdate", nil) - end; + end if count > 1 then self.count:SetText(count) else self.count:SetText("") - end; + end if filter == "HARMFUL" then local color = DebuffTypeColor[dispelType or ""] self:SetBackdropBorderColor(color.r, color.g, color.b) else - self:SetBackdropBorderColor(0,0,0); - end; + self:SetBackdropBorderColor(0, 0, 0); + end self.texture:SetTexture(icon) self.offset = nil - end; + end elseif(attribute == "target-slot") then - local quality = GetInventoryItemQuality("player",auraIndex) - self.texture:SetTexture(GetInventoryItemTexture("player",auraIndex)) - local offset=2; + local quality = GetInventoryItemQuality("player", auraIndex) + self.texture:SetTexture(GetInventoryItemTexture("player", auraIndex)) + local offset = 2; local enchantIndex = self:GetName():sub(-1) if enchantIndex:match("2") then - offset=5 - end; + offset = 5 + end if quality then self:SetBackdropBorderColor(GetItemQualityColor(quality)) - end; - local enchantInfo=select(offset,GetWeaponEnchantInfo()) + end + local enchantInfo = select(offset, GetWeaponEnchantInfo()) if enchantInfo then self.offset = offset; - self:SetScript("OnUpdate",MOD. RefreshAuraTime) + self:SetScript("OnUpdate", MOD. RefreshAuraTime) self.nextUpdate = -1; - RefreshAuraTime(self,0) + RefreshAuraTime(self, 0) else self.timeLeft = nil; self.offset = nil; - self:SetScript("OnUpdate",nil) + self:SetScript("OnUpdate", nil) self.time:SetText("") end end @@ -231,45 +229,45 @@ do if aura.SetHighlightTexture then aura:SetHighlightTexture("") end if aura.SetPushedTexture then aura:SetPushedTexture("") end if aura.SetDisabledTexture then aura:SetDisabledTexture("") end - aura:SetBackdrop({ - bgFile = [[Interface\BUTTONS\WHITE8X8]], - tile = false, - tileSize = 0, - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - edgeSize = 2, - insets = { - left = 0, - right = 0, - top = 0, - bottom = 0 - } - }) - aura:SetBackdropColor(0, 0, 0, 0) - aura:SetBackdropBorderColor(0, 0, 0) - local cd = aura:GetName() and _G[aura:GetName().."Cooldown"] - if cd then - cd:ClearAllPoints() - cd:FillInner(aura,0,0) - end; + aura:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + edgeSize = 2, + insets = { + left = 0, + right = 0, + top = 0, + bottom = 0 + } + }) + aura:SetBackdropColor(0, 0, 0, 0) + aura:SetBackdropBorderColor(0, 0, 0) + local cd = aura:GetName() and _G[aura:GetName().."Cooldown"] + if cd then + cd:ClearAllPoints() + cd:FillInner(aura, 0, 0) + end aura.Skinned = true end - local font = LSM:Fetch("font",MOD.db.font) - aura.texture = aura:CreateTexture(nil,"BORDER") + local font = SuperVillain.Shared:Fetch("font", MOD.db.font) + aura.texture = aura:CreateTexture(nil, "BORDER") aura.texture:FillInner(aura, 2, 2) - aura.texture:SetTexCoord(0.1,0.9,0.1,0.9) - aura.count = aura:CreateFontString(nil,"ARTWORK") - aura.count:SetPoint("BOTTOMRIGHT",(-1 + MOD.db.countOffsetH),(1 + MOD.db.countOffsetV)) + aura.texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + aura.count = aura:CreateFontString(nil, "ARTWORK") + aura.count:SetPoint("BOTTOMRIGHT", (-1 + MOD.db.countOffsetH), (1 + MOD.db.countOffsetV)) aura.count:SetFontTemplate(font, MOD.db.fontSize, MOD.db.fontOutline) - aura.time = aura:CreateFontString(nil,"ARTWORK") + aura.time = aura:CreateFontString(nil, "ARTWORK") aura.time:SetPoint("TOP", aura, "BOTTOM", 1 + MOD.db.timeOffsetH, 0 + MOD.db.timeOffsetV) aura.time:SetFontTemplate(font, MOD.db.fontSize, MOD.db.fontOutline) aura.highlight = aura:CreateTexture(nil, "HIGHLIGHT") - aura.highlight:SetTexture(0,0,0,0.45) + aura.highlight:SetTexture(0, 0, 0, 0.45) aura.highlight:FillInner() SuperVillain.Animate:Flash(aura) aura:SetScript("OnAttributeChanged", Aura_OnAttributeChanged) - end; -end; + end +end do local ConsolidatedBuff_OnUpdate = function(self, current) @@ -280,11 +278,11 @@ do if self.nextUpdate > 0 then self.nextUpdate = self.nextUpdate - current; return - end; + end if self.expiration <= 0 then - self:SetScript("OnUpdate",nil) + self:SetScript("OnUpdate", nil) return - end; + end if expires < 60 then if expires >= AURA_FADE_TIME then @@ -302,37 +300,37 @@ do calc = floor((expires / 86400) + .5); self.nextUpdate = calc > 1 and ((expires - calc) * 43199.5) or (expires - 86400); end - end; + end local UpdateConsolidatedReminder = function(self, event, arg) - if(event == "UNIT_AURA" and arg ~= "player") then return end; - for i=1,NUM_LE_RAID_BUFF_TYPES do - local name,_,_,duration,expiration = GetRaidBuffTrayAuraInfo(i) + if(event == "UNIT_AURA" and arg ~= "player") then return end + for i = 1, NUM_LE_RAID_BUFF_TYPES do + local name, _, _, duration, expiration = GetRaidBuffTrayAuraInfo(i) local buff = SVUI_ConsolidatedBuffs[i] if name then local timeLeft = expiration - GetTime() buff.expiration = timeLeft; buff.duration = duration; buff.nextUpdate = 0; - buff.bar:SetMinMaxValues(0,duration) + buff.bar:SetMinMaxValues(0, duration) buff.bar:SetValue(timeLeft) buff:SetAlpha(0.1) if(duration == 0 and expiration == 0) then - buff:SetScript('OnUpdate',nil) + buff:SetScript("OnUpdate", nil) buff.spellName = nil; buff.empty:SetAlpha(0) else buff:SetAlpha(1) - buff:SetScript('OnUpdate',ConsolidatedBuff_OnUpdate) + buff:SetScript("OnUpdate", ConsolidatedBuff_OnUpdate) buff.spellName = name buff.empty:SetAlpha(1) - end; + end else buff.spellName = nil; buff.bar:SetValue(0) buff:SetAlpha(0.1) buff.empty:SetAlpha(0) - buff:SetScript('OnUpdate',nil) + buff:SetScript("OnUpdate", nil) end end end @@ -343,7 +341,7 @@ do CB_WIDTH = (CB_HEIGHT / 5) + 4 SVUI_AurasAnchor:SetSize(CB_WIDTH, CB_HEIGHT) SVUI_ConsolidatedBuffs:Show() - BuffFrame:RegisterUnitEvent('UNIT_AURA',"player") + BuffFrame:RegisterUnitEvent("UNIT_AURA", "player") MOD:RegisterEvent("UNIT_AURA", UpdateConsolidatedReminder) MOD:RegisterEvent("GROUP_ROSTER_UPDATE", UpdateConsolidatedReminder) MOD:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED", UpdateConsolidatedReminder) @@ -351,14 +349,14 @@ do UpdateConsolidatedReminder() else SVUI_ConsolidatedBuffs:Hide() - BuffFrame:UnregisterEvent('UNIT_AURA') + BuffFrame:UnregisterEvent("UNIT_AURA") MOD:UnregisterEvent("UNIT_AURA") MOD:UnregisterEvent("GROUP_ROSTER_UPDATE") MOD:UnregisterEvent("PLAYER_SPECIALIZATION_CHANGED") SuperVillain.RoleChangedCallback = function() end end - end; -end; + end +end do local AuraButton_OnEnter = function(self) @@ -370,14 +368,14 @@ do if parent.spellName then GameTooltip:SetUnitConsolidatedBuff("player",id) GameTooltip:AddLine("________________________") - end; + end GameTooltip:AddLine("Consolidated Buff: ".._G[("RAID_BUFF_%d"):format(id)]) GameTooltip:Show() - end; + end local AuraButton_OnLeave = function(self) GameTooltip:Hide() - end; + end function MOD:Update_ConsolidatedBuffsSettings(event) SVUI_ConsolidatedBuffs:SetAllPoints(SVUI_AurasAnchor) @@ -409,14 +407,14 @@ do lastGoodFrame = buff else buff:Point("TOP", lastGoodFrame, "BOTTOM", 0, -4) - end; + end if((hideIndex1 and i == hideIndex1) or (hideIndex2 and i == hideIndex2)) then buff:Hide() else buff:Show() lastGoodFrame = buff - end; + end buff:SetSize(buffSize,buffSize) @@ -433,97 +431,98 @@ do MOD:ToggleConsolidatedBuffs() end end -end; +end function MOD:UpdateAuraHeader(auraHeader) if(InCombatLockdown() or not auraHeader) then return end - local db = MOD.db.debuffs; - local font=LSM:Fetch("font",MOD.db.font) - if auraHeader:GetAttribute('filter') == 'HELPFUL' then + local db = MOD.db.debuffs + local showBy = db.showBy + local font = SuperVillain.Shared:Fetch("font", MOD.db.font) + if auraHeader:GetAttribute("filter") == "HELPFUL" then db = MOD.db.buffs; - auraHeader:SetAttribute("consolidateTo",MOD.db.hyperBuffs.enable==true and 1 or 0) - auraHeader:SetAttribute('weaponTemplate',("SVUI_AuraTemplate%d"):format(db.size)) - end; - auraHeader:SetAttribute("separateOwn",db.isolate) - auraHeader:SetAttribute("sortMethod",db.sortMethod) - auraHeader:SetAttribute("sortDir",db.sortDir) - auraHeader:SetAttribute("maxWraps",db.maxWraps) - auraHeader:SetAttribute("wrapAfter",db.wrapAfter) - auraHeader:SetAttribute("point",invertMap1[db.showBy]) - if toggleMap[db.showBy]then - auraHeader:SetAttribute("minWidth", ((db.wrapAfter==1 and 0 or db.wrapXOffset) + db.size) * db.wrapAfter) + auraHeader:SetAttribute("consolidateTo", MOD.db.hyperBuffs.enable == true and 1 or 0) + auraHeader:SetAttribute("weaponTemplate", ("SVUI_AuraTemplate%d"):format(db.size)) + end + auraHeader:SetAttribute("separateOwn", db.isolate) + auraHeader:SetAttribute("sortMethod", db.sortMethod) + auraHeader:SetAttribute("sortDir", db.sortDir) + auraHeader:SetAttribute("maxWraps", db.maxWraps) + auraHeader:SetAttribute("wrapAfter", db.wrapAfter) + auraHeader:SetAttribute("point", invertMap1[showBy]) + if(showBy == "RIGHT_DOWN" or showBy == "RIGHT_UP" or showBy == "LEFT_DOWN" or showBy == "LEFT_UP") then + auraHeader:SetAttribute("minWidth", ((db.wrapAfter == 1 and 0 or db.wrapXOffset) + db.size) * db.wrapAfter) auraHeader:SetAttribute("minHeight", (db.wrapYOffset + db.size) * db.maxWraps) - auraHeader:SetAttribute("xOffset", showMap1[db.showBy] * (db.wrapXOffset + db.size)) + auraHeader:SetAttribute("xOffset", showMap1[showBy] * (db.wrapXOffset + db.size)) auraHeader:SetAttribute("yOffset", 0) auraHeader:SetAttribute("wrapOffsetH", 0) - auraHeader:SetAttribute("wrapOffsetV", showMap2[db.showBy] * (db.wrapYOffset + db.size)) + auraHeader:SetAttribute("wrapOffsetV", showMap2[showBy] * (db.wrapYOffset + db.size)) else - auraHeader:SetAttribute("minWidth", (db.wrapXOffset + db.size)*db.maxWraps) - auraHeader:SetAttribute("minHeight", ((db.wrapAfter==1 and 0 or db.wrapYOffset) + db.size) * db.wrapAfter) + auraHeader:SetAttribute("minWidth", (db.wrapXOffset + db.size) * db.maxWraps) + auraHeader:SetAttribute("minHeight", ((db.wrapAfter == 1 and 0 or db.wrapYOffset) + db.size) * db.wrapAfter) auraHeader:SetAttribute("xOffset", 0) - auraHeader:SetAttribute("yOffset", showMap2[db.showBy] * (db.wrapYOffset + db.size)) - auraHeader:SetAttribute("wrapOffsetH", showMap1[db.showBy] * (db.wrapXOffset + db.size)) + auraHeader:SetAttribute("yOffset", showMap2[showBy] * (db.wrapYOffset + db.size)) + auraHeader:SetAttribute("wrapOffsetH", showMap1[showBy] * (db.wrapXOffset + db.size)) auraHeader:SetAttribute("wrapOffsetV", 0) - end; - auraHeader:SetAttribute("template",("SVUI_AuraTemplate%d"):format(db.size)) - local i=1; - local auraChild=select(i,auraHeader:GetChildren()) + end + auraHeader:SetAttribute("template", ("SVUI_AuraTemplate%d"):format(db.size)) + local i = 1; + local auraChild = select(i, auraHeader:GetChildren()) while(auraChild) do if ((floor(auraChild:GetWidth() * 100 + 0.5) / 100) ~= db.size) then - auraChild:SetSize(db.size,db.size) - end; + auraChild:SetSize(db.size, db.size) + end if(auraChild.time) then auraChild.time:ClearAllPoints() - auraChild.time:SetPoint("TOP", auraChild, 'BOTTOM', 1 + MOD.db.timeOffsetH, MOD.db.timeOffsetV) + auraChild.time:SetPoint("TOP", auraChild, "BOTTOM", 1 + MOD.db.timeOffsetH, MOD.db.timeOffsetV) auraChild.count:ClearAllPoints() auraChild.count:SetPoint("BOTTOMRIGHT", -1 + MOD.db.countOffsetH, MOD.db.countOffsetV) - end; + end if (i > (db.maxWraps * db.wrapAfter) and auraChild:IsShown()) then auraChild:Hide() - end; + end i = i + 1; auraChild = select(i, auraHeader:GetChildren()) end -end; +end local function CreateAuraHeader(filter) - local frameName="SVUI_PlayerDebuffs" - if filter=="HELPFUL" then frameName="SVUI_PlayerBuffs" end; - local auraHeader=CreateFrame("Frame", frameName, SVUI_AurasAnchor, "SecureAuraHeaderTemplate") + local frameName = "SVUI_PlayerDebuffs" + if filter == "HELPFUL" then frameName = "SVUI_PlayerBuffs" end + local auraHeader = CreateFrame("Frame", frameName, SVUI_AurasAnchor, "SecureAuraHeaderTemplate") auraHeader:SetClampedToScreen(true) - auraHeader:SetAttribute("unit","player") - auraHeader:SetAttribute("filter",filter) - RegisterStateDriver(auraHeader,"visibility","[petbattle] hide; show") - RegisterAttributeDriver(auraHeader,"unit","[vehicleui] vehicle; player") - if filter=="HELPFUL" then - auraHeader:SetAttribute('consolidateDuration',-1) - auraHeader:SetAttribute("includeWeapons",1) - end; + auraHeader:SetAttribute("unit", "player") + auraHeader:SetAttribute("filter", filter) + RegisterStateDriver(auraHeader, "visibility", "[petbattle] hide; show") + RegisterAttributeDriver(auraHeader, "unit", "[vehicleui] vehicle; player") + if filter == "HELPFUL" then + auraHeader:SetAttribute("consolidateDuration", -1) + auraHeader:SetAttribute("includeWeapons", 1) + end MOD:UpdateAuraHeader(auraHeader) auraHeader:Show() return auraHeader -end; +end function MOD:UpdateThisPackage() CB_HEIGHT = Minimap:GetHeight() CB_WIDTH = (CB_HEIGHT / 5) + 4 SVUI_AurasAnchor:SetSize(CB_WIDTH, CB_HEIGHT) AURA_FADE_TIME = MOD.db.fadeBy - MOD:UpdateAuraHeader(SVUI_PlayerBuffs); - MOD:UpdateAuraHeader(SVUI_PlayerDebuffs); -end; + MOD:UpdateAuraHeader(SVUI_PlayerBuffs); + MOD:UpdateAuraHeader(SVUI_PlayerDebuffs); +end function MOD:ConstructThisPackage() CB_HEIGHT = Minimap:GetHeight() CB_WIDTH = (CB_HEIGHT / 5) + 4 - if not SuperVillain.db.SVAura.enable then return end; + if not SuperVillain.db.SVAura.enable then return end if SuperVillain.db.SVAura.disableBlizzard then BuffFrame:MUNG() ConsolidatedBuffs:MUNG() TemporaryEnchantFrame:MUNG() InterfaceOptionsFrameCategoriesButton12:SetScale(0.0001) - end; - local auras = CreateFrame('Frame', 'SVUI_AurasAnchor', SuperVillain.UIParent) + end + local auras = CreateFrame("Frame", "SVUI_AurasAnchor", SuperVillain.UIParent) auras:SetSize(CB_WIDTH, CB_HEIGHT) auras:Point("TOPRIGHT", Minimap, "TOPLEFT", -8, 0) self.BuffFrame = CreateAuraHeader("HELPFUL") @@ -534,13 +533,13 @@ function MOD:ConstructThisPackage() SVUI_ConsolidatedBuffs:SetParent(SuperVillain.UIParent) SVUI_ConsolidatedBuffs:SetAllPoints(auras) - for i=1,NUM_LE_RAID_BUFF_TYPES do + for i = 1, NUM_LE_RAID_BUFF_TYPES do SVUI_ConsolidatedBuffs[i] = CreateHyperBuff(i) SVUI_ConsolidatedBuffs[i]:SetID(i) - end; + end self:Update_ConsolidatedBuffsSettings() SuperVillain:SetSVMovable(auras, "SVUI_Auras_MOVE", L["Auras Frame"]) -end; +end SuperVillain.Registry:NewPackage(MOD, "SVAura") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index b921b91..1a56306 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -45,7 +45,6 @@ GET ADDON DATA local SuperVillain, L = unpack(select(2, ...)); local MOD = {}; local DOCK = SuperVillain.Registry:Expose('SVDock'); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARS @@ -645,17 +644,17 @@ do CHAT_ALLOW_URL = MOD.db.url; CHAT_HOVER_URL = MOD.db.hyperlinkHover; CHAT_STICKY = MOD.db.sticky; - CHAT_FONT = LSM:Fetch("font", MOD.db.font); + CHAT_FONT = SuperVillain.Shared:Fetch("font", MOD.db.font); CHAT_FONTSIZE = SuperVillain.db.media.fonts.size or 12; CHAT_FONTOUTLINE = MOD.db.fontOutline; TAB_WIDTH = MOD.db.tabWidth; TAB_HEIGHT = MOD.db.tabHeight; TAB_SKINS = MOD.db.tabStyled; - TAB_FONT = LSM:Fetch("font", MOD.db.tabFont); + TAB_FONT = SuperVillain.Shared:Fetch("font", MOD.db.tabFont); TAB_FONTSIZE = MOD.db.tabFontSize; TAB_FONTOUTLINE = MOD.db.tabFontOutline; CHAT_FADING = MOD.db.fade; - CHAT_PSST = LSM:Fetch("sound", MOD.db.psst); + CHAT_PSST = SuperVillain.Shared:Fetch("sound", MOD.db.psst); TIME_STAMP_MASK = MOD.db.timeStampFormat; if(throttle and throttle == 0) then twipe(THROTTLE_CACHE) diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index ff8e66b..ad304a0 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -264,7 +264,7 @@ local function UpdateMinimapNarration() end; local function UpdateMinimapLocation() - SVUI_MinimapZonetext.Text:SetText(MOD.locationPrefix .. strsub(GetMinimapZoneText(),1,25)) + SVUI_MinimapZonetext.Text:SetText(MOD.locationPrefix .. strsub(GetMinimapZoneText(), 1, 25)) end; function MOD:UpdateMinimapTexts() diff --git a/Interface/AddOns/SVUI/packages/override/common/mirror.lua b/Interface/AddOns/SVUI/packages/override/common/mirror.lua index 21ea30b..d80d0ab 100644 --- a/Interface/AddOns/SVUI/packages/override/common/mirror.lua +++ b/Interface/AddOns/SVUI/packages/override/common/mirror.lua @@ -95,33 +95,9 @@ local function MirrorBarRegistry(barType) return RegisteredMirrorBars[barType] end; local bar = CreateFrame('StatusBar', nil, SuperVillain.UIParent) - bar:SetFixedPanelTemplate("Inset") + bar:SetPanelTemplate("Bar", false, 3, 3, 3) bar:SetScript("OnUpdate", MirrorBar_OnUpdate) local r, g, b = unpack(mirrorTypeColor[barType]) - local bg = bar:CreateTexture(nil, 'BACKGROUND') - bg:SetAllPoints(bar) - bg:SetTexture([[Interface\BUTTONS\WHITE8X8]]) - bg:SetVertexColor(r, g, b) - bg:SetAlpha(0.2) - local border = CreateFrame("Frame", nil, bar) - border:WrapOuter(bar,3,3) - border:SetFrameLevel(0) - border:SetBackdrop({ - bgFile = [[Interface\BUTTONS\WHITE8X8]], - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tile = false, - tileSize = 0, - edgeSize = 1, - insets = - { - left = 0, - right = 0, - top = 0, - bottom = 0, - }, - }) - border:SetBackdropColor(0,0,0,0.5) - border:SetBackdropBorderColor(0,0,0,0.5) bar.text = bar:CreateFontString(nil, 'OVERLAY') bar.text:SetFontTemplate(SuperVillain.Media.font.roboto, 12, 'OUTLINE') bar.text:SetJustifyH('CENTER') @@ -150,36 +126,9 @@ local function SetTimerStyle(bar) child:SetFontTemplate(SuperVillain.Media.font.roboto, 12, 'OUTLINE') end end; - local border = CreateFrame("Frame", nil, bar) - border:WrapOuter(bar,3,3) - border:SetFrameLevel(0) - border:SetBackdrop({ - bgFile = [[Interface\BUTTONS\WHITE8X8]], - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tile = false, - tileSize = 0, - edgeSize = 1, - insets = - { - left = 0, - right = 0, - top = 0, - bottom = 0, - }, - }) - border:SetBackdropColor(0,0,0,0.5) - border:SetBackdropBorderColor(0,0,0,0.5) bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - bar:SetStatusBarColor(unpack(SuperVillain.Media.color.highlight)) - local tempBG = CreateFrame("Frame", nil, bar) - tempBG:WrapOuter(bar) - if (bar:GetFrameLevel() - 1) >= 0 then - tempBG:SetFrameLevel(bar:GetFrameLevel() - 1) - else - tempBG:SetFrameLevel(0) - end; - tempBG:SetFixedPanelTemplate("Transparent") - tempBG:SetAlpha(1) + bar:SetStatusBarColor(0.37, 0.92, 0.08) + bar:SetPanelTemplate("Bar", false, 3, 3, 3) end; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua index 6d816e2..c8f1357 100644 --- a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua +++ b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua @@ -51,7 +51,6 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = {}; -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCALIZED GLOBALS @@ -1038,11 +1037,11 @@ function MOD:UpdateDataLocals() NPBaseAlpha = db.nonTargetAlpha; NPCombatHide = db.combatHide; - NPFont = LSM:Fetch("font", db.font); + NPFont = SuperVillain.Shared:Fetch("font", db.font); NPFSize = db.fontSize; NPFOutline = db.fontOutline; - AuraFont = LSM:Fetch("font", db.auras.font); + AuraFont = SuperVillain.Shared:Fetch("font", db.auras.font); AuraFSize = db.auras.fontSize; AuraFOutline = db.auras.fontOutline; AuraMaxCount = db.auras.numAuras; diff --git a/Interface/AddOns/SVUI/packages/plates/common/auras.lua b/Interface/AddOns/SVUI/packages/plates/common/auras.lua index afcbecd..f576111 100644 --- a/Interface/AddOns/SVUI/packages/plates/common/auras.lua +++ b/Interface/AddOns/SVUI/packages/plates/common/auras.lua @@ -49,7 +49,6 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.Registry:Expose('SVPlate'); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCALS AND TRACKER FRAME @@ -419,7 +418,7 @@ MODULE FUNCTIONS ########################################################## ]]-- function MOD:UpdateAuraLocals() - AuraFont = LSM:Fetch("font", self.db.auras.font); + AuraFont = SuperVillain.Shared:Fetch("font", self.db.auras.font); AuraFSize = self.db.auras.fontSize; AuraFOutline = self.db.auras.fontOutline; AuraExtraFilter = self.db.auras.additionalFilter; diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua index 4b5878d..3d2789d 100644 --- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua +++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua @@ -52,7 +52,6 @@ LOCAL VARIABLES ########################################################## ]]-- --local LDB = LibStub:GetLibrary("LibDataBroker-1.1"); -local LSM = LibStub("LibSharedMedia-3.0"); local hexString = "|cffFFFFFF"; local myName = UnitName("player"); local myClass = select(2,UnitClass("player")); @@ -185,7 +184,7 @@ function MOD:NewAnchor(parent, maxCount, tipAnchor, x, y) parent.holders[this].textframe:SetFrameStrata("HIGH") parent.holders[this].text = parent.holders[this].textframe:CreateFontString(nil, "OVERLAY", nil, 7) parent.holders[this].text:SetAllPoints() - parent.holders[this].text:SetFontTemplate(LSM:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + parent.holders[this].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) parent.holders[this].text:SetJustifyH("CENTER") parent.holders[this].text:SetJustifyV("middle") end; @@ -469,7 +468,7 @@ do parent.holders[this]:SetScript("OnEnter", nil) parent.holders[this]:SetScript("OnLeave", nil) parent.holders[this]:SetScript("OnClick", nil) - parent.holders[this].text:SetFontTemplate(LSM:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + parent.holders[this].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) parent.holders[this].text:SetText(nil) if parent.holders[this].barframe then parent.holders[this].barframe:Hide() diff --git a/Interface/AddOns/SVUI/packages/stats/common/durability.lua b/Interface/AddOns/SVUI/packages/stats/common/durability.lua index f6224d5..30af897 100644 --- a/Interface/AddOns/SVUI/packages/stats/common/durability.lua +++ b/Interface/AddOns/SVUI/packages/stats/common/durability.lua @@ -51,7 +51,6 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.Registry:Expose('SVStats'); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## DURABILITY STATS @@ -83,7 +82,7 @@ local function Durability_OnEvent(self, ...) self.text:SetAllPoints(self) self.text:SetJustifyH("CENTER") self.barframe:Hide() - self.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) + self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) end; for slot,name in pairs(inventoryMap)do local slotID = GetInventorySlotInfo(slot) @@ -104,7 +103,7 @@ local function DurabilityBar_OnEvent(self, ...) if not self.barframe:IsShown() then self.barframe:Show() self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-DUR") - self.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") + self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") end; for slot,name in pairs(inventoryMap)do local slotID = GetInventorySlotInfo(slot) diff --git a/Interface/AddOns/SVUI/packages/stats/common/experience.lua b/Interface/AddOns/SVUI/packages/stats/common/experience.lua index 1c2a668..773407b 100644 --- a/Interface/AddOns/SVUI/packages/stats/common/experience.lua +++ b/Interface/AddOns/SVUI/packages/stats/common/experience.lua @@ -34,7 +34,6 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.Registry:Expose('SVStats'); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## EXPERIENCE STATS @@ -67,7 +66,7 @@ local function Experience_OnEvent(self, ...) self.text:SetAllPoints(self) self.text:SetJustifyH("CENTER") self.barframe:Hide() - self.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) + self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) end; local f, g = getUnitXP("player") local h = GetXPExhaustion() @@ -84,7 +83,7 @@ local function ExperienceBar_OnEvent(self, ...) if ((UnitLevel("player") ~= GetMaxPlayerLevel()) and not self.barframe:IsShown())then self.barframe:Show() self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-XP") - self.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") + self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") end; if not self.barframe.bar.extra:IsShown() then self.barframe.bar.extra:Show() diff --git a/Interface/AddOns/SVUI/packages/stats/common/reputation.lua b/Interface/AddOns/SVUI/packages/stats/common/reputation.lua index 23e53bd..61278e2 100644 --- a/Interface/AddOns/SVUI/packages/stats/common/reputation.lua +++ b/Interface/AddOns/SVUI/packages/stats/common/reputation.lua @@ -35,7 +35,6 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.Registry:Expose('SVStats'); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## REPUTATION STATS @@ -86,7 +85,7 @@ local function Reputation_OnEvent(self, ...) self.text:SetJustifyH("CENTER") self.barframe:Hide() self.text:SetAlpha(1) - self.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) + self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) end; local ID = 100 local isFriend, friendText @@ -118,7 +117,7 @@ local function ReputationBar_OnEvent(self, ...) self.barframe:Show() self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-REP") self.text:SetAlpha(0.5) - self.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") + self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") end; local bar = self.barframe.bar; local name, reaction, min, max, value = GetWatchedFactionInfo() diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index f8e9561..2d6f54d 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -38,7 +38,6 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = {}; -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARIABLES @@ -51,20 +50,22 @@ local playerGUID = UnitGUID("player"); local targetList, inspectCache = {}, {}; local NIL_COLOR = { r = 1, g = 1, b = 1 }; local TAPPED_COLOR = { r = .6, g = .6, b = .6 }; -local tooltips={ - GameTooltip,ItemRefTooltip,ItemRefShoppingTooltip1, - ItemRefShoppingTooltip2,ItemRefShoppingTooltip3,AutoCompleteBox, - FriendsTooltip,ConsolidatedBuffsTooltip,ShoppingTooltip1, - ShoppingTooltip2,ShoppingTooltip3,WorldMapTooltip, - WorldMapCompareTooltip1,WorldMapCompareTooltip2, - WorldMapCompareTooltip3,DropDownList1MenuBackdrop, - DropDownList2MenuBackdrop,DropDownList3MenuBackdrop,BNToastFrame +local SKULL_ICON = "|TInterface\\TARGETINGFRAME\\UI-TargetingFrame-Skull.blp:20:20|t"; +local TAMABLE_INDICATOR = "|TInterface\\PetPaperDollFrame\\PetStable-DietIcon.blp:20:20|t |cffFFFF00Tamable|r"; +local tooltips = { + GameTooltip, ItemRefTooltip, ItemRefShoppingTooltip1, + ItemRefShoppingTooltip2, ItemRefShoppingTooltip3, AutoCompleteBox, + FriendsTooltip, ConsolidatedBuffsTooltip, ShoppingTooltip1, + ShoppingTooltip2, ShoppingTooltip3, WorldMapTooltip, + WorldMapCompareTooltip1, WorldMapCompareTooltip2, + WorldMapCompareTooltip3, DropDownList1MenuBackdrop, + DropDownList2MenuBackdrop, DropDownList3MenuBackdrop, BNToastFrame }; -local classification={ - worldboss = format("|cffAF5050 %s|r",BOSS), - rareelite = format("|cffAF5050+ %s|r",ITEM_QUALITY3_DESC), - elite = "|cffAF5050+|r", - rare = format("|cffAF5050 %s|r",ITEM_QUALITY3_DESC) +local classification = { + worldboss = format("|cffAF5050%s|r", BOSS), + rareelite = format("|cffAF5050+%s|r", ITEM_QUALITY3_DESC), + elite = "|cffAF5050+|r", + rare = format("|cffAF5050%s|r", ITEM_QUALITY3_DESC) }; --[[ ########################################################## @@ -117,26 +118,6 @@ local function TruncateString(value) end end -local function GetLevelLine(this, start) - for i = start, this:NumLines() do - local tip = _G["GameTooltipTextLeft"..i] - if tip:GetText() and tip:GetText():find(LEVEL) then - return tip - end - end -end - -local function RemoveTrashLines(this) - for i=3,this:NumLines() do - local tip = _G["GameTooltipTextLeft"..i] - local tipText = tip:GetText() - if tipText:find(PVP) or tipText:find(FACTION_ALLIANCE) or tipText:find(FACTION_HORDE) then - tip:SetText(nil) - tip:Hide() - end - end -end - local function GetTalentSpec(unit,isPlayer) local spec; if isPlayer then @@ -298,8 +279,29 @@ local function ShowInspectInfo(this,unit,unitLevel,r,g,b,iteration) end end +local function tipcleaner(this) + for i=3, this:NumLines() do + local tip = _G["GameTooltipTextLeft"..i] + local tipText = tip:GetText() + if tipText:find(PVP) or tipText:find(FACTION_ALLIANCE) or tipText:find(FACTION_HORDE) then + tip:SetText(nil) + tip:Hide() + end + end +end + +local function tiplevel(this, start) + for i = start, this:NumLines() do + local tip = _G["GameTooltipTextLeft"..i] + if tip:GetText() and tip:GetText():find(LEVEL) then + return tip + end + end +end + local _hook_GameTooltip_OnTooltipSetUnit = function(self) local unit = select(2, self:GetUnit()) + local TamablePet; if self:GetOwner() ~= UIParent and MOD.db.visibility.unitFrames ~= "NONE" then local vis = MOD.db.visibility.unitFrames; if vis == "ALL" or not (vis == "SHIFT" and IsShiftKeyDown() or vis == "CTRL" and IsControlKeyDown() or vis == "ALT" and IsAltKeyDown()) then @@ -314,50 +316,73 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self) end if not unit or not UnitExists(unit) then return end end - RemoveTrashLines(self) + tipcleaner(self) local unitLevel = UnitLevel(unit) local colors, qColor, totColor; local lvlLine; + local isShiftKeyDown = IsShiftKeyDown() + if UnitIsPlayer(unit) then local className, classToken = UnitClass(unit) local unitName, unitRealm = UnitName(unit) - local guildName, guildRankName, guildRankIndex = GetGuildInfo(unit) + local guildName, guildRankName, _, guildRealm = GetGuildInfo(unit) local pvpName = UnitPVPName(unit) local realmRelation = UnitRealmRelationship(unit) colors = RAID_CLASS_COLORS[classToken] + if MOD.db.playerTitles and pvpName then unitName = pvpName end - if unitRealm and unitRealm ~= "" then - if IsShiftKeyDown() then + if unitRealm and unitRealm ~= "" then + if(isShiftKeyDown) then unitName = unitName.."-"..unitRealm - elseif realmRelation == LE_REALM_RELATION_COALESCED then + elseif(realmRelation == LE_REALM_RELATION_COALESCED) then unitName = unitName..FOREIGN_SERVER_LABEL - elseif realmRelation == LE_REALM_RELATION_VIRTUAL then + elseif(realmRelation == LE_REALM_RELATION_VIRTUAL) then unitName = unitName..INTERACTIVE_SERVER_LABEL end - end + end + + if(UnitIsAFK(unit)) then + -- GameTooltip.mini.text:SetText(L["AFK"]) + -- GameTooltip.mini.text:SetTextColor(1, 0, 0) + -- GameTooltip:SetMiniColor(1, 1, 0) + unitName = unitName .. "" + elseif(UnitIsDND(unit)) then + -- GameTooltip.mini.text:SetText(L["DND"]) + -- GameTooltip.mini.text:SetTextColor(1, 0, 0) + -- GameTooltip:SetMiniColor(1, 1, 0) + unitName = unitName .. "" + end GameTooltipTextLeft1:SetFormattedText("|c%s%s|r", colors.colorStr, unitName) - if guildName then - if guildRankIndex and IsShiftKeyDown() and MOD.db.guildRanks then + if(guildName) then + if(guildRealm and isShiftKeyDown) then + guildName = guildName.."-"..guildRealm + end + + if guildRankName and MOD.db.guildRanks then GameTooltipTextLeft2:SetText(("<|cff00ff10%s|r> [|cff00ff10%s|r]"):format(guildName, guildRankName)) else GameTooltipTextLeft2:SetText(("<|cff00ff10%s|r>"):format(guildName)) end - lvlLine = GetLevelLine(self, 3) + lvlLine = tiplevel(self, 3) else - lvlLine = GetLevelLine(self, 2) + lvlLine = tiplevel(self, 2) end - if lvlLine then + if(lvlLine) then qColor = GetQuestDifficultyColor(unitLevel) - local race, _ = UnitRace(unit) - lvlLine:SetFormattedText("|cff%02x%02x%02x%s|r %s |c%s%s|r", qColor.r * 255, qColor.g * 255, qColor.b * 255, unitLevel > 0 and unitLevel or "??", race, colors.colorStr, className) + local race, englishRace = UnitRace(unit) + local _, factionGroup = UnitFactionGroup(unit) + if(factionGroup and englishRace == "Pandaren") then + race = factionGroup.." "..race + end + lvlLine:SetFormattedText("|cff%02x%02x%02x%s|r %s |c%s%s|r", qColor.r * 255, qColor.g * 255, qColor.b * 255, unitLevel > 0 and unitLevel or SKULL_ICON, race or "", colors.colorStr, className) end - if MOD.db.inspectInfo and IsShiftKeyDown() then + if MOD.db.inspectInfo and isShiftKeyDown then ShowInspectInfo(self, unit, unitLevel, colors.r, colors.g, colors.b, 0) end else @@ -367,10 +392,10 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self) colors = FACTION_BAR_COLORS[UnitReaction(unit, "player")] end - lvlLine = GetLevelLine(self, 2) + lvlLine = tiplevel(self, 2) - if lvlLine then - local unitType = UnitClassification(unit) + if(lvlLine) then + local creatureClassification = UnitClassification(unit) local creatureType = UnitCreatureType(unit) local temp = "" if(UnitIsWildBattlePet(unit) or UnitIsBattlePetCompanion(unit)) then @@ -391,34 +416,42 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self) if(creatureType) then local family = UnitCreatureFamily(unit) or creatureType - if(creatureType == PET_TYPE_SUFFIX[8] and SuperVillain.class == "HUNTER") then - unitCreature = family .. " |cffFFFF00Tamable|r" - else - unitCreature = family + if(SuperVillain.class == "HUNTER" and creatureType == PET_TYPE_SUFFIX[8]) then + local hunterLevel = UnitLevel("player") + if(unitLevel <= hunterLevel and IsSpellInRange("Tame Beast", unit)) then + TamablePet = true + end end + creatureType = family else - unitCreature = "" + creatureType = "" end - lvlLine:SetFormattedText("|cff%02x%02x%02x%s|r%s %s%s", qColor.r * 255, qColor.g * 255, qColor.b * 255, unitLevel > 0 and unitLevel or "??", classification[unitType] or "", unitCreature, temp) + lvlLine:SetFormattedText("|cff%02x%02x%02x%s|r%s %s%s", qColor.r * 255, qColor.g * 255, qColor.b * 255, unitLevel > 0 and unitLevel or "??", classification[creatureClassification] or "", creatureType, temp) end - end + end + if(TamablePet) then + -- GameTooltip.mini.text:SetText("Tamable") + -- GameTooltip.mini.text:SetTextColor(0.1, 1, 0.1) + -- GameTooltip:SetMiniColor(0, 0.68, 0) + GameTooltip:AddLine(TAMABLE_INDICATOR) + end if MOD.db.targetInfo then - if unit ~= "player" and UnitExists(targettarget) then - local targettarget = unit.."target" - if UnitIsPlayer(targettarget) and not UnitHasVehicleUI(targettarget) then - totColor = RAID_CLASS_COLORS[select(2, UnitClass(targettarget))] + local unitTarget = unit.."target" + if(unit ~= "player" and UnitExists(unitTarget)) then + if UnitIsPlayer(unitTarget) and not UnitHasVehicleUI(unitTarget) then + totColor = RAID_CLASS_COLORS[select(2, UnitClass(unitTarget))] else - totColor = FACTION_BAR_COLORS[UnitReaction(targettarget, "player")] + totColor = FACTION_BAR_COLORS[UnitReaction(unitTarget, "player")] end - GameTooltip:AddDoubleLine(format("%s:", TARGET), format("|cff%02x%02x%02x%s|r", totColor.r * 255, totColor.g * 255, totColor.b * 255, UnitName(targettarget))) + GameTooltip:AddDoubleLine(format("%s:", TARGET), format("|cff%02x%02x%02x%s|r", totColor.r * 255, totColor.g * 255, totColor.b * 255, UnitName(unitTarget))) end if IsInGroup() then for i = 1, GetNumGroupMembers() do - local grouptarget = IsInRaid() and "raid"..i or "party"..i; - if UnitIsUnit(grouptarget.."target", unit) and not UnitIsUnit(grouptarget, "player") then - local _, classToken = UnitClass(grouptarget) - tinsert(targetList, format("|c%s%s|r", RAID_CLASS_COLORS[classToken].colorStr, UnitName(grouptarget))) + local groupedUnit = IsInRaid() and "raid"..i or "party"..i; + if UnitIsUnit(groupedUnit.."target", unit) and not UnitIsUnit(groupedUnit, "player") then + local _, classToken = UnitClass(groupedUnit) + tinsert(targetList, format("|c%s%s|r", RAID_CLASS_COLORS[classToken].colorStr, UnitName(groupedUnit))) end end local maxTargets = #targetList; @@ -531,14 +564,14 @@ end local _hook_GameTooltip_OnTooltipSetSpell = function(self) local ref = select(3, self:GetSpell()) - if not ref or not MOD.db.spellID then return end - local text = ("|cFFCA3C3C%s|r %d"):format(ID,ref) + if not ref then return end + local text = ("|cFFCA3C3C%s|r%d"):format(ID, ref) local max = self:NumLines() local check; - for i=1,max do - local tip=_G[("GameTooltipTextLeft%d"):format(i)] + for i = 1, max do + local tip = _G[("GameTooltipTextLeft%d"):format(i)] if tip and tip:GetText() and tip:GetText():find(text) then - check=true; + check = true; break end end @@ -613,14 +646,12 @@ local _hook_OnTipCleared = function(self) end local _hook_OnTipShow = function(self) - self:SetBackdrop({ - bgFile=[[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]], - edgeFile=[[Interface\BUTTONS\WHITE8X8]], - tile=false, - edgeSize=1 - }) - self:SetBackdropColor(0,0,0,0.8) - self:SetBackdropBorderColor(0,0,0) + local shown = self.mini:IsShown() + if(self.mini.text ~= "" and not shown) then + self.mini:Show() + elseif(shown) then + self.mini:Hide() + end end local _hook_OnItemRef = function(link,text,button,chatFrame) @@ -650,7 +681,8 @@ function MOD:ConstructThisPackage() GameTooltipStatusBar:SetPoint("TOPRIGHT", GameTooltip, "BOTTOMRIGHT", -1, -3) GameTooltipStatusBar.text = GameTooltipStatusBar:CreateFontString(nil, "OVERLAY") GameTooltipStatusBar.text:Point("CENTER", GameTooltipStatusBar, 0, -3) - GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font", MOD.db.healthBar.font), MOD.db.healthBar.fontSize, "OUTLINE") + GameTooltipStatusBar.text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.healthBar.font), MOD.db.healthBar.fontSize, "OUTLINE") + if not GameTooltipStatusBar.border then local border = CreateFrame("Frame", nil, GameTooltipStatusBar) border:WrapOuter(GameTooltipStatusBar, 1, 1) @@ -658,7 +690,8 @@ function MOD:ConstructThisPackage() border:SetBackdrop({edgeFile = [[Interface\BUTTONS\WHITE8X8]], edgeSize = 1}) border:SetBackdropBorderColor(0, 0, 0, 1) GameTooltipStatusBar.border = border - end + end + local anchor = CreateFrame("Frame", "GameTooltipAnchor", SuperVillain.UIParent) anchor:Point("BOTTOMRIGHT", RightSuperDock, "TOPRIGHT", 0, 60) anchor:Size(130, 20) @@ -672,18 +705,60 @@ function MOD:ConstructThisPackage() NewHook(GameTooltip, "SetUnitBuff", _hook_OnSetUnitAura) NewHook(GameTooltip, "SetUnitDebuff", _hook_OnSetUnitAura) NewHook(GameTooltip, "SetUnitConsolidatedBuff", _hook_OnSetHyperUnitAura) + if self.db.spellID then NewHook("SetItemRef", _hook_OnItemRef) + GameTooltip:HookScript("OnTooltipSetSpell", _hook_GameTooltip_OnTooltipSetSpell) end - GameTooltip:HookScript("OnTooltipSetSpell", _hook_GameTooltip_OnTooltipSetSpell) GameTooltip:HookScript("OnTooltipCleared", _hook_OnTipCleared) GameTooltip:HookScript("OnTooltipSetItem", _hook_GameTooltip_OnTooltipSetItem) GameTooltip:HookScript("OnTooltipSetUnit", _hook_GameTooltip_OnTooltipSetUnit) GameTooltipStatusBar:HookScript("OnValueChanged", _hook_GameTooltipStatusBar_OnValueChanged) self:RegisterEvent("MODIFIER_STATE_CHANGED", TooltipModifierChangeHandler) - for _, tooltip in pairs(tooltips)do - tooltip:HookScript("OnShow", _hook_OnTipShow) + local MINI_BG = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\MINITIP-BG]] + local MINI_LEFT = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\MINITIP-LEFT]] + local MINI_RIGHT = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\MINITIP-RIGHT]] + for _, tooltip in pairs(tooltips) do + local mini = CreateFrame("Frame", nil, tooltip) + mini:Size(60,15) + mini:Point("LEFT", tooltip, "TOPLEFT", -7, 0) + mini.text = mini:CreateFontString(nil, "OVERLAY") + mini.text:FillInner(mini, 2, 2) + mini.text:SetFont(SuperVillain.Media.font.alert, 14, "OUTLINE") + mini.text:SetShadowOffset(2, -2) + mini.text:SetShadowColor(0, 0, 0, 1) + mini.bg = mini:CreateTexture(nil, "BORDER") + mini.bg:SetAllPoints(mini) + mini.bg:SetTexture(MINI_BG) + mini.left = mini:CreateTexture(nil, "BORDER") + mini.left:Size(15,15) + mini.left:Point("RIGHT", mini, "LEFT", 0, 0) + mini.left:SetTexture(MINI_LEFT) + mini.right = mini:CreateTexture(nil, "BORDER") + mini.right:Size(15,15) + mini.right:Point("LEFT", mini, "RIGHT", 0, 0) + mini.right:SetTexture(MINI_RIGHT) + tooltip.mini = mini + tooltip.mini:Hide() + tooltip:SetBackdrop({ + bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\Tooltip\TOOLTIP]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + edgeSize = 1 + }) + tooltip:SetBackdropColor(0, 0, 0, 0.8) + tooltip:SetBackdropBorderColor(0, 0, 0) + tooltip.SetBackdrop = function() end + tooltip.SetBackdropColor = function() end + tooltip.SetBackdropBorderColor = function() end + tooltip.SetMiniColor = function(self, r, g, b) + self.mini.bg:SetVertexColor(r,g,b) + self.mini.left:SetVertexColor(r,g,b) + self.mini.right:SetVertexColor(r,g,b) + end + + --tooltip:HookScript("OnShow", _hook_OnTipShow) end end SuperVillain.Registry:NewPackage(MOD, "SVTip") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index 3cf92cf..3c7f616 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -31,120 +31,141 @@ local find, format, upper = string.find, string.format, string.upper; local match, gsub = string.match, string.gsub; --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; +--[[ LOCALIZED BLIZZ FUNCTIONS ]]-- +local NewHook = hooksecurefunc; --[[ ########################################################## -GET ADDON DATA +GET ADDON DATA AND TEST FOR oUF ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); local _, ns = ... local oUF_SuperVillain = ns.oUF assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") -local MOD = {} -local LSM = LibStub("LibSharedMedia-3.0") -local NewHook = hooksecurefunc; ---[[ -########################################################## -MODULE DATA -########################################################## -]]-- -local LoadedBasicFrames, LoadedGroupFrames, LoadedExtraFrames; --[[ ########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local dummy = CreateFrame("Frame") -dummy:Hide() -local KillBlizzardUnit = function(unit) - local frame; - if type(unit) == "string" then frame = _G[unit] else frame = unit end - if frame then - frame:UnregisterAllEvents() - frame:Hide() - frame:SetParent(dummy) - local h = frame.healthbar; - if h then h:UnregisterAllEvents()end - local m = frame.manabar; - if m then m:UnregisterAllEvents()end - local s = frame.spellbar; - if s then s:UnregisterAllEvents()end - local p = frame.powerBarAlt; - if p then p:UnregisterAllEvents()end - end -end ---[[ -########################################################## -INNER CLASSES +MODULE AND INNER CLASSES ########################################################## ]]-- +local MOD = {} MOD.Units = {} MOD.Headers = {} MOD.Construct = {} MOD.FrameUpdate = {} MOD.HeaderUpdate = {} -MOD.VisibilityUpdate = {} +--[[ +########################################################## +LOCALS +########################################################## +]]-- +local LoadedUnitFrames, LoadedGroupHeaders; --[[ ########################################################## CORE FUNCTIONS ########################################################## ]]-- -function oUF_SuperVillain:DisableBlizzard(unit) - if (not unit) or InCombatLockdown() then return end - if (unit == "player") then - KillBlizzardUnit(PlayerFrame) - PlayerFrame:RegisterUnitEvent("UNIT_ENTERING_VEHICLE", "player") - PlayerFrame:RegisterUnitEvent("UNIT_ENTERED_VEHICLE", "player") - PlayerFrame:RegisterUnitEvent("UNIT_EXITING_VEHICLE", "player") - PlayerFrame:RegisterUnitEvent("UNIT_EXITED_VEHICLE", "player") - PlayerFrame:RegisterEvent("PLAYER_ENTERING_WORLD") - PlayerFrame:SetUserPlaced(true) - PlayerFrame:SetDontSavePosition(true) - RuneFrame:SetParent(PlayerFrame) - elseif(unit == "pet") then - KillBlizzardUnit(PetFrame) - elseif(unit == "target") then - KillBlizzardUnit(TargetFrame) - KillBlizzardUnit(ComboFrame) - elseif(unit == "focus") then - KillBlizzardUnit(FocusFrame) - KillBlizzardUnit(TargetofFocusFrame) - elseif(unit == "targettarget") then - KillBlizzardUnit(TargetFrameToT) - elseif(unit:match("(boss)%d?$") == "boss") then - local id = unit:match("boss(%d)") - if(id) then - KillBlizzardUnit("Boss"..id.."TargetFrame") - else - for i = 1, 4 do - KillBlizzardUnit(("Boss%dTargetFrame"):format(i)) +do + local dummy = CreateFrame("Frame", nil) + dummy:Hide() + + local function deactivate(unitName) + local frame; + if type(unitName) == "string" then frame = _G[unitName] else frame = unitName end + if frame then + frame:UnregisterAllEvents() + frame:Hide() + frame:SetParent(dummy) + if frame.healthbar then frame.healthbar:UnregisterAllEvents() end + if frame.manabar then frame.manabar:UnregisterAllEvents() end + if frame.spellbar then frame.spellbar:UnregisterAllEvents() end + if frame.powerBarAlt then frame.powerBarAlt:UnregisterAllEvents() end + end + end + + function oUF_SuperVillain:DisableBlizzard(unit) + if (not unit) or InCombatLockdown() then return end + + if (unit == "player") then + deactivate(PlayerFrame) + PlayerFrame:RegisterUnitEvent("UNIT_ENTERING_VEHICLE", "player") + PlayerFrame:RegisterUnitEvent("UNIT_ENTERED_VEHICLE", "player") + PlayerFrame:RegisterUnitEvent("UNIT_EXITING_VEHICLE", "player") + PlayerFrame:RegisterUnitEvent("UNIT_EXITED_VEHICLE", "player") + PlayerFrame:RegisterEvent("PLAYER_ENTERING_WORLD") + + PlayerFrame:SetUserPlaced(true) + PlayerFrame:SetDontSavePosition(true) + RuneFrame:SetParent(PlayerFrame) + elseif(unit == "pet") then + deactivate(PetFrame) + elseif(unit == "target") then + deactivate(TargetFrame) + deactivate(ComboFrame) + elseif(unit == "focus") then + deactivate(FocusFrame) + deactivate(TargetofFocusFrame) + elseif(unit == "targettarget") then + deactivate(TargetFrameToT) + elseif(unit:match("(boss)%d?$") == "boss") then + local id = unit:match("boss(%d)") + if(id) then + deactivate("Boss"..id.."TargetFrame") + else + for i = 1, 4 do + deactivate(("Boss%dTargetFrame"):format(i)) + end end - end - elseif(unit:match("(party)%d?$") == "party") then - local id = unit:match("party(%d)") - if(id) then - KillBlizzardUnit("PartyMemberFrame"..id) - else - for i = 1, 4 do - KillBlizzardUnit(("PartyMemberFrame%d"):format(i)) + elseif(unit:match("(party)%d?$") == "party") then + local id = unit:match("party(%d)") + if(id) then + deactivate("PartyMemberFrame"..id) + else + for i = 1, 4 do + deactivate(("PartyMemberFrame%d"):format(i)) + end end - end - elseif(unit:match("(arena)%d?$") == "arena") then - local id = unit:match("arena(%d)") - if(id) then - KillBlizzardUnit("ArenaEnemyFrame"..id) - KillBlizzardUnit("ArenaPrepFrame"..id) - KillBlizzardUnit("ArenaEnemyFrame"..id.."PetFrame") - else - for i = 1, 5 do - KillBlizzardUnit(("ArenaEnemyFrame%d"):format(i)) - KillBlizzardUnit(("ArenaPrepFrame%d"):format(i)) - KillBlizzardUnit(("ArenaEnemyFrame%dPetFrame"):format(i)) + elseif(unit:match("(arena)%d?$") == "arena") then + local id = unit:match("arena(%d)") + if(id) then + deactivate("ArenaEnemyFrame"..id) + deactivate("ArenaPrepFrame"..id) + deactivate("ArenaEnemyFrame"..id.."PetFrame") + else + for i = 1, 5 do + deactivate(("ArenaEnemyFrame%d"):format(i)) + deactivate(("ArenaPrepFrame%d"):format(i)) + deactivate(("ArenaEnemyFrame%dPetFrame"):format(i)) + end end end end end +local StandardUnitStyle = function(self, unit) + self:SetScript("OnEnter", UnitFrame_OnEnter) + self:SetScript("OnLeave", UnitFrame_OnLeave) + self:SetFrameLevel(2) + self.unit = unit + local key = unit:gsub("%d", "") + self.___key = key + MOD.Construct[key](self); + return self +end + +local EnemyUnitStyle = function(self, unit) + self:SetScript("OnEnter", UnitFrame_OnEnter) + self:SetScript("OnLeave", UnitFrame_OnLeave) + self:SetFrameLevel(2) + self.unit = unit + local index = unit:match("(%d)") + self.index = index + self:SetID(index) + local key = unit:gsub("%d", "") + self.___key = key + MOD.Construct[key](self); + return self +end + function MOD:DetachSubFrames(...) for i = 1, select("#", ...) do local frame = select(i,...) @@ -244,22 +265,21 @@ function MOD:RefreshUnitColors() oUF_SuperVillain.colors.smooth = {1, 0, 0, 1, 1, 0, r, g, b} end -function MOD:RefreshUnitMedia(frame) - local db = self.db - if(not (db and db.enable) or not frame) then return end - local CURRENT_BAR_TEXTURE = LSM:Fetch("statusbar", db.statusbar) - local CURRENT_AURABAR_TEXTURE = LSM:Fetch("statusbar", db.auraBarStatusbar); - local CURRENT_FONT = LSM:Fetch("font", db.font) - local CURRENT_AURABAR_FONT = LSM:Fetch("font", db.auraFont); +local RefreshUnitMedia = function(self) + local db = MOD.db + if(not (db and db.enable) or not self) then return end + local CURRENT_BAR_TEXTURE = SuperVillain.Shared:Fetch("statusbar", db.statusbar) + local CURRENT_AURABAR_TEXTURE = SuperVillain.Shared:Fetch("statusbar", db.auraBarStatusbar); + local CURRENT_FONT = SuperVillain.Shared:Fetch("font", db.font) + local CURRENT_AURABAR_FONT = SuperVillain.Shared:Fetch("font", db.auraFont); local CURRENT_AURABAR_FONTSIZE = db.auraFontSize local CURRENT_AURABAR_FONTOUTLINE = db.auraFontOutline - local key = frame.datakey - local unitDB = db[key] + local unitDB = db[self.___key] if(unitDB and unitDB.enable) then - local panel = frame.InfoPanel + local panel = self.InfoPanel if(panel) then if(panel.Name and unitDB.name) then - panel.Name:SetFont(LSM:Fetch("font", unitDB.name.font), unitDB.name.fontSize, unitDB.name.fontOutline) + panel.Name:SetFont(SuperVillain.Shared:Fetch("font", unitDB.name.font), unitDB.name.fontSize, unitDB.name.fontOutline) end if(panel.Health) then panel.Health:SetFont(CURRENT_FONT, db.fontSize, db.fontOutline) @@ -271,64 +291,66 @@ function MOD:RefreshUnitMedia(frame) panel.Misc:SetFont(CURRENT_FONT, db.fontSize, db.fontOutline) end end - if(frame.Power and (unitDB.power and unitDB.power.enable)) then - frame.Power:SetStatusBarTexture(CURRENT_BAR_TEXTURE) + if(self.Health and (unitDB.health and unitDB.health.enable)) then + self.Health:SetStatusBarTexture(CURRENT_BAR_TEXTURE) end - if(frame.AuraBars and (unitDB.aurabar and unitDB.aurabar.enable)) then - local ab = frame.AuraBars + if(self.Power and (unitDB.power and unitDB.power.enable)) then + self.Power:SetStatusBarTexture(CURRENT_BAR_TEXTURE) + end + if(self.AuraBars and (unitDB.aurabar and unitDB.aurabar.enable)) then + local ab = self.AuraBars ab.auraBarTexture = CURRENT_AURABAR_TEXTURE ab.textFont = CURRENT_AURABAR_FONT ab.textSize = db.auraFontSize ab.textOutline = db.auraFontOutline end - if(frame.Buffs and (unitDB.buffs and unitDB.buffs.enable)) then - local buffs = frame.Buffs + if(self.Buffs and (unitDB.buffs and unitDB.buffs.enable)) then + local buffs = self.Buffs buffs.textFont = CURRENT_AURABAR_FONT buffs.textSize = db.auraFontSize buffs.textOutline = db.auraFontOutline end - if(frame.Debuffs and (unitDB.debuffs and unitDB.debuffs.enable)) then - local debuffs = frame.Debuffs + if(self.Debuffs and (unitDB.debuffs and unitDB.debuffs.enable)) then + local debuffs = self.Debuffs debuffs.textFont = CURRENT_AURABAR_FONT debuffs.textSize = db.auraFontSize debuffs.textOutline = db.auraFontOutline end + if(self.RaidDebuffs) then + local rdebuffs = self.RaidDebuffs; + if db.rdebuffs.enable then + rdebuffs.count:SetFontTemplate(CURRENT_AURABAR_FONT, db.auraFontSize, db.auraFontOutline) + rdebuffs.time:SetFontTemplate(CURRENT_AURABAR_FONT, db.auraFontSize, db.auraFontOutline) + end + end end end function MOD:RefreshAllUnitMedia() if(not self.db or (self.db and self.db.enable ~= true)) then return end self:RefreshUnitColors() - -- [[ FRAMES ]] -- - for _,frame in pairs(self.Units)do - local key = frame.datakey - if self.db[key].enable then + for unit,frame in pairs(self.Units)do + if self.db[frame.___key].enable then frame:MediaUpdate() end end - for _,group in pairs(self.Headers) do group:MediaUpdate() end - collectgarbage("collect") - INIT_UPDATE = false end function MOD:RefreshUnitFrames() if SuperVillain.db['SVUnit'].enable~=true then return end self:RefreshUnitColors() - for unit,frame in pairs(self.Units)do - local key = frame.datakey - if self.db[key].enable then + if self.db[frame.___key].enable then frame:Enable() frame:Update() else frame:Disable() end end - local _,groupType = IsInInstance() local raidDebuffs = ns.oUF_RaidDebuffs or oUF_RaidDebuffs; if raidDebuffs then @@ -339,75 +361,72 @@ function MOD:RefreshUnitFrames() raidDebuffs:RegisterDebuffs(SuperVillain.Filters["CC"]) end end - for _,group in pairs(self.Headers) do group:Update() if group.SetConfigEnvironment then group:SetConfigEnvironment() end end - if SuperVillain.db.SVUnit.disableBlizzard then oUF_SuperVillain:DisableBlizzard('party') end - collectgarbage("collect") end -function MOD:SetBasicFrame(unit) - assert(unit, "No unit provided to create or update.") +function MOD:SetUnitFrame(unitKey) if InCombatLockdown() then self:FrameForge() return end - local realName = unit:gsub("(.)", upper, 1); - realName = realName:gsub("t(arget)", "T%1"); - if not self.Units[unit] then - self.Units[unit] = oUF_SuperVillain:Spawn(unit, "SVUI_"..realName) - end - self.Units[unit].Update = function() - self.FrameUpdate[unit](MOD, unit, MOD.Units[unit], MOD.db[unit]) - end - self.Units[unit].MediaUpdate = function() - self:RefreshUnitMedia(MOD.Units[unit]) - end - if self.Units[unit]:GetParent() ~= SVUI_UnitFrameParent then - self.Units[unit]:SetParent(SVUI_UnitFrameParent) - end - if self.db[unit].enable then - self.Units[unit]:Enable() - self.Units[unit].Update() + local unit = unitKey + local realName = unit:gsub("(.)", upper, 1) + realName = realName:gsub("t(arget)", "T%1") + local frame = self.Units[unit] + if not frame then + oUF_SuperVillain:SetActiveStyle("SVUI_UnitFrame") + frame = oUF_SuperVillain:Spawn(unit, "SVUI_"..realName) + frame.Update = self.FrameUpdate[unitKey] + frame.MediaUpdate = RefreshUnitMedia + self.Units[unit] = frame + end + if frame:GetParent() ~= SVUI_UnitFrameParent then + frame:SetParent(SVUI_UnitFrameParent) + end + if self.db[unitKey].enable then + frame:Enable() + frame:Update() else - self.Units[unit]:Disable() - end + frame:Disable() + end end -function MOD:SetExtraFrame(name, count) +function MOD:SetEnemyFrames(unitKey, maxCount) if InCombatLockdown() then self:FrameForge() return end - - for i = 1, count do - local unit = name..i; + for i = 1, maxCount do + local unit = unitKey..i local realName = unit:gsub("(.)", upper, 1) realName = realName:gsub("t(arget)", "T%1") - if not self.Units[unit] then - self.Units[unit] = oUF_SuperVillain:Spawn(unit, "SVUI_"..realName) - self.Units[unit].index = i; - self.Units[unit]:SetParent(SVUI_UnitFrameParent) - self.Units[unit]:SetID(i) + local frame = self.Units[unit] + if not frame then + oUF_SuperVillain:SetActiveStyle("SVUI_EnemyFrame") + frame = oUF_SuperVillain:Spawn(unit, "SVUI_"..realName) + frame.___key = unitKey + frame.Update = self.FrameUpdate[unitKey] + frame.MediaUpdate = RefreshUnitMedia + frame.i = i; + frame:SetID(i) + self.Units[unit] = frame end - self.Units[unit].Update = function() - self.FrameUpdate[name](MOD, unit, MOD.Units[unit], MOD.db[name]) + if frame:GetParent() ~= SVUI_UnitFrameParent then + frame:SetParent(SVUI_UnitFrameParent) end - self.Units[unit].MediaUpdate = function() - self:RefreshUnitMedia(MOD.Units[unit]) + if frame.isForced then + self:AllowElement(frame) end - if self.db[name].enable then - self.Units[unit]:Enable() - self.Units[unit].Update() - if self.Units[unit].isForced then - self:AllowElement(MOD.Units[unit]) - end + if self.db[unitKey].enable then + frame:Enable() + frame:Update() else - self.Units[unit]:Disable() - end - end + frame:Disable() + end + end end do @@ -439,56 +458,56 @@ do }; local _GSORT = { - ['CLASS']=function(frame) - frame:SetAttribute("groupingOrder","DEATHKNIGHT,DRUID,HUNTER,MAGE,PALADIN,PRIEST,SHAMAN,WARLOCK,WARRIOR,MONK") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",'CLASS') + ['CLASS']=function(self) + self:SetAttribute("groupingOrder","DEATHKNIGHT,DRUID,HUNTER,MAGE,PALADIN,PRIEST,SHAMAN,WARLOCK,WARRIOR,MONK") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",'CLASS') end, - ['MTMA']=function(frame) - frame:SetAttribute("groupingOrder","MAINTANK,MAINASSIST,NONE") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",'ROLE') + ['MTMA']=function(self) + self:SetAttribute("groupingOrder","MAINTANK,MAINASSIST,NONE") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",'ROLE') end, - ['ROLE']=function(frame) - frame:SetAttribute("groupingOrder","TANK,HEALER,DAMAGER,NONE") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",'ASSIGNEDROLE') + ['ROLE']=function(self) + self:SetAttribute("groupingOrder","TANK,HEALER,DAMAGER,NONE") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",'ASSIGNEDROLE') end, - ['ROLE_TDH']=function(frame) - frame:SetAttribute("groupingOrder","TANK,DAMAGER,HEALER,NONE") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",'ASSIGNEDROLE') + ['ROLE_TDH']=function(self) + self:SetAttribute("groupingOrder","TANK,DAMAGER,HEALER,NONE") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",'ASSIGNEDROLE') end, - ['ROLE_HTD']=function(frame) - frame:SetAttribute("groupingOrder","HEALER,TANK,DAMAGER,NONE") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",'ASSIGNEDROLE') + ['ROLE_HTD']=function(self) + self:SetAttribute("groupingOrder","HEALER,TANK,DAMAGER,NONE") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",'ASSIGNEDROLE') end, - ['ROLE_HDT']=function(frame) - frame:SetAttribute("groupingOrder","HEALER,DAMAGER,TANK,NONE") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",'ASSIGNEDROLE') + ['ROLE_HDT']=function(self) + self:SetAttribute("groupingOrder","HEALER,DAMAGER,TANK,NONE") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",'ASSIGNEDROLE') end, - ['NAME']=function(frame) - frame:SetAttribute("groupingOrder","1,2,3,4,5,6,7,8") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",nil) + ['NAME']=function(self) + self:SetAttribute("groupingOrder","1,2,3,4,5,6,7,8") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",nil) end, - ['GROUP']=function(frame) - frame:SetAttribute("groupingOrder","1,2,3,4,5,6,7,8") - frame:SetAttribute('sortMethod','INDEX') - frame:SetAttribute("sortMethod",'GROUP') + ['GROUP']=function(self) + self:SetAttribute("groupingOrder","1,2,3,4,5,6,7,8") + self:SetAttribute('sortMethod','INDEX') + self:SetAttribute("sortMethod",'GROUP') end, - ['PETNAME']=function(frame) - frame:SetAttribute("groupingOrder","1,2,3,4,5,6,7,8") - frame:SetAttribute('sortMethod','NAME') - frame:SetAttribute("sortMethod",nil) - frame:SetAttribute("filterOnPet",true) + ['PETNAME']=function(self) + self:SetAttribute("groupingOrder","1,2,3,4,5,6,7,8") + self:SetAttribute('sortMethod','NAME') + self:SetAttribute("sortMethod",nil) + self:SetAttribute("filterOnPet",true) end }; - local function dbMapping(frame) - local db = MOD.db[frame.NameKey] + local function dbMapping(self) + local db = MOD.db[self.___key] if(db.showBy == "UP") then db.showBy = "UP_RIGHT" end @@ -497,58 +516,11 @@ do end end - local function AppendUpdateHandler(unit) - return function() - local header = MOD.Headers[unit] - local db = MOD.db[unit] - if db.enable ~= true then - UnregisterAttributeDriver(header, "state-visibility") - header:Hide() - return - end - MOD.HeaderUpdate[unit](MOD, header, db) - for i = 1, header:GetNumChildren()do - local childFrame = select(i, header:GetChildren()) - MOD.FrameUpdate[unit](MOD, childFrame, MOD.db[unit]) - if _G[childFrame:GetName().."Target"]then - MOD.FrameUpdate[unit](MOD, _G[childFrame:GetName().."Target"], MOD.db[unit]) - end - if _G[childFrame:GetName().."Pet"]then - MOD.FrameUpdate[unit](MOD, _G[childFrame:GetName().."Pet"], MOD.db[unit]) - end - end - end - end - - local SecureHeaderUpdate = function(self) - local unit = self.NameKey; - local db = MOD.db[unit] - MOD.HeaderUpdate[unit](MOD, self, db) - - local index = 1; - local childFrame = self:GetAttribute("child"..index) - while childFrame do - MOD.FrameUpdate[unit](MOD, childFrame, db) - if _G[childFrame:GetName().."Pet"] then - MOD.FrameUpdate[unit](MOD, _G[childFrame:GetName().."Pet"], db) - end - - if _G[childFrame:GetName().."Target"] then - MOD.FrameUpdate[unit](MOD, _G[childFrame:GetName().."Target"], db) - end - - index = index + 1; - childFrame = self:GetAttribute("child"..index) - end - end - local SecureHeaderMediaUpdate = function(self) - local unit = self.NameKey; - local db = MOD.db[unit] local index = 1; local childFrame = self:GetAttribute("child"..index) while childFrame do - MOD:RefreshUnitMedia(childFrame) + RefreshUnitMedia(childFrame) index = index + 1; childFrame = self:GetAttribute("child"..index) end @@ -577,11 +549,10 @@ do self:SetAttribute("yOffset", nil) end - function MOD:SpawnGroupHeader(parentFrame, filter, realName, template1, secureName, template2) - local name = parentFrame.NameKey or secureName; - local db = MOD.db[name] - local frameName = name:gsub("(.)", upper, 1) - oUF_SuperVillain:SetActiveStyle("SVUI_" .. frameName) + function MOD:SpawnGroupHeader(parentFrame, filter, realName, template1, headerName, template2) + local db = MOD.db[headerName] + local selfName = headerName:gsub("(.)", upper, 1) + oUF_SuperVillain:SetActiveStyle("SVUI_" .. selfName) local groupUnit = oUF_SuperVillain:SpawnHeader(realName, template2, nil, "oUF-initialConfigFunction", ("self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)"):format(db.width, db.height), "groupFilter", filter, @@ -590,24 +561,23 @@ do "showSolo", true, template1 and "template", template1 ); - groupUnit.NameKey = name; + groupUnit.___key = headerName; groupUnit:SetParent(parentFrame) groupUnit:Show() - groupUnit.Update = SecureHeaderUpdate + groupUnit.Update = self.HeaderUpdate[headerName] groupUnit.MediaUpdate = SecureHeaderMediaUpdate groupUnit.ClearAllAttributes = SecureHeaderClear return groupUnit end local GroupSetConfigEnvironment = function(self) - local headerName = self.NameKey - local db = MOD.db[headerName] + local db = MOD.db[self.___key] local anchorPoint; local widthCalc, heightCalc, xCalc, yCalc = 0, 0, 0, 0; local sorting = db.showBy; local pointMap = _POINTMAP[sorting] local point1, point2, point3, point4, point5, horizontal, vertical, isHorizontal = pointMap[1], pointMap[2], pointMap[3], pointMap[4], pointMap[5], pointMap[6], pointMap[7], pointMap[8]; - for i = 1, db.gCount do + for i = 1, db.groupCount do local frame = self.subunits[i] --<< if frame then dbMapping(frame) @@ -622,14 +592,14 @@ do end if not frame.isForced then if not frame.initialized then - frame:SetAttribute("startingIndex", db.rSort and (-min(db.gCount * db.gRowCol * 5, MAX_RAID_MEMBERS) + 1) or -4) + frame:SetAttribute("startingIndex", db.customSorting and (-min(db.groupCount * db.gRowCol * 5, MAX_RAID_MEMBERS) + 1) or -4) frame:Show() frame.initialized = true end frame:SetAttribute("startingIndex", 1) end frame:ClearAllPoints() - if db.rSort and db.invertGroupingOrder then + if db.customSorting and db.invertGroupingOrder then frame:SetAttribute("columnAnchorPoint", point4) else frame:SetAttribute("columnAnchorPoint", point3) @@ -637,20 +607,20 @@ do MOD:DetachSubFrames(frame:GetChildren()) frame:SetAttribute("point", point1) if not frame.isForced then - frame:SetAttribute("maxColumns", db.rSort and db.gCount or 1) - frame:SetAttribute("unitsPerColumn", db.rSort and (db.gRowCol * 5) or 5) + frame:SetAttribute("maxColumns", db.customSorting and db.groupCount or 1) + frame:SetAttribute("unitsPerColumn", db.customSorting and (db.gRowCol * 5) or 5) _GSORT[db.sortMethod](frame) frame:SetAttribute("sortDir", db.sortDir) frame:SetAttribute("showPlayer", db.showPlayer) end - if i == 1 and db.rSort then + if i == 1 and db.customSorting then frame:SetAttribute("groupFilter", "1, 2, 3, 4, 5, 6, 7, 8") else frame:SetAttribute("groupFilter", tostring(i)) end end local anchorPoint = point2 - if db.rSort and db.startFromCenter then + if db.customSorting and db.startFromCenter then anchorPoint = point5 end if (i - 1) % db.gRowCol == 0 then @@ -699,41 +669,39 @@ do self:SetSize(widthCalc - db.wrapXOffset, heightCalc - db.wrapYOffset) end - local GroupUpdate = function(self) --<< - local headerName = self.NameKey - local header = MOD.Headers[headerName] - if MOD.db[headerName].enable ~= true then - UnregisterAttributeDriver(header, "state-visibility") - header:Hide() + local GroupUpdate = function(group) --<< + local key = group.___key + if MOD.db[key].enable ~= true then + UnregisterAttributeDriver(group, "state-visibility") + group:Hide() return end - for i=1,#self.subunits do - self.subunits[i]:Update() + for i=1,#group.subunits do + group.subunits[i]:Update() end end - local GroupMediaUpdate = function(self) --<< - for i=1,#self.subunits do - self.subunits[i]:MediaUpdate() + local GroupMediaUpdate = function(group) + for i=1,#group.subunits do + group.subunits[i]:MediaUpdate() end end - local GroupSetActiveState = function(self) --<< + local GroupSetActiveState = function(self) if not self.isForced then - local key = self.NameKey - local db = MOD.db[key] + local db = MOD.db[self.___key] if(db) then for i=1,#self.subunits do - local frame = self.subunits[i] - if i <= db.gCount and db.rSort and i <= 1 or not db.rSort then - frame:Show() + local self = self.subunits[i] + if i <= db.groupCount and db.customSorting and i <= 1 or not db.customSorting then + self:Show() else - if frame.forceShow then - frame:Hide() - MOD:RestrictChildren(frame, frame:GetChildren()) - frame:SetAttribute('startingIndex',1) + if self.forceShow then + self:Hide() + MOD:RestrictChildren(self, self:GetChildren()) + self:SetAttribute('startingIndex',1) else - frame:ClearAllAttributes() + self:ClearAllAttributes() end end end @@ -745,49 +713,56 @@ do if not self.db[header] then return end local db = self.db[header] - local realName + local realName = header:gsub("(.)", upper, 1) - if not self.Headers[header] then - realName = header:gsub("(.)", upper, 1) - oUF_SuperVillain:RegisterStyle("SVUI_"..realName, MOD.Construct[header]) + local frame = self.Headers[header] + if(not frame) then + oUF_SuperVillain:RegisterStyle("SVUI_"..realName, function(self, unit) + self.unit = unit + self.___key = header + MOD.Construct[header](self) + return self + end) oUF_SuperVillain:SetActiveStyle("SVUI_"..realName) - if db.gCount then - self.Headers[header] = CreateFrame("Frame", "SVUI_"..realName, SVUI_UnitFrameParent, "SecureHandlerStateTemplate") - self.Headers[header].subunits = {} - self.Headers[header].NameKey = header; - self.Headers[header].SetConfigEnvironment = GroupSetConfigEnvironment - self.Headers[header].Update = GroupUpdate - self.Headers[header].MediaUpdate = GroupMediaUpdate - self.Headers[header].SetActiveState = GroupSetActiveState - else - self.Headers[header] = self:SpawnGroupHeader(SVUI_UnitFrameParent, filter, "SVUI_"..realName, template1, header, template2) + if(header == "tank" or header == "assist") then + frame = self:SpawnGroupHeader(SVUI_UnitFrameParent, filter, "SVUI_"..realName, template1, header, template2) + frame.___key = header + frame.Update = self.HeaderUpdate[header] + frame.MediaUpdate = GroupMediaUpdate + else + frame = CreateFrame("Frame", "SVUI_"..realName, SVUI_UnitFrameParent, "SecureHandlerStateTemplate") + frame.subunits = {} + if db.customSorting then + if not frame.subunits[1] then + frame.subunits[1] = self:SpawnGroupHeader(frame, 1, "SVUI_" .. realName .. "Group1", template1, header, template2) + end + else + for i = 1, db.groupCount do + if(not frame.subunits[i]) then + frame.subunits[i] = self:SpawnGroupHeader(frame, i, "SVUI_" .. realName .. "Group"..i, template1, header, template2) + end + end + end + frame.___key = header; + frame.SetConfigEnvironment = GroupSetConfigEnvironment + frame.Update = GroupUpdate + frame.MediaUpdate = GroupMediaUpdate + frame.SetActiveState = GroupSetActiveState end - self.Headers[header]:Show() + frame:Show() + self.Headers[header] = frame end - local frame = self.Headers[header] - - if db.gCount then - local xname = frame.NameKey - realName = xname:gsub("(.)", upper, 1) + if(header == "tank" or header == "assist") then + frame:Update() + else if(db.enable ~= true and header ~= "raidpet") then UnregisterStateDriver(frame, "visibility") frame:Hide() return end - if db.rSort then - if not frame.subunits[1] then - frame.subunits[1] = MOD:SpawnGroupHeader(frame, 1, "SVUI_" .. realName .. "Group1", template1, nil, template2) - end - else - while db.gCount > #frame.subunits do - local index = tostring(#frame.subunits + 1) - tinsert(frame.subunits, MOD:SpawnGroupHeader(frame, index, "SVUI_" .. realName .. "Group"..index, template1, nil, template2)) - end - end - if frame.SetActiveState then frame:SetActiveState() end @@ -802,42 +777,30 @@ do frame:Update() end - if(db.enable ~= true and header == "raidpet") then + if(db.enable ~= true and header == "raidpet") then UnregisterStateDriver(frame, "visibility") frame:Hide() return end - else - frame.Update = AppendUpdateHandler(header) - - if forceUpdate then - self.HeaderUpdate[xname](MOD, frame, db) - else - frame.Update() - end end end end function MOD:FrameForge() - if not LoadedBasicFrames then - self:SetBasicFrame("player") - self:SetBasicFrame("pet") - self:SetBasicFrame("pettarget") - self:SetBasicFrame("target") - self:SetBasicFrame("targettarget") - self:SetBasicFrame("focus") - self:SetBasicFrame("focustarget") - LoadedBasicFrames = true; - end - - if not LoadedExtraFrames then - self:SetExtraFrame("boss", MAX_BOSS_FRAMES) - self:SetExtraFrame("arena", 5) - LoadedExtraFrames = true; - end - - if not LoadedGroupFrames then + if not LoadedUnitFrames then + self:SetUnitFrame("player") + self:SetUnitFrame("pet") + self:SetUnitFrame("pettarget") + self:SetUnitFrame("target") + self:SetUnitFrame("targettarget") + self:SetUnitFrame("focus") + self:SetUnitFrame("focustarget") + self:SetEnemyFrames("boss", MAX_BOSS_FRAMES) + self:SetEnemyFrames("arena", 5) + LoadedUnitFrames = true; + end + + if not LoadedGroupHeaders then self:SetGroupFrame("raid10") self:SetGroupFrame("raid25") self:SetGroupFrame("raid40") @@ -845,11 +808,11 @@ function MOD:FrameForge() self:SetGroupFrame("party", nil, "SVUI_UNITPET, SVUI_UNITTARGET") self:SetGroupFrame("tank", "MAINTANK", "SVUI_UNITTARGET") self:SetGroupFrame("assist", "MAINASSIST", "SVUI_UNITTARGET") - LoadedGroupFrames = true + LoadedGroupHeaders = true end - MOD:UnProtect("FrameForge"); - MOD:Protect("RefreshUnitFrames"); + self:UnProtect("FrameForge"); + self:Protect("RefreshUnitFrames"); end function MOD:KillBlizzardRaidFrames() @@ -899,7 +862,7 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:UpdateThisPackage() - self:RefreshUnitFrames() + --self:RefreshUnitFrames() end function MOD:ConstructThisPackage() @@ -908,16 +871,8 @@ function MOD:ConstructThisPackage() local SVUI_UnitFrameParent = CreateFrame("Frame", "SVUI_UnitFrameParent", SuperVillain.UIParent, "SecureHandlerStateTemplate") RegisterStateDriver(SVUI_UnitFrameParent, "visibility", "[petbattle] hide; show") - oUF_SuperVillain:RegisterStyle("oUF_SuperVillain", function(frame, unit) - frame:SetScript("OnEnter", UnitFrame_OnEnter) - frame:SetScript("OnLeave", UnitFrame_OnLeave) - frame:SetFrameLevel(2) - local frameName = unit - if(unit:find("arena")) then frameName = "arena" end - if(unit:find("boss")) then frameName = "boss" end - MOD.Construct[frameName](MOD, frame, unit); - return frame - end) + oUF_SuperVillain:RegisterStyle("SVUI_UnitFrame", StandardUnitStyle) + oUF_SuperVillain:RegisterStyle("SVUI_EnemyFrame", EnemyUnitStyle) self:Protect("FrameForge", true) self:RegisterEvent("PLAYER_ENTERING_WORLD") diff --git a/Interface/AddOns/SVUI/packages/unit/class/deathknight.lua b/Interface/AddOns/SVUI/packages/unit/class/deathknight.lua index 3e94076..2a9709f 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/deathknight.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/deathknight.lua @@ -61,8 +61,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.Runes; local max = self.MaxClassPower; local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/druid.lua b/Interface/AddOns/SVUI/packages/unit/class/druid.lua index b7c550a..59a9872 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/druid.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/druid.lua @@ -42,7 +42,6 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") -local LSM = LibStub("LibSharedMedia-3.0") --[[ ########################################################## DRUID ALT MANA @@ -86,7 +85,7 @@ local function CreateAltMana(playerFrame, eclipse) bar.bg.multiplier = 0.3; bar.Text = bar.ManaBar:CreateFontString(nil, "OVERLAY") bar.Text:SetAllPoints(bar.ManaBar) - bar.Text:SetFont(LSM:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + bar.Text:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) return bar end --[[ @@ -96,8 +95,7 @@ POSITIONING ]]-- local Reposition = function(self) local bar = self.EclipseBar - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player if not bar or not db then print("Error") return end local height = db.classbar.height local offset = (height - 10) @@ -307,8 +305,7 @@ local HideSmallPoint = function(self) end local RepositionCombo = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.target local bar = self.HyperCombo.CPoints; local max = MAX_COMBO_POINTS; local height = db.combobar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/mage.lua b/Interface/AddOns/SVUI/packages/unit/class/mage.lua index 3853f7d..b5c0f0e 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/mage.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/mage.lua @@ -48,8 +48,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.ArcaneChargeBar; local max = self.MaxClassPower; local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/monk.lua b/Interface/AddOns/SVUI/packages/unit/class/monk.lua index cf50de9..367cc84 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/monk.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/monk.lua @@ -48,8 +48,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.MonkHarmony; local max = self.MaxClassPower; local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/paladin.lua b/Interface/AddOns/SVUI/packages/unit/class/paladin.lua index ea6aad0..5430490 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/paladin.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/paladin.lua @@ -54,8 +54,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.HolyPower; local max = self.MaxClassPower; local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/priest.lua b/Interface/AddOns/SVUI/packages/unit/class/priest.lua index 639cab3..320b27f 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/priest.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/priest.lua @@ -49,8 +49,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.PriestOrbs; local max = self.MaxClassPower; local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/rogue.lua b/Interface/AddOns/SVUI/packages/unit/class/rogue.lua index ae04b01..1840f7e 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/rogue.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/rogue.lua @@ -67,8 +67,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.target local bar = self.HyperCombo.CPoints; local max = MAX_COMBO_POINTS; local height = db.combobar.height @@ -168,8 +167,7 @@ ROGUE COMBO TRACKER ########################################################## ]]-- local RepositionTracker = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.HyperCombo; if not db then return end local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/shaman.lua b/Interface/AddOns/SVUI/packages/unit/class/shaman.lua index 8eb7861..2fd1cb3 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/shaman.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/shaman.lua @@ -59,8 +59,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.TotemBars; local max = self.MaxClassPower; local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/class/warlock.lua b/Interface/AddOns/SVUI/packages/unit/class/warlock.lua index 453bf50..07dc459 100644 --- a/Interface/AddOns/SVUI/packages/unit/class/warlock.lua +++ b/Interface/AddOns/SVUI/packages/unit/class/warlock.lua @@ -76,8 +76,7 @@ POSITIONING ########################################################## ]]-- local Reposition = function(self) - local key = self.datakey - local db = MOD.db[key] + local db = MOD.db.player local bar = self.WarlockShards; local max = self.MaxClassPower; local height = db.classbar.height diff --git a/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua b/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua index e8ad6c7..f702abc 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua @@ -20,15 +20,10 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); local ELITE_TOP = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\ELITE-TOP]] local ELITE_BOTTOM = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\ELITE-BOTTOM]] local ELITE_RIGHT = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\ELITE-RIGHT]] - --- local STATUS_BG = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\STATUS-BG]] --- local STATUS_LEFT = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\STATUS-LEFT]] --- local STATUS_RIGHT = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\STATUS-RIGHT]] --[[ ########################################################## LOCAL FUNCTIONS @@ -198,7 +193,7 @@ local function CreateNameText(frame, unitName) db = MOD.db[unitName].name end local name = frame:CreateFontString(nil, "OVERLAY") - name:SetFont(LSM:Fetch("font", db.font), db.fontSize, db.fontOutline) + name:SetFont(SuperVillain.Shared:Fetch("font", db.font), db.fontSize, db.fontOutline) name:SetShadowOffset(2, -2) name:SetShadowColor(0, 0, 0, 1) if unitNmae == "target" then @@ -214,7 +209,6 @@ ACTIONPANEL / INFOPANEL ########################################################## ]]-- function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) - frame.datakey = unit if(unit and (unit == "target" or unit == "player")) then frame.ActionPanel = CreateActionPanel(frame, 3) frame.Threat = CreateThreat(frame.ActionPanel, unit) @@ -281,7 +275,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) if(not noHealthText) then frame.InfoPanel.Health = frame.InfoPanel:CreateFontString(nil, "OVERLAY") - frame.InfoPanel.Health:SetFont(LSM:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + frame.InfoPanel.Health:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) offset = reverse and 2 or -2; direction = reverse and "LEFT" or "RIGHT"; frame.InfoPanel.Health:Point(direction, frame.InfoPanel, direction, offset, 0) @@ -289,7 +283,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) if(not noPowerText) then frame.InfoPanel.Power = frame.InfoPanel:CreateFontString(nil, "OVERLAY") - frame.InfoPanel.Power:SetFont(LSM:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + frame.InfoPanel.Power:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) offset = reverse and -2 or 2; direction = reverse and "RIGHT" or "LEFT"; frame.InfoPanel.Power:Point(direction, frame.InfoPanel, direction, offset, 0) @@ -297,7 +291,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) if(not noMiscText) then frame.InfoPanel.Misc = frame.InfoPanel:CreateFontString(nil, "OVERLAY") - frame.InfoPanel.Misc:SetFont(LSM:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + frame.InfoPanel.Misc:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) frame.InfoPanel.Misc:Point("CENTER", frame, "CENTER", 0, 0) end diff --git a/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua b/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua index 5a004d6..d4af6ba 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua @@ -20,13 +20,13 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARIABLES ########################################################## ]]-- local tsort,floor,sub = table.sort, math.floor, string.sub; +local CustomBarFilter; --[[ ########################################################## BUILD FUNCTION @@ -71,80 +71,83 @@ local function ColorizeAuraBars(self) end end -local function CheckAuraFilter(setting, helpful) - local friend, enemy = false, false - if type(setting) == "boolean" then - friend = setting; - enemy = setting - elseif setting and type(setting) ~= "string" then - friend = setting.friendly; - enemy = setting.enemy +do + local function _test(setting, helpful) + local friend, enemy = false, false + if type(setting) == "boolean" then + friend = setting; + enemy = setting + elseif setting and type(setting) ~= "string" then + friend = setting.friendly; + enemy = setting.enemy + end + if (friend and helpful) or (enemy and not helpful) then + return true; + end + return false end - if (friend and helpful) or (enemy and not helpful) then - return true; - end - return false -end -local function AuraBarFilter(self, unit, name, _, _, _, debuffType, duration, _, unitCaster, isStealable, shouldConsolidate, spellID) - local key = self.datakey - if((not MOD.db[key]) or (MOD.db[key] and not MOD.db[key].aurabar) or (spellID == 65148)) then - return false; - end - local db = MOD.db[key].aurabar - local filtered = (unitCaster == "player" or unitCaster == "vehicle") and true or false; - local allowed = true; - local pass = false; - local friendly = UnitIsFriend("player", unit) == 1 and true or false; + CustomBarFilter = function(self, unit, name, _, _, _, debuffType, duration, _, unitCaster, isStealable, shouldConsolidate, spellID) + local db = MOD.db[self.db] + if((not db) or (db and not db.aurabar) or (spellID == 65148)) then + return false; + end + local barDB = db.aurabar + local filtered = (unitCaster == "player" or unitCaster == "vehicle") and true or false; + local allowed = true; + local pass = false; + local friendly = UnitIsFriend("player", unit) == 1 and true or false; - if CheckAuraFilter(db.filterPlayer, friendly) then - allowed = filtered; - pass = true - end - if CheckAuraFilter(db.filterDispellable, friendly) then - if (debuffType and not SuperVillain.Dispellable[debuffType]) or debuffType == nil then - filtered = false + if _test(barDB.filterPlayer, friendly) then + allowed = filtered; + pass = true end - pass = true - end - if CheckAuraFilter(db.filterRaid, friendly) then - if shouldConsolidate == 1 then filtered = false end - pass = true - end - if CheckAuraFilter(db.filterInfinite, friendly) then - if duration == 0 or not duration then - filtered = false + if _test(barDB.filterDispellable, friendly) then + if (debuffType and not SuperVillain.Dispellable[debuffType]) or debuffType == nil then + filtered = false + end + pass = true end - pass = true - end - if CheckAuraFilter(db.filterBlocked, friendly) then - local blackList = SuperVillain.Filters["Blocked"][name] - if blackList and blackList.enable then filtered = false end - pass = true - end - if CheckAuraFilter(db.filterAllowed, friendly) then - local whiteList = SuperVillain.Filters["Allowed"][name] - if whiteList and whiteList.enable then - filtered = true - elseif not pass then - filtered = false + if _test(barDB.filterRaid, friendly) then + if shouldConsolidate == 1 then filtered = false end + pass = true end - pass = true - end - if db.useFilter and SuperVillain.Filters[db.useFilter] then - local spellsDB = SuperVillain.Filters[db.useFilter]; - if db.useFilter ~= "Blocked" then - if spellsDB[name] and spellsDB[name].enable and allowed then + if _test(barDB.filterInfinite, friendly) then + if duration == 0 or not duration then + filtered = false + end + pass = true + end + if _test(barDB.filterBlocked, friendly) then + local blackList = SuperVillain.Filters["Blocked"][name] + if blackList and blackList.enable then filtered = false end + pass = true + end + if _test(barDB.filterAllowed, friendly) then + local whiteList = SuperVillain.Filters["Allowed"][name] + if whiteList and whiteList.enable then filtered = true elseif not pass then - filtered = false + filtered = false + end + pass = true + end + local active = barDB.useFilter + if active and SuperVillain.Filters[active] then + local spellsDB = SuperVillain.Filters[active]; + if active ~= "Blocked" then + if spellsDB[name] and spellsDB[name].enable and allowed then + filtered = true + elseif not pass then + filtered = false + end + elseif spellsDB[name] and spellsDB[name].enable then + filtered = false end - elseif spellsDB[name] and spellsDB[name].enable then - filtered = false end - end - return filtered -end + return filtered + end +end --[[ ########################################################## UTILITY @@ -152,15 +155,16 @@ UTILITY ]]-- function MOD:CreateAuraBarHeader(frame, unitName) local auraBarParent = CreateFrame("Frame", nil, frame) + auraBarParent.db = unitName auraBarParent.parent = frame; auraBarParent.PostCreateBar = PostCreateAuraBars; auraBarParent.gap = 1; auraBarParent.spacing = 1; auraBarParent.spark = true; - auraBarParent.filter = AuraBarFilter; + auraBarParent.filter = CustomBarFilter; auraBarParent.PostUpdate = ColorizeAuraBars; - auraBarParent.barTexture = LSM:Fetch("statusbar", MOD.db.auraBarStatusbar) - auraBarParent.textFont = LSM:Fetch("font", MOD.db.auraFont) + auraBarParent.barTexture = SuperVillain.Shared:Fetch("statusbar", MOD.db.auraBarStatusbar) + auraBarParent.textFont = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) auraBarParent.textSize = MOD.db.auraFontSize auraBarParent.textOutline = MOD.db.auraFontOutline return auraBarParent diff --git a/Interface/AddOns/SVUI/packages/unit/common/auras.lua b/Interface/AddOns/SVUI/packages/unit/common/auras.lua index 35faa04..8702495 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/auras.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/auras.lua @@ -49,7 +49,6 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH"s FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); local CustomAuraFilter; local AURA_FONT = [[Interface\AddOns\SVUI\assets\fonts\Display.ttf]]; @@ -242,23 +241,22 @@ do end CustomAuraFilter = function(self, unit, icon, name, _, _, _, debuffType, duration, _, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossAura) - local key = self.datakey - if((not MOD.db[key]) or (spellID == 65148)) then + local auraDB = MOD.db[self.db] + if((not auraDB) or (spellID == 65148)) then return false; end local auraType = self.type; - if(not auraType or not MOD.db[key][auraType]) then return true end; + if(not auraType) then return true end; local isPlayer, friendly; - local db = MOD.db[key][auraType] local filtered = true; local allowed = true; local pass = false; local isPlayer = caster == "player"or caster == "vehicle" local friendly = UnitIsFriend("player", unit) == 1 and true or false; - local filterType = friendly and db.friendlyAuraType or db.enemyAuraType; + local filterType = friendly and auraDB.friendlyAuraType or auraDB.enemyAuraType; icon.isPlayer = isPlayer; icon.owner = caster; icon.name = name; @@ -267,35 +265,35 @@ do if shieldSpell and shieldSpell.enable then icon.priority = shieldSpell.priority end - if _test(db.filterPlayer, friendly) then + if _test(auraDB.filterPlayer, friendly) then if isPlayer then filtered = true else filtered = false end allowed = filtered; pass = true end - if _test(db.filterDispellable, friendly) then + if _test(auraDB.filterDispellable, friendly) then if (auraType == "buffs" and not isStealable) or (auraType == "debuffs" and debuffType and not SuperVillain.Dispellable[debuffType]) or debuffType == nil then filtered = false end pass = true end - if _test(db.filterRaid, friendly) then + if _test(auraDB.filterRaid, friendly) then if shouldConsolidate == 1 then filtered = false end pass = true end - if _test(db.filterInfinite, friendly)then + if _test(auraDB.filterInfinite, friendly)then if duration == 0 or not duration then filtered = false end pass = true end - if _test(db.useBlocked, friendly) then + if _test(auraDB.useBlocked, friendly) then local blackListSpell = SuperVillain.Filters["Blocked"][name] if blackListSpell and blackListSpell.enable then filtered = false end pass = true end - if _test(db.useAllowed, friendly) then + if _test(auraDB.useAllowed, friendly) then local whiteListSpell = SuperVillain.Filters["Allowed"][name] if whiteListSpell and whiteListSpell.enable then filtered = true; @@ -305,14 +303,14 @@ do end pass = true end - - if db.useFilter and SuperVillain.Filters[db.useFilter] then - local spellDB = SuperVillain.Filters[db.useFilter]; - if db.useFilter ~= "Blocked" then + local active = auraDB.useFilter + if active and SuperVillain.Filters[active] then + local spellDB = SuperVillain.Filters[active]; + if active ~= "Blocked" then if spellDB[name] and spellDB[name].enable and allowed then filtered = true; icon.priority = spellDB[name].priority; - if db.useFilter == "Shield" and (spellID == 86698 or spellID == 86669) then + if active == "Shield" and (spellID == 86698 or spellID == 86669) then filtered = false end elseif not pass then @@ -330,39 +328,39 @@ end BUILD FUNCTION ########################################################## ]]-- -function MOD:CreateBuffs(frame) +function MOD:CreateBuffs(frame, unit) local aura = CreateFrame("Frame", nil, frame) - aura.datakey = frame.datakey + aura.db = unit aura.spacing = 2; aura.PostCreateIcon = PostCreateAuraIcon; aura.PostUpdateIcon = PostUpdateAuraIcon; aura.CustomFilter = CustomAuraFilter; aura:SetFrameLevel(10) aura.type = "buffs" - aura.textFont = LSM:Fetch("font", MOD.db.auraFont) + aura.textFont = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) aura.textSize = MOD.db.auraFontSize aura.textOutline = MOD.db.auraFontOutline return aura end -function MOD:CreateDebuffs(frame) +function MOD:CreateDebuffs(frame, unit) local aura = CreateFrame("Frame", nil, frame) - aura.datakey = frame.datakey + aura.db = unit aura.spacing = 2; aura.PostCreateIcon = PostCreateAuraIcon; aura.PostUpdateIcon = PostUpdateAuraIcon; aura.CustomFilter = CustomAuraFilter; aura.type = "debuffs" aura:SetFrameLevel(10) - aura.textFont = LSM:Fetch("font", MOD.db.auraFont) + aura.textFont = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) aura.textSize = MOD.db.auraFontSize aura.textOutline = MOD.db.auraFontOutline return aura end -function MOD:CreateAuraWatch(frame) +function MOD:CreateAuraWatch(frame, unit) local aWatch = CreateFrame("Frame", nil, frame) - aWatch.datakey = frame.datakey + aWatch.db = unit aWatch:SetFrameLevel(frame:GetFrameLevel() + 25) aWatch:FillInner(frame.Health) aWatch.presentAlpha = 1; @@ -374,8 +372,7 @@ end function MOD:SmartAuraDisplay() local unit = self.unit; - local key = self.datakey - local db = MOD.db[key]; + local db = MOD.db[unit]; if not db or not db.smartAuraDisplay or db.smartAuraDisplay == 'DISABLED' or not UnitExists(unit) then return end local buffs = self.Buffs; local debuffs = self.Debuffs; @@ -429,7 +426,8 @@ local temp = {} function MOD:UpdateAuraWatch(frame, override) local AW = frame.AuraWatch; local unit = frame.unit - local key = frame.datakey + local key = frame.___key + if not MOD.db[key] then return end local db = MOD.db[key].buffIndicator; if not db then return end if not db.enable then @@ -563,7 +561,7 @@ function MOD:UpdateAuraWatch(frame, override) watchedAura.count:SetPoint("CENTER", unpack(counterOffsets[temp[i].point])) end - local fontFile = LSM:Fetch("font", MOD.db.auraFont) + local fontFile = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) local fontSize = MOD.db.auraFontSize local fontOutline = MOD.db.auraFontOutline diff --git a/Interface/AddOns/SVUI/packages/unit/common/castbar.lua b/Interface/AddOns/SVUI/packages/unit/common/castbar.lua index f6ebcaa..8d054c2 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/castbar.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/castbar.lua @@ -47,7 +47,6 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARIABLES diff --git a/Interface/AddOns/SVUI/packages/unit/common/health.lua b/Interface/AddOns/SVUI/packages/unit/common/health.lua index 91a076e..2b14a46 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/health.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/health.lua @@ -33,14 +33,12 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL FUNCTIONS ########################################################## ]]-- local HEALTH_ANIM_FILE = [[Interface\Addons\SVUI\assets\artwork\Unitframe\UNIT-HEALTH-ANIMATION]]; -local DEAD_MODEL_FILE = [[Spells\Monk_travelingmist_missile.m2]]; local Anim_OnUpdate = function(self) local parent = self.parent @@ -212,22 +210,6 @@ local CustomUpdate = function(self, event, unit) if self.isForced then local current = random(1,max) health:SetValue(-current) - end - - local portrait = self.Portrait - if(portrait and portrait:IsObjectType'Model') then - if(UnitIsDeadOrGhost(unit) and not portrait.isdead) then - portrait:SetCamDistanceScale(1) - portrait:SetPortraitZoom(0) - portrait:SetPosition(4,-1,1) - portrait:ClearModel() - portrait:SetModel(DEAD_MODEL_FILE) - portrait.isdead = true - portrait.guid = nil - elseif(not UnitIsDeadOrGhost(unit) and portrait.isdead == true) then - portrait.isdead = nil - MOD.Update3DPortrait(self, event, unit) - end end end @@ -310,22 +292,6 @@ local Update = function(self, event, unit) if(db.gridMode) then health:SetOrientation("VERTICAL") end - - local portrait = self.Portrait - if(portrait and portrait:IsObjectType'Model') then - if(UnitIsDeadOrGhost(unit) and not portrait.isdead) then - portrait:SetCamDistanceScale(1) - portrait:SetPortraitZoom(0) - portrait:SetPosition(4,-1,1) - portrait:ClearModel() - portrait:SetModel(DEAD_MODEL_FILE) - portrait.isdead = true - portrait.guid = nil - elseif(not UnitIsDeadOrGhost(unit) and portrait.isdead == true) then - portrait.isdead = nil - MOD.Update3DPortrait(self, event, unit) - end - end end --[[ ########################################################## @@ -371,18 +337,10 @@ function MOD:CreateHealthBar(frame, hasbg, reverse) return healthBar end -function MOD:RefreshHealthBar(frame) - local key = frame.datakey - local db = MOD.db[key] - if(db and db.portrait) then - db = db.portrait - local useOverlayHealth = (db.enable and db.overlay); - if useOverlayHealth then - frame.Health:SetStatusBarTexture(SuperVillain.Media.bar.default) - frame.Health.Override = CustomUpdate; - else - frame.Health:SetStatusBarTexture(LSM:Fetch("statusbar", MOD.db.statusbar)) - frame.Health.Override = Update; - end +function MOD:RefreshHealthBar(frame, overlay) + if(overlay) then + frame.Health.Override = CustomUpdate; + else + frame.Health.Override = Update; end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/common/misc.lua b/Interface/AddOns/SVUI/packages/unit/common/misc.lua index d4ed8b6..a47f453 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/misc.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/misc.lua @@ -20,7 +20,6 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARIABLES @@ -125,34 +124,21 @@ function MOD:CreateRaidIcon(frame) return rIcon end -function MOD:CreateRoleIcon(frame) - local parent = frame.InfoPanel or frame; - local rIconHolder = CreateFrame("Frame", nil, parent) - rIconHolder:SetAllPoints() - local rIcon = rIconHolder:CreateTexture(nil, "ARTWORK", nil, 2) - rIcon:Size(14) - rIcon:Point("BOTTOMRIGHT", rIconHolder, "BOTTOMRIGHT") - rIcon.Override = MOD.UpdateRoleIcon; - frame:RegisterEvent("UNIT_CONNECTION", MOD.UpdateRoleIcon) - return rIcon -end - -function MOD:UpdateRoleIcon() - local lfd = self.LFDRole - local key = self.datakey +local UpdateRoleIcon = function(self) + local key = self.___key local db = MOD.db[key] - if not db or not db.icons then return end - local db = db.icons.roleIcon; - if(not db or (db and not db.enable)) then lfd:Hide()return end + if(not db or not db.icons or (db.icons and not db.icons.roleIcon)) then return end + local lfd = self.LFDRole + if(not db.icons.roleIcon.enable) then lfd:Hide() return end local unitRole = UnitGroupRolesAssigned(self.unit) - if self.isForced and unitRole == "NONE"then + if(self.isForced and unitRole == "NONE") then local rng = random(1, 3) unitRole = rng == 1 and "TANK" or rng == 2 and "HEALER" or rng == 3 and "DAMAGER" end - if(unitRole ~= "NONE" and (self.isForced or UnitIsConnected(self.unit))) then + if(unitRole ~= "NONE" and (self.isForced or UnitIsConnected(self.unit))) then local coords = ROLE_ICON_DATA[unitRole] lfd:SetTexture(ROLE_ICON_FILE) - if(lfd:GetHeight() <= 13) then + if(lfd:GetHeight() <= 13) then lfd:SetTexCoord(coords[5], coords[6], coords[7], coords[8]) else lfd:SetTexCoord(coords[1], coords[2], coords[3], coords[4]) @@ -163,12 +149,24 @@ function MOD:UpdateRoleIcon() end end +function MOD:CreateRoleIcon(frame) + local parent = frame.InfoPanel or frame; + local rIconHolder = CreateFrame("Frame", nil, parent) + rIconHolder:SetAllPoints() + local rIcon = rIconHolder:CreateTexture(nil, "ARTWORK", nil, 2) + rIcon:Size(14) + rIcon:Point("BOTTOMRIGHT", rIconHolder, "BOTTOMRIGHT") + rIcon.Override = UpdateRoleIcon; + frame:RegisterEvent("UNIT_CONNECTION", UpdateRoleIcon) + return rIcon +end + function MOD:CreateRaidRoleFrames(frame) local parent = frame.InfoPanel or frame; local raidRoles = CreateFrame("Frame", nil, frame) raidRoles:Size(24, 12) raidRoles:Point("TOPLEFT", frame.ActionPanel, "TOPLEFT", -2, 4) - raidRoles:SetFrameLevel(parent:GetFrameLevel() + 50) + raidRoles:SetFrameLevel(parent:GetFrameLevel() + 50) frame.Leader = raidRoles:CreateTexture(nil, "OVERLAY") frame.Leader:Size(12, 12) @@ -194,7 +192,7 @@ function MOD:RaidRoleUpdate() local leaderIcon = frame.Leader; local looterIcon = frame.MasterLooter; if not leaderIcon or not looterIcon then return end - local key = frame.datakey; + local key = frame.___key; local db = MOD.db[key]; local leaderShown = leaderIcon:IsShown() local looterShown = looterIcon:IsShown() diff --git a/Interface/AddOns/SVUI/packages/unit/common/portrait.lua b/Interface/AddOns/SVUI/packages/unit/common/portrait.lua index 66fc13d..2d4f98c 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/portrait.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/portrait.lua @@ -20,50 +20,78 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARIABLES ########################################################## ]]-- --- local MYSTERY_MODEL_FILE = [[Spells\Blackmagic_precast_base.m2]]; --- local MYSTERY_MODEL_FILE = [[Spells\Crow_baked.m2]]; -local WORKING_MODEL_FILE = [[Spells\Monk_travelingmist_missile.m2]]; --- local WORKING_MODEL_FILE = [[Spells\monsterlure01.m2]]; --- local WORKING_MODEL_FILE = [[interface\buttons\talktome_gears.m2]]; --- local DEAD_MODEL_FILE = [[creature\Ghostlyskullpet\ghostlyskullpet.m2]]; --- local DEAD_MODEL_FILE = [[creature\ghost\ghost.m2]]; +-- local MISSING_MODEL_FILE = [[Spells\Blackmagic_precast_base.m2]]; +-- local MISSING_MODEL_FILE = [[Spells\Crow_baked.m2]]; +-- local MISSING_MODEL_FILE = [[Spells\monsterlure01.m2]]; +-- local MISSING_MODEL_FILE = [[interface\buttons\talktome_gears.m2]]; +-- local MISSING_MODEL_FILE = [[creature\Ghostlyskullpet\ghostlyskullpet.m2]]; +-- local MISSING_MODEL_FILE = [[creature\ghost\ghost.m2]]; +local MISSING_MODEL_FILE = [[Spells\Monk_travelingmist_missile.m2]]; --[[ ########################################################## UPDATE ########################################################## ]]-- -local function UpdatePortraitColors(portrait, unit) - local r,g,b = 0.25,0.25,0.25 - if (UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then - r,g,b = 0.5,0.5,0.5 - elseif not UnitIsPlayer(unit)then - local unitReact = oUF_SuperVillain.colors.reaction[UnitReaction(unit,"player")] - if(unitReact ~= nil) then - r,g,b = unitReact[1], unitReact[2], unitReact[3] - end; - else - local unitClass = select(2,UnitClass(unit)) - if unitClass then - r,g,b = unpack(oUF_SuperVillain.colors.class[unitClass]) - end - end - portrait:SetBackdropColor(r,g,b) - if portrait.UpdateColor then - portrait:UpdateColor(r,g,b) - end -end; - -local UpdatePortrait = function(self, event, unit) +local Update2DPortrait = function(self, event, unit) if(not unit or not UnitIsUnit(self.unit, unit)) then return end local portrait = self.Portrait SetPortraitTexture(portrait, unit) end + +local Update3DPortrait = function(self, event, unit) + if(not unit or not UnitIsUnit(self.unit, unit)) then return end + local portrait = self.Portrait + if(not portrait:IsObjectType'Model') then return; end + local guid = UnitGUID(unit) + local camera = portrait.UserCamDistance or 1 + local rotate = portrait.UserRotation + if(not UnitExists(unit) or not UnitIsConnected(unit) or not UnitIsVisible(unit)) then + portrait:SetCamDistanceScale(1) + portrait:SetPortraitZoom(0) + portrait:SetPosition(4,-1,1) + portrait:ClearModel() + portrait:SetModel(MISSING_MODEL_FILE) + portrait.guid = nil + portrait:SetBackdropColor(0.25,0.25,0.25) + if portrait.UpdateColor then + portrait:UpdateColor(0.25,0.25,0.25) + end + elseif(portrait.guid ~= guid or event == 'UNIT_MODEL_CHANGED') then + portrait:SetCamDistanceScale(camera) + portrait:SetPortraitZoom(1) + portrait:SetPosition(0,0,0) + portrait:ClearModel() + portrait:SetUnit(unit) + portrait.guid = guid + + if(rotate and portrait:GetFacing() ~= rotate / 60) then + portrait:SetFacing(rotate / 60) + end + + local r, g, b, color = 0.25, 0.25, 0.25 + if not UnitIsPlayer(unit)then + color = oUF_SuperVillain.colors.reaction[UnitReaction(unit,"player")] + if(color ~= nil) then + r,g,b = color[1], color[2], color[3] + end; + else + local _,unitClass = UnitClass(unit) + if unitClass then + color = oUF_SuperVillain.colors.class[unitClass] + r,g,b = color[1], color[2], color[3] + end + end + portrait:SetBackdropColor(r,g,b) + if portrait.UpdateColor then + portrait:UpdateColor(r,g,b) + end + end +end --[[ ########################################################## BUILD FUNCTION @@ -110,44 +138,10 @@ function MOD:CreatePortrait(frame,smallUnit,isPlayer) portrait2D.overlay = overlay; -- Set Updates - portrait2D.Override = UpdatePortrait - portrait3D.Override = MOD.Update3DPortrait + portrait2D.Override = Update2DPortrait + portrait3D.Override = Update3DPortrait -- Assign To Frame frame.PortraitModel = portrait3D; frame.PortraitTexture = portrait2D; -end; - -function MOD:Update3DPortrait(event, unit) - if(not unit or not UnitIsUnit(self.unit, unit)) then return end - local portrait = self.Portrait - if(not portrait:IsObjectType'Model') then return; end - local guid = UnitGUID(unit) - local camera = portrait.UserCamDistance or 1 - local rotate = portrait.UserRotation - if(not UnitExists(unit) or not UnitIsConnected(unit) or not UnitIsVisible(unit) or (unit ~= "player" and UnitIsDeadOrGhost(unit))) then - portrait:SetCamDistanceScale(1) - portrait:SetPortraitZoom(0) - portrait:SetPosition(4,-1,1) - portrait:ClearModel() - portrait:SetModel(WORKING_MODEL_FILE) - portrait.guid = nil - else - portrait.isdead = nil - portrait:SetAlpha(1) - if(portrait.guid ~= guid or event == 'UNIT_MODEL_CHANGED') then - portrait:SetCamDistanceScale(camera) - portrait:SetPortraitZoom(1) - portrait:SetPosition(0,0,0) - portrait:ClearModel() - portrait:SetUnit(unit) - portrait.guid = guid - - if(rotate and portrait:GetFacing() ~= rotate / 60) then - portrait:SetFacing(rotate / 60) - end; - end - - end - UpdatePortraitColors(portrait, unit) end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/common/power.lua b/Interface/AddOns/SVUI/packages/unit/common/power.lua index e8831b8..a62e8b7 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/power.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/power.lua @@ -20,7 +20,6 @@ local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARIABLES @@ -73,7 +72,7 @@ BUILD FUNCTION function MOD:CreatePowerBar(frame, bg) local power = CreateFrame("StatusBar", nil, frame) power:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) - power:SetPanelTemplate("Inset") + power:SetPanelTemplate("Bar") if bg then power.bg = power:CreateTexture(nil, "BORDER") power.bg:SetAllPoints() @@ -89,13 +88,13 @@ end function MOD:CreateAltPowerBar(frame) local altPower = CreateFrame("StatusBar", nil, frame) altPower:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) - altPower:SetPanelTemplate("Inset") + altPower:SetPanelTemplate("Bar") altPower:GetStatusBarTexture():SetHorizTile(false) altPower:SetFrameStrata("MEDIUM") altPower.text = altPower:CreateFontString(nil, "OVERLAY") altPower.text:SetPoint("CENTER") altPower.text:SetJustifyH("CENTER") - altPower.text:SetFont(LSM:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + altPower.text:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) altPower.PostUpdate = PostUpdateAltPower; return altPower end @@ -107,8 +106,7 @@ UPDATE local function PowerUpdateNamePosition(frame, unit) local panel = frame.InfoPanel if(not panel.Power or (panel.Power and not panel.Power:IsShown()) or not panel.Name) then return end - local key = frame.datakey - local db = MOD.db[key] + local db = MOD.db[unit] local parent = panel.Name:GetParent() if UnitIsPlayer(unit)then local point = db.name.position; @@ -123,6 +121,7 @@ local function PowerUpdateNamePosition(frame, unit) end function MOD:PostUpdatePower(unit, value, max) + local db = MOD.db[unit] local powerType, _, _, _, _ = UnitPowerType(unit) local parent = self:GetParent() if parent.isForced then @@ -143,9 +142,7 @@ function MOD:PostUpdatePower(unit, value, max) if not colors then return end self:SetStatusBarColor(colors[1], colors[2], colors[3]) self.bg:SetVertexColor(colors[1] * mult, colors[2] * mult, colors[3] * mult) - local key = parent.datakey - local db = MOD.db[key] if db and db.power and db.power.hideonnpc then PowerUpdateNamePosition(parent, unit) - end + end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/common/secure.lua b/Interface/AddOns/SVUI/packages/unit/common/secure.lua index 269ec0e..762b3e3 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/secure.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/secure.lua @@ -119,10 +119,10 @@ local function ChangeGroupIndex(self) if not self:IsShown() then return end local max = MAX_RAID_MEMBERS; - local key = self.NameKey + local key = self.___key local db = MOD.db[key] - local newIndex = db.rSort and -(min(db.gCount * (db.gRowCol * 5), max) + 1 ) or -4; + local newIndex = db.customSorting and -(min(db.groupCount * (db.gRowCol * 5), max) + 1 ) or -4; if self:GetAttribute("startingIndex") ~= newIndex then self:SetAttribute("startingIndex", newIndex) self.isForced = true; @@ -137,10 +137,10 @@ CORE FUNCTIONS function MOD:SwapElement(unit, numGroup) if InCombatLockdown()then return end for i=1, numGroup do - local unitName = unitGroup..i - local frame = self.Units[unit] + local unitName = unit..i + local frame = self.Units[unitName] if(frame) then - if frame.isForced then + if(not frame.isForced) then self:AllowElement(frame) else self:RestrictElement(frame) @@ -159,7 +159,8 @@ function MOD:UpdateGroupConfig(headerFrame, setForced) if InCombatLockdown()then return end SetProxyEnv() - + local key = headerFrame.___key + local db = MOD.db[key] headerFrame.forceShow = setForced; headerFrame.forceShowAuras = setForced; headerFrame.isForced = setForced; @@ -179,8 +180,6 @@ function MOD:UpdateGroupConfig(headerFrame, setForced) setfenv(func, fenv) definedEnvs[func] = nil end - local key = headerFrame.NameKey - local db = MOD.db[key] RegisterStateDriver(headerFrame, "visibility", db.visibility) headerFrame:GetScript("OnEvent")(headerFrame, "PLAYER_ENTERING_WORLD") end diff --git a/Interface/AddOns/SVUI/packages/unit/common/unique.lua b/Interface/AddOns/SVUI/packages/unit/common/unique.lua index 99643e9..1a4cc6c 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/unique.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/unique.lua @@ -15,7 +15,6 @@ S U P E R - V I L L A I N - U I By: Munglunch # --]] local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.Registry:Expose('SVUnit'); -local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## LOCAL VARS diff --git a/Interface/AddOns/SVUI/packages/unit/frames/_load.xml b/Interface/AddOns/SVUI/packages/unit/frames/_load.xml index 2769f90..41dc39e 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames/_load.xml +++ b/Interface/AddOns/SVUI/packages/unit/frames/_load.xml @@ -1,17 +1,11 @@