From df5bf995a17f4c9a272c0fc53401d33db7b4ef66 Mon Sep 17 00:00:00 2001 From: Steven Jackson Date: Mon, 5 Jan 2015 18:43:04 -0600 Subject: [PATCH] 5.4.156 --- .../Plugins/oUF_Combatant/oUF_Combatant.lua | 191 ------------ .../Plugins/oUF_Combatant/oUF_Combatant.toc | 9 - .../Plugins/oUF_Conqueror/oUF_Conqueror.lua | 88 ++++++ .../Plugins/oUF_DruidMana/oUF_DruidMana.lua | 140 --------- .../Plugins/oUF_DruidMana/oUF_DruidMana.toc | 10 - .../Plugins/oUF_Druidness/oUF_Druidness.lua | 327 ++++++++++++++++++++ .../Plugins/oUF_Druidness/oUF_Druidness.toc | 10 + .../Plugins/oUF_Gladiator/oUF_Gladiator.lua | 191 ++++++++++++ .../Plugins/oUF_Gladiator/oUF_Gladiator.toc | 9 + .../Plugins/oUF_HunterTraps/oUF_HunterTraps.lua | 2 +- .../Plugins/oUF_HyperCombo/.subl97d.tmp | 207 +++++++++++++ .../Plugins/oUF_HyperCombo/oUF_HyperCombo.lua | 101 ++---- .../Plugins/oUF_MainTank/oUF_MainTank.lua | 69 ----- .../Plugins/oUF_Necromancy/oUF_Necromancy.lua | 115 +++++++ .../oUF_WarlockShards/oUF_WarlockShards.lua | 142 +++++---- .../SVUI/libs/oUF_Villain/oUF/elements/cpoints.lua | 77 ----- .../libs/oUF_Villain/oUF/elements/druidmana.lua | 114 ------- .../libs/oUF_Villain/oUF/elements/eclipsebar.lua | 144 --------- .../libs/oUF_Villain/oUF/elements/maintank.lua | 69 +++++ .../SVUI/libs/oUF_Villain/oUF/elements/runebar.lua | 164 ---------- .../SVUI/libs/oUF_Villain/oUF/elements/stagger.lua | 140 --------- .../SVUI/libs/oUF_Villain/oUF/elements/totems.lua | 133 -------- .../AddOns/SVUI/libs/oUF_Villain/oUF_Villain.xml | 16 +- .../SVUI/packages/quest/components/scenario.lua | 2 +- Interface/AddOns/SVUI/packages/unit/SVUnit.lua | 8 +- .../AddOns/SVUI/packages/unit/elements/misc.lua | 2 +- Interface/AddOns/SVUI/packages/unit/frames.lua | 76 +---- .../SVUI/packages/unit/resources/deathknight.lua | 33 +- .../AddOns/SVUI/packages/unit/resources/druid.lua | 304 +++++++----------- .../AddOns/SVUI/packages/unit/resources/rogue.lua | 197 ++++-------- .../SVUI/packages/unit/resources/warlock.lua | 258 +++++---------- Interface/AddOns/SVUI/setup/presets.lua | 28 +- 32 files changed, 1423 insertions(+), 1953 deletions(-) delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Conqueror/oUF_Conqueror.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.toc create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.lua create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.toc create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.lua create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.toc create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/.subl97d.tmp delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Necromancy/oUF_Necromancy.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/cpoints.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/druidmana.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/eclipsebar.lua create mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/maintank.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/runebar.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/stagger.lua delete mode 100644 Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/totems.lua diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua deleted file mode 100644 index 833d224..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua +++ /dev/null @@ -1,191 +0,0 @@ ---GLOBAL NAMESPACE -local _G = _G; ---LUA -local unpack = _G.unpack; -local select = _G.select; -local assert = _G.assert; -local error = _G.error; -local print = _G.print; -local pairs = _G.pairs; -local next = _G.next; -local tostring = _G.tostring; -local setmetatable = _G.setmetatable; ---STRING -local string = _G.string; -local format = string.format; ---MATH -local math = _G.math; -local floor = math.floor -local ceil = math.ceil ---BLIZZARD API -local GetTime = _G.GetTime; -local CreateFrame = _G.CreateFrame; -local UnitIsEnemy = _G.UnitIsEnemy; -local UnitGUID = _G.UnitGUID; -local IsActiveBattlefieldArena = _G.IsActiveBattlefieldArena; -local UnitFactionGroup = _G.UnitFactionGroup; -local GetNumArenaOpponentSpecs = _G.GetNumArenaOpponentSpecs; -local GetArenaOpponentSpec = _G.GetArenaOpponentSpec; -local GetSpecializationInfoByID = _G.GetSpecializationInfoByID; -local UnitName = _G.UnitName; -local SendChatMessage = _G.SendChatMessage; -local CooldownFrame_SetTimer = _G.CooldownFrame_SetTimer; - -local _, ns = ... -local oUF = ns.oUF - -local trinketSpells = { - [59752] = 120, - [42292] = 120, - [7744] = 45, -} - -local timeLeft = 0 -local Trinket_OnUpdate = function(self, elapsed) - local expires = (self.duration - (GetTime() - self.start)); - if(expires == 0) then - local parent = self:GetParent() - parent.Icon:SetDesaturated(false) - parent.Unavailable:Hide() - self:SetScript("OnUpdate", nil) - end -end - -local function GetPVPIcons(unit, frameID) - local _, trinket, badge - local unitFactionGroup = UnitFactionGroup(unit) - if unitFactionGroup == "Horde" then - trinket, badge = [[Interface\Icons\INV_Jewelry_TrinketPVP_02]], [[Interface\Icons\INV_BannerPVP_01]] - elseif unitFactionGroup == "Alliance" then - trinket, badge = [[Interface\Icons\INV_Jewelry_TrinketPVP_01]], [[Interface\Icons\INV_BannerPVP_02]] - else - trinket, badge = [[Interface\Icons\INV_MISC_QUESTIONMARK]], [[Interface\Icons\INV_MISC_QUESTIONMARK]] - end - if(frameID) then - local numOpps = GetNumArenaOpponentSpecs() - local specID = GetArenaOpponentSpec(frameID) - if((numOpps > 0) and specID) then - _, _, _, badge = GetSpecializationInfoByID(specID) - end - end - return trinket, badge -end - -local function LogUpdate(self, event, ...) - local arenaMatch = IsActiveBattlefieldArena() - local element = self.Combatant - local trinket = element.Trinket - local alert = element.Alert - if not arenaMatch then trinket:Hide() return end - trinket:Show() - if(event == "COMBAT_LOG_EVENT_UNFILTERED") then - local _, eventType, _, sourceGUID, _, _, _, _, _, _, _, spellID = ... - if eventType == "SPELL_CAST_SUCCESS" and sourceGUID == UnitGUID(self.unit) and trinketSpells[spellID] then - local startTime = GetTime() - local duration = trinketSpells[spellID] - trinket.CD.start = startTime - trinket.CD.duration = duration - trinket.CD.nextUpdate = 0 - trinket.CD:SetScript("OnUpdate", Trinket_OnUpdate) - trinket.Icon:SetDesaturated(true) - trinket.Unavailable:Show() - CooldownFrame_SetTimer(trinket.CD, startTime, duration, 1) - end - elseif(alert and event == "UNIT_SPELLCAST_SUCCEEDED") then - local unitID, spellName, _, _, spellID = ... - if UnitIsEnemy("player", unitID) and (spellID == 118358 or spellID == 104270 or spellName:find("Drink")) then - SendChatMessage(("%s is drinking."):format(UnitName(self.unit)), "RAID_WARNING") - end - end -end - -local Update = function(self, event, ...) - local unit, unitType = ... - if(event == "COMBAT_LOG_EVENT_UNFILTERED" or event == "UNIT_SPELLCAST_SUCCEEDED") then return LogUpdate(self, event, ...) end - if(not unit or unit ~= self.unit) then return end - local element = self.Combatant - local trinket = element.Trinket - local badge = element.Badge - local arenaMatch = IsActiveBattlefieldArena() - local frameID = arenaMatch and self:GetID() - local tIcon, bIcon = GetPVPIcons(unit, frameID) - if(badge) then badge.Icon:SetTexture(bIcon) end - if(trinket) then - if(not arenaMatch) then trinket:Hide() return end - trinket.Icon:SetTexture(tIcon) - trinket:Show() - if event == 'PLAYER_ENTERING_WORLD' then - CooldownFrame_SetTimer(trinket.CD, 1, 1, 1) - end - end -end - -local Enable = function(self, unit) - --if(not unit:match("arena%d")) then return end - local element = self.Combatant - - if(element) then - local trinket = element.Trinket - local badge = element.Badge - self:RegisterEvent("ARENA_OPPONENT_UPDATE", Update) - self:RegisterEvent("PLAYER_ENTERING_WORLD", Update) - - if(trinket) then - self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", Update) - self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", Update) - if not trinket.CD then - trinket.CD = CreateFrame("Cooldown", nil, trinket, "CooldownFrameTemplate") - trinket.CD:SetAllPoints(trinket) - end - - if not trinket.Icon then - trinket.Icon = trinket:CreateTexture(nil, "BORDER") - trinket.Icon:SetAllPoints(trinket) - trinket.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - trinket.Icon:SetTexture([[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]]) - end - - if not trinket.Unavailable then - trinket.Unavailable = trinket:CreateTexture(nil, "OVERLAY") - trinket.Unavailable:SetAllPoints(trinket) - trinket.Unavailable:SetTexCoord(0.1, 0.9, 0.1, 0.9) - trinket.Unavailable:SetTexture([[Interface\BUTTONS\UI-GroupLoot-Pass-Up]]) - end - trinket:Show() - end - - if(badge) then - self:RegisterEvent("ARENA_PREP_OPPONENT_SPECIALIZATIONS", Update) - if not badge.Icon then - badge.Icon = badge:CreateTexture(nil, "OVERLAY") - badge.Icon:SetAllPoints(badge) - badge.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - badge.Icon:SetTexture([[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]]) - end - badge:Show() - end - - return true - end -end - -local Disable = function(self) - local element = self.Combatant - local trinket = element.Trinket - local badge = element.Badge - if(trinket or badge) then - self:UnregisterEvent("ARENA_OPPONENT_UPDATE", Update) - self:UnregisterEvent("PLAYER_ENTERING_WORLD", Update) - if trinket then - self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED", Update) - self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED", Update) - trinket:Hide() - end - if badge then - self:UnregisterEvent("ARENA_PREP_OPPONENT_SPECIALIZATIONS", Update) - badge:Hide() - end - end -end - -oUF:AddElement('Combatant', Update, Enable, Disable) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc deleted file mode 100644 index 7b7c819..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 50001 -## Title: oUF Combatant -## Notes: Adds PvP trinket status and spec icons to oUF frames. -## Author: Munglunch -## Version: 5.4.15 -## X-Category: oUF -## Dependencies: oUF - -oUF_Combatant.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Conqueror/oUF_Conqueror.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Conqueror/oUF_Conqueror.lua new file mode 100644 index 0000000..1d6cdaa --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Conqueror/oUF_Conqueror.lua @@ -0,0 +1,88 @@ +if(select(2, UnitClass('player')) ~= 'WARRIOR') then return end +--GLOBAL NAMESPACE +local _G = _G; +--LUA +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +--BLIZZARD API +local UnitDebuff = _G.UnitDebuff; + +local parent, ns = ... +local oUF = ns.oUF + +local RAGE_AURAS = {} + +local function getRageAmount() + for i = 1, 40 do + local _, _, _, _, _, _, _, _, _, _, spellID, _, _, _, amount = + UnitDebuff("player", i) + if RAGE_AURAS[spellID] then + return amount + end + end + return 0 +end + +local OnUpdate = function(self, elapsed) + local duration = self.duration + elapsed + if(duration >= self.max) then + return self:SetScript("OnUpdate", nil) + else + self.duration = duration + return self:SetValue(duration) + end +end + +local Update = function(self, event, unit) + if(unit and unit ~= self.unit) then return end + local bar = self.Conqueror + if(bar.PreUpdate) then bar:PreUpdate(event) end + + local value = getRageAmount() + + if(value) then + bar:SetMinMaxValues(0, 100) + bar:SetValue(value) + bar:Update() + end + + if(bar.PostUpdate) then + return bar:PostUpdate(event) + end +end + +local Path = function(self, ...) + return (self.Conqueror.Override or Update)(self, ...) +end + +local ForceUpdate = function(element) + return Path(element.__owner, 'ForceUpdate') +end + +local Enable = function(self) + local bar = self.Conqueror + + if(bar) then + bar.__owner = self + bar.ForceUpdate = ForceUpdate + + self:RegisterEvent('UNIT_AURA', Path, true) + + if(bar:IsObjectType'Texture' and not bar:GetTexture()) then + bar:SetTexture[[Interface\TargetingFrame\UI-StatusBar]] + end + + return true + end +end + +local Disable = function(self) + local bar = self.Conqueror + + if (bar) then + self:UnregisterEvent('UNIT_AURA', Path) + end +end + +oUF:AddElement('Conqueror', Path, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua deleted file mode 100644 index 51e925a..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua +++ /dev/null @@ -1,140 +0,0 @@ ---GLOBAL NAMESPACE -local _G = _G; ---LUA -local unpack = _G.unpack; -local select = _G.select; -local assert = _G.assert; -local error = _G.error; -local print = _G.print; -local pairs = _G.pairs; -local next = _G.next; -local tostring = _G.tostring; -local type = _G.type; ---STRING -local string = _G.string; -local format = string.format; ---MATH -local math = _G.math; -local floor = math.floor -local ceil = math.ceil ---TABLE -local table = _G.table; -local wipe = _G.wipe; ---BLIZZARD API -local BEAR_FORM = _G.BEAR_FORM; -local CAT_FORM = _G.CAT_FORM; -local SPELL_POWER_MANA = _G.SPELL_POWER_MANA; -local UnitClass = _G.UnitClass; -local UnitPower = _G.UnitPower; -local UnitReaction = _G.UnitReaction; -local UnitPowerMax = _G.UnitPowerMax; -local UnitIsPlayer = _G.UnitIsPlayer; -local UnitPlayerControlled = _G.UnitPlayerControlled; -local GetShapeshiftFormID = _G.GetShapeshiftFormID; - -if(select(2, UnitClass('player')) ~= 'DRUID') then return end - -local _, ns = ... -local oUF = ns.oUF or oUF - -local UPDATE_VISIBILITY = function(self, event) - local druidmana = self.DruidAltMana - -- check form - local form = GetShapeshiftFormID() - local min, max = druidmana.ManaBar:GetMinMaxValues() - - if druidmana.ManaBar:GetValue() == max then - druidmana:Hide() - elseif (form == BEAR_FORM or form == CAT_FORM) then - druidmana:Show() - else - druidmana:Hide() - end - - if(druidmana.PostUpdateVisibility) then - return druidmana:PostUpdateVisibility(self.unit) - end -end - -local UNIT_POWER = function(self, event, unit, powerType) - if(self.unit ~= unit) then return end - local druidmana = self.DruidAltMana - - if not (druidmana.ManaBar) then return end - - if(druidmana.PreUpdate) then - druidmana:PreUpdate(unit) - end - local min, max = UnitPower('player', SPELL_POWER_MANA), UnitPowerMax('player', SPELL_POWER_MANA) - - druidmana.ManaBar:SetMinMaxValues(0, max) - druidmana.ManaBar:SetValue(min) - - local r, g, b, t - if(druidmana.colorPower) then - t = self.colors.power["MANA"] - elseif(druidmana.colorClass and UnitIsPlayer(unit)) or - (druidmana.colorClassNPC and not UnitIsPlayer(unit)) or - (druidmana.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then - local _, class = UnitClass(unit) - t = self.colors.class[class] - elseif(druidmana.colorReaction and UnitReaction(unit, 'player')) then - t = self.colors.reaction[UnitReaction(unit, "player")] - elseif(druidmana.colorSmooth) then - r, g, b = self.ColorGradient(min / max, unpack(druidmana.smoothGradient or self.colors.smooth)) - end - - if(t) then - r, g, b = t[1], t[2], t[3] - end - - if(b) then - druidmana.ManaBar:SetStatusBarColor(r, g, b) - - local bg = druidmana.bg - if(bg) then - local mu = bg.multiplier or 1 - bg:SetVertexColor(r * mu, g * mu, b * mu) - end - end - - UPDATE_VISIBILITY(self) - - if(druidmana.PostUpdatePower) then - return druidmana:PostUpdatePower(unit, min, max) - end -end - -local Update = function(self, ...) - UNIT_POWER(self, ...) - return UPDATE_VISIBILITY(self, ...) -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate') -end - -local Enable = function(self, unit) - local druidmana = self.DruidAltMana - if(druidmana and unit == 'player') then - druidmana.__owner = self - druidmana.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_POWER', UNIT_POWER) - self:RegisterEvent('UNIT_MAXPOWER', UNIT_POWER) - self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY) - - return true - end -end - -local Disable = function(self) - local druidmana = self.DruidAltMana - if(druidmana) then - self:UnregisterEvent('UNIT_POWER', UNIT_POWER) - self:UnregisterEvent('UNIT_MAXPOWER', UNIT_POWER) - self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY) - end -end - -oUF:AddElement("DruidAltMana", Update, Enable, Disable) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.toc deleted file mode 100644 index 744e176..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.toc +++ /dev/null @@ -1,10 +0,0 @@ -## Interface: 40100 -## Title: oUF Druid Mana -## Notes: Adds Druid Mana Bar to oUF. -## Author: SV -## Version: 1.0 -## X-Category: UnitFrame -## Dependencies: oUF - -oUF_DruidMana.lua - diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.lua new file mode 100644 index 0000000..236bbfe --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.lua @@ -0,0 +1,327 @@ +if(select(2, UnitClass('player')) ~= 'DRUID') then return end +--GLOBAL NAMESPACE +local _G = _G; +--LUA +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +local error = _G.error; +local print = _G.print; +local pairs = _G.pairs; +local next = _G.next; +local tostring = _G.tostring; +local type = _G.type; +--STRING +local string = _G.string; +local format = string.format; +--MATH +local math = _G.math; +local floor = math.floor +local ceil = math.ceil +--TABLE +local table = _G.table; +local wipe = _G.wipe; +--BLIZZARD API +local BEAR_FORM = _G.BEAR_FORM; +local CAT_FORM = _G.CAT_FORM; +local SPELL_POWER_MANA = _G.SPELL_POWER_MANA; +local UnitClass = _G.UnitClass; +local UnitPower = _G.UnitPower; +local UnitReaction = _G.UnitReaction; +local UnitPowerMax = _G.UnitPowerMax; +local UnitIsPlayer = _G.UnitIsPlayer; +local UnitPlayerControlled = _G.UnitPlayerControlled; +local GetShapeshiftFormID = _G.GetShapeshiftFormID; + +local _, ns = ... +local oUF = ns.oUF or oUF + +local ECLIPSE_BAR_SOLAR_BUFF_ID = _G.ECLIPSE_BAR_SOLAR_BUFF_ID +local ECLIPSE_BAR_LUNAR_BUFF_ID = _G.ECLIPSE_BAR_LUNAR_BUFF_ID +local SPELL_POWER_ECLIPSE = _G.SPELL_POWER_ECLIPSE +local MOONKIN_FORM = _G.MOONKIN_FORM +local ALERTED = false; +local TextColors = { + [1]={1,0.1,0.1}, + [2]={1,0.5,0.1}, + [3]={1,1,0.1}, + [4]={0.5,1,0.1}, + [5]={0.1,1,0.1} +}; + +local function FivePointsAlarm(points) + if not CombatText_AddMessage then return end + if(points == 5 and not ALERTED) then + CombatText_AddMessage("5 Points", CombatText_StandardScroll, 0.1, 0.5, 1, "crit") + ALERTED = true + elseif(ALERTED and points < 5) then + ALERTED = false + end +end + +local UPDATE_VISIBILITY = function(self, event) + local bar = self.Druidness + local chicken = bar.Chicken + local cat = bar.Cat + local mana = bar.Mana + + -- check form/mastery + local form = GetShapeshiftFormID() + + if mana.ManaBar:GetValue() < UnitPowerMax('player', SPELL_POWER_MANA) then + mana:Show() + else + mana:Hide() + end + + if(not form) then + local ptt = GetSpecialization() + if(ptt and ptt == 1) then -- player has balance spec + chicken:Show() + else + chicken:Hide() + end + cat:Hide() + elseif(form == MOONKIN_FORM) then + chicken:Show() + mana:Hide() + cat:Hide() + elseif (form == BEAR_FORM or form == CAT_FORM) then + chicken:Hide() + if(form == CAT_FORM) then + cat:Show() + else + cat:Hide() + end + else + chicken:Hide() + cat:Hide() + end + + if(bar.PostUpdateVisibility) then + return bar:PostUpdateVisibility(self.unit) + end +end + +local UNIT_POWER = function(self, event, unit, powerType) + if(self.unit ~= unit) then return end + local bar = self.Druidness + local chicken = bar.Chicken + local mana = bar.Mana + + if(chicken:IsShown() or powerType == 'ECLIPSE') then + local power = UnitPower('player', SPELL_POWER_ECLIPSE) + local maxPower = UnitPowerMax('player', SPELL_POWER_ECLIPSE) + + if(chicken.LunarBar) then + chicken.LunarBar:SetMinMaxValues(-maxPower, maxPower) + chicken.LunarBar:SetValue(power) + end + + if(chicken.SolarBar) then + chicken.SolarBar:SetMinMaxValues(-maxPower, maxPower) + chicken.SolarBar:SetValue(power * -1) + end + + if(chicken.PostUpdatePower) then + return chicken:PostUpdatePower(unit) + end + end + + if not (mana.ManaBar) then return end + + if(mana.PreUpdate) then + mana:PreUpdate(unit) + end + local min, max = UnitPower('player', SPELL_POWER_MANA), UnitPowerMax('player', SPELL_POWER_MANA) + + mana.ManaBar:SetMinMaxValues(0, max) + mana.ManaBar:SetValue(min) + + local r, g, b, t + if(mana.colorPower) then + t = self.colors.power["MANA"] + elseif(mana.colorClass and UnitIsPlayer(unit)) or + (mana.colorClassNPC and not UnitIsPlayer(unit)) or + (mana.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then + local _, class = UnitClass(unit) + t = self.colors.class[class] + elseif(mana.colorReaction and UnitReaction(unit, 'player')) then + t = self.colors.reaction[UnitReaction(unit, "player")] + elseif(mana.colorSmooth) then + r, g, b = self.ColorGradient(min / max, unpack(mana.smoothGradient or self.colors.smooth)) + end + + if(t) then + r, g, b = t[1], t[2], t[3] + end + + if(b) then + mana.ManaBar:SetStatusBarColor(r, g, b) + + local bg = mana.bg + if(bg) then + local mu = bg.multiplier or 1 + bg:SetVertexColor(r * mu, g * mu, b * mu) + end + end + + UPDATE_VISIBILITY(self) + + if(mana.PostUpdatePower) then + return mana:PostUpdatePower(unit, min, max) + end +end + +local UNIT_AURA = function(self, event, unit) + if((not unit) or (unit and self.unit ~= unit)) then return end + local bar = self.Druidness + local chicken = bar.Chicken + local mana = bar.Mana + + if(chicken and chicken:IsShown()) then + local i = 1 + local hasSolarEclipse, hasLunarEclipse + repeat + local _, _, _, _, _, _, _, _, _, _, spellID = UnitAura(unit, i, 'HELPFUL') + + if(spellID == ECLIPSE_BAR_SOLAR_BUFF_ID) then + hasSolarEclipse = true + elseif(spellID == ECLIPSE_BAR_LUNAR_BUFF_ID) then + hasLunarEclipse = true + end + + i = i + 1 + until not spellID + chicken.hasSolarEclipse = hasSolarEclipse + chicken.hasLunarEclipse = hasLunarEclipse + end + + if(bar.PostUnitAura) then + return bar:PostUnitAura(unit) + end +end + +local ECLIPSE_DIRECTION_CHANGE = function(self, event, status) + local bar = self.Druidness + local chicken = bar.Chicken + + if(status and chicken:IsVisible() and chicken.PostDirectionChange[status]) then + return chicken.PostDirectionChange[status](chicken) + end +end + +local UPDATE_POINTS = function(self, event, unit) + if(unit == 'pet') then return end + local bar = self.Druidness; + local cpoints = bar.Cat; + + if(bar.PreUpdate) then + bar:PreUpdate() + end + + local current = 0 + if(UnitHasVehicleUI'player') then + current = GetComboPoints('vehicle', 'target') + else + current = GetComboPoints('player', 'target') + end + + if(cpoints) then + for i=1, MAX_COMBO_POINTS do + if(i <= current) then + cpoints[i]:Show() + if(bar.PointShow) then + bar.PointShow(cpoints[i]) + end + else + cpoints[i]:Hide() + if(bar.PointHide) then + bar.PointHide(cpoints[i], i) + end + end + end + end + + if((GetShapeshiftForm() == 3) and (current > 0)) then + FivePointsAlarm(current) + end + + if(bar.PostUpdate) then + return bar:PostUpdate(current) + end +end + +local Update = function(self, ...) + UNIT_POWER(self, ...) + UNIT_AURA(self, ...) + UPDATE_POINTS(self, ...) + return UPDATE_VISIBILITY(self, ...) +end + +local ForceUpdate = function(element) + return Update(element.__owner, 'ForceUpdate', element.__owner.unit, 'ECLIPSE') +end + +local function Enable(self) + local bar = self.Druidness + + if(bar) then + local chicken = bar.Chicken + local mana = bar.Mana + chicken.__owner = self + chicken.ForceUpdate = ForceUpdate + + if(chicken.LunarBar and chicken.LunarBar:IsObjectType'StatusBar' and not chicken.LunarBar:GetStatusBarTexture()) then + chicken.LunarBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) + end + if(chicken.SolarBar and chicken.SolarBar:IsObjectType'StatusBar' and not chicken.SolarBar:GetStatusBarTexture()) then + chicken.SolarBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) + end + + local power = UnitPower('player', SPELL_POWER_ECLIPSE) + local maxPower = UnitPowerMax('player', SPELL_POWER_ECLIPSE) + + if(chicken.LunarBar) then + chicken.LunarBar:SetMinMaxValues(-maxPower, maxPower) + chicken.LunarBar:SetValue(power) + end + + if(chicken.SolarBar) then + chicken.SolarBar:SetMinMaxValues(-maxPower, maxPower) + chicken.SolarBar:SetValue(power * -1) + end + + self:RegisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE, true) + self:RegisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY, true) + self:RegisterEvent('UNIT_AURA', UNIT_AURA) + self:RegisterEvent('UNIT_POWER', UNIT_POWER) + self:RegisterEvent('UNIT_MAXPOWER', UNIT_POWER) + self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY, true) + self:RegisterEvent('UNIT_COMBO_POINTS', UPDATE_POINTS, true) + self:RegisterEvent('PLAYER_TARGET_CHANGED', UPDATE_POINTS, true) + UPDATE_VISIBILITY(self) + return true + end +end + +local function Disable(self) + local bar = self.Druidness + + if(bar) then + local chicken = bar.Chicken + local mana = bar.Mana + chicken:Hide() + mana:Hide() + self:UnregisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE) + self:UnregisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY) + self:UnregisterEvent('UNIT_AURA', UNIT_AURA) + self:UnregisterEvent('UNIT_POWER', UNIT_POWER) + self:UnregisterEvent('UNIT_MAXPOWER', UNIT_POWER) + self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY) + self:UnregisterEvent('UNIT_COMBO_POINTS', UPDATE_POINTS) + self:UnregisterEvent('PLAYER_TARGET_CHANGED', UPDATE_POINTS) + end +end + +oUF:AddElement('BoomChicken', Update, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.toc new file mode 100644 index 0000000..7cf64a9 --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Druidness/oUF_Druidness.toc @@ -0,0 +1,10 @@ +## Interface: 40100 +## Title: oUF Druidness +## Notes: Adds All the Druid Things! +## Author: SV +## Version: 1.0 +## X-Category: UnitFrame +## Dependencies: oUF + +oUF_Druidness.lua + diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.lua new file mode 100644 index 0000000..8ff98c0 --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.lua @@ -0,0 +1,191 @@ +--GLOBAL NAMESPACE +local _G = _G; +--LUA +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +local error = _G.error; +local print = _G.print; +local pairs = _G.pairs; +local next = _G.next; +local tostring = _G.tostring; +local setmetatable = _G.setmetatable; +--STRING +local string = _G.string; +local format = string.format; +--MATH +local math = _G.math; +local floor = math.floor +local ceil = math.ceil +--BLIZZARD API +local GetTime = _G.GetTime; +local CreateFrame = _G.CreateFrame; +local UnitIsEnemy = _G.UnitIsEnemy; +local UnitGUID = _G.UnitGUID; +local IsActiveBattlefieldArena = _G.IsActiveBattlefieldArena; +local UnitFactionGroup = _G.UnitFactionGroup; +local GetNumArenaOpponentSpecs = _G.GetNumArenaOpponentSpecs; +local GetArenaOpponentSpec = _G.GetArenaOpponentSpec; +local GetSpecializationInfoByID = _G.GetSpecializationInfoByID; +local UnitName = _G.UnitName; +local SendChatMessage = _G.SendChatMessage; +local CooldownFrame_SetTimer = _G.CooldownFrame_SetTimer; + +local _, ns = ... +local oUF = ns.oUF + +local trinketSpells = { + [59752] = 120, + [42292] = 120, + [7744] = 45, +} + +local timeLeft = 0 +local Trinket_OnUpdate = function(self, elapsed) + local expires = (self.duration - (GetTime() - self.start)); + if(expires == 0) then + local parent = self:GetParent() + parent.Icon:SetDesaturated(false) + parent.Unavailable:Hide() + self:SetScript("OnUpdate", nil) + end +end + +local function GetPVPIcons(unit, frameID) + local _, trinket, badge + local unitFactionGroup = UnitFactionGroup(unit) + if unitFactionGroup == "Horde" then + trinket, badge = [[Interface\Icons\INV_Jewelry_TrinketPVP_02]], [[Interface\Icons\INV_BannerPVP_01]] + elseif unitFactionGroup == "Alliance" then + trinket, badge = [[Interface\Icons\INV_Jewelry_TrinketPVP_01]], [[Interface\Icons\INV_BannerPVP_02]] + else + trinket, badge = [[Interface\Icons\INV_MISC_QUESTIONMARK]], [[Interface\Icons\INV_MISC_QUESTIONMARK]] + end + if(frameID) then + local numOpps = GetNumArenaOpponentSpecs() + local specID = GetArenaOpponentSpec(frameID) + if((numOpps > 0) and specID) then + _, _, _, badge = GetSpecializationInfoByID(specID) + end + end + return trinket, badge +end + +local function LogUpdate(self, event, ...) + local arenaMatch = IsActiveBattlefieldArena() + local element = self.Gladiator + local trinket = element.Trinket + local alert = element.Alert + if not arenaMatch then trinket:Hide() return end + trinket:Show() + if(event == "COMBAT_LOG_EVENT_UNFILTERED") then + local _, eventType, _, sourceGUID, _, _, _, _, _, _, _, spellID = ... + if eventType == "SPELL_CAST_SUCCESS" and sourceGUID == UnitGUID(self.unit) and trinketSpells[spellID] then + local startTime = GetTime() + local duration = trinketSpells[spellID] + trinket.CD.start = startTime + trinket.CD.duration = duration + trinket.CD.nextUpdate = 0 + trinket.CD:SetScript("OnUpdate", Trinket_OnUpdate) + trinket.Icon:SetDesaturated(true) + trinket.Unavailable:Show() + CooldownFrame_SetTimer(trinket.CD, startTime, duration, 1) + end + elseif(alert and event == "UNIT_SPELLCAST_SUCCEEDED") then + local unitID, spellName, _, _, spellID = ... + if UnitIsEnemy("player", unitID) and (spellID == 118358 or spellID == 104270 or spellName:find("Drink")) then + SendChatMessage(("%s is drinking."):format(UnitName(self.unit)), "RAID_WARNING") + end + end +end + +local Update = function(self, event, ...) + local unit, unitType = ... + if(event == "COMBAT_LOG_EVENT_UNFILTERED" or event == "UNIT_SPELLCAST_SUCCEEDED") then return LogUpdate(self, event, ...) end + if(not unit or unit ~= self.unit) then return end + local element = self.Gladiator + local trinket = element.Trinket + local badge = element.Badge + local arenaMatch = IsActiveBattlefieldArena() + local frameID = arenaMatch and self:GetID() + local tIcon, bIcon = GetPVPIcons(unit, frameID) + if(badge) then badge.Icon:SetTexture(bIcon) end + if(trinket) then + if(not arenaMatch) then trinket:Hide() return end + trinket.Icon:SetTexture(tIcon) + trinket:Show() + if event == 'PLAYER_ENTERING_WORLD' then + CooldownFrame_SetTimer(trinket.CD, 1, 1, 1) + end + end +end + +local Enable = function(self, unit) + --if(not unit:match("arena%d")) then return end + local element = self.Gladiator + + if(element) then + local trinket = element.Trinket + local badge = element.Badge + self:RegisterEvent("ARENA_OPPONENT_UPDATE", Update) + self:RegisterEvent("PLAYER_ENTERING_WORLD", Update) + + if(trinket) then + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", Update) + self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", Update) + if not trinket.CD then + trinket.CD = CreateFrame("Cooldown", nil, trinket, "CooldownFrameTemplate") + trinket.CD:SetAllPoints(trinket) + end + + if not trinket.Icon then + trinket.Icon = trinket:CreateTexture(nil, "BORDER") + trinket.Icon:SetAllPoints(trinket) + trinket.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + trinket.Icon:SetTexture([[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]]) + end + + if not trinket.Unavailable then + trinket.Unavailable = trinket:CreateTexture(nil, "OVERLAY") + trinket.Unavailable:SetAllPoints(trinket) + trinket.Unavailable:SetTexCoord(0.1, 0.9, 0.1, 0.9) + trinket.Unavailable:SetTexture([[Interface\BUTTONS\UI-GroupLoot-Pass-Up]]) + end + trinket:Show() + end + + if(badge) then + self:RegisterEvent("ARENA_PREP_OPPONENT_SPECIALIZATIONS", Update) + if not badge.Icon then + badge.Icon = badge:CreateTexture(nil, "OVERLAY") + badge.Icon:SetAllPoints(badge) + badge.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + badge.Icon:SetTexture([[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]]) + end + badge:Show() + end + + return true + end +end + +local Disable = function(self) + local element = self.Gladiator + local trinket = element.Trinket + local badge = element.Badge + if(trinket or badge) then + self:UnregisterEvent("ARENA_OPPONENT_UPDATE", Update) + self:UnregisterEvent("PLAYER_ENTERING_WORLD", Update) + if trinket then + self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED", Update) + self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED", Update) + trinket:Hide() + end + if badge then + self:UnregisterEvent("ARENA_PREP_OPPONENT_SPECIALIZATIONS", Update) + badge:Hide() + end + end +end + +oUF:AddElement('Gladiator', Update, Enable, Disable) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.toc new file mode 100644 index 0000000..3679662 --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Gladiator/oUF_Gladiator.toc @@ -0,0 +1,9 @@ +## Interface: 50001 +## Title: oUF Gladiator +## Notes: Adds PvP trinket status and spec icons to oUF frames. +## Author: Munglunch +## Version: 5.4.15 +## X-Category: oUF +## Dependencies: oUF + +oUF_Gladiator.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua index 15fafd8..efda33a 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua @@ -96,7 +96,7 @@ local Update = function(self, event, ...) if(bar.PreUpdate) then bar:PreUpdate(event) end - local name, start, duration; + local name, start, duration, isReady; local unit, _, _, _, spellID = ... if(unit and (self.unit ~= unit)) then return diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/.subl97d.tmp b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/.subl97d.tmp new file mode 100644 index 0000000..e1ada29 --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/.subl97d.tmp @@ -0,0 +1,207 @@ +--GLOBAL NAMESPACE +local _G = _G; +--LUA +local unpack = _G.unpack; +local select = _G.select; + +local class = select(2, UnitClass("player")); +if(class ~= "ROGUE" and class ~= "DRUID") then return end; + +local assert = _G.assert; +local error = _G.error; +local print = _G.print; +local pairs = _G.pairs; +local next = _G.next; +local tostring = _G.tostring; +local type = _G.type; +--STRING +local string = _G.string; +local format = string.format; +--MATH +local math = _G.math; +local floor = math.floor +local ceil = math.ceil +--TABLE +local table = _G.table; +local wipe = _G.wipe; +--BLIZZARD API +local GetShapeshiftForm = _G.GetShapeshiftForm; +local UnitHasVehicleUI = _G.UnitHasVehicleUI; +local UnitBuff = _G.UnitBuff; +local CombatText_AddMessage = _G.CombatText_AddMessage; +local CombatText_StandardScroll = _G.CombatText_StandardScroll; +local MAX_COMBO_POINTS = _G.MAX_COMBO_POINTS; +local GetSpellInfo = _G.GetSpellInfo; +local GetComboPoints = _G.GetComboPoints; + +local parent, ns = ... +local oUF = ns.oUF + +local GUILE1 = GetSpellInfo(84745) +local GUILE2 = GetSpellInfo(84746) +local GUILE3 = GetSpellInfo(84747) +local ANTICIPATION = GetSpellInfo(115189) +local ALERTED = false +local TextColors = { + [1]={1,0.1,0.1}, + [2]={1,0.5,0.1}, + [3]={1,1,0.1}, + [4]={0.5,1,0.1}, + [5]={0.1,1,0.1} +}; + +local function UpdateGuile() + local _, _, _, one = UnitBuff("player", GUILE1, nil, "HELPFUL") + local _, _, _, two = UnitBuff("player", GUILE2, nil, "HELPFUL") + local _, _, _, three = UnitBuff("player", GUILE3, nil, "HELPFUL") + if one or two or three then + if one then return 1; end + if two then return 2; end + if three then return 3; end + else + return 0; + end +end + +local function FivePointsAlarm(points) + if not CombatText_AddMessage then return end + if(points == 5 and not ALERTED) then + CombatText_AddMessage("5 Points", CombatText_StandardScroll, 0.1, 0.5, 1, "crit") + ALERTED = true + elseif(ALERTED and points < 5) then + ALERTED = false + end +end + +local Update = function(self, event, unit) + if(unit == 'pet') then return end + local bar = self.HyperCombo; + local cpoints = bar.Combo; + local tracker = bar.Tracking; + + if(bar.PreUpdate) then + bar:PreUpdate() + end + + local current = 0 + if(UnitHasVehicleUI'player') then + current = GetComboPoints('vehicle', 'target') + else + current = GetComboPoints('player', 'target') + end + + if(class == "ROGUE") then + local anti = select(4, UnitBuff("player", ANTICIPATION)) -- Anticipation stacks + + if(cpoints) then + for i=1, MAX_COMBO_POINTS do + if(i <= current) then + cpoints[i]:Show() + if(bar.PointShow) then + bar.PointShow(cpoints[i]) + end + else + cpoints[i]:Hide() + if(bar.PointHide) then + bar.PointHide(cpoints[i], i) + end + end + if(i <= anti) then + cpoints[i].Anticipation:Show() + else + cpoints[i].Anticipation:Hide() + end + end + end + + local guile = bar.Guile; + if(guile) then + local insight = UpdateGuile() + if(insight and insight > 0) then + guile.Text:SetText(insight) + guile.Text:SetTextColor(unpack(TextColors[insight])) + else + guile.Text:SetText("") + end + end + + if(current > 0) then + FivePointsAlarm(current) + end + else + if(cpoints) then + for i=1, MAX_COMBO_POINTS do + if(i <= current) then + cpoints[i]:Show() + if(bar.PointShow) then + bar.PointShow(cpoints[i]) + end + else + cpoints[i]:Hide() + if(bar.PointHide) then + bar.PointHide(cpoints[i], i) + end + end + end + end + + if((GetShapeshiftForm() == 3) and (current > 0)) then + FivePointsAlarm(current) + end + end + + if(bar.PostUpdate) then + return bar:PostUpdate(current) + end +end + +local Path = function(self, ...) + return (self.HyperCombo.Override or Update) (self, ...) +end + +local ForceUpdate = function(element) + return Path(element.__owner, 'ForceUpdate', element.__owner.unit) +end + +local Enable = function(self) + local bar = self.HyperCombo + if(bar) then + bar.__owner = self + bar.ForceUpdate = ForceUpdate + bar.EXISTING_COMBO_POINTS = 0 + bar.LAST_COMBO_POINTS = 0 + + self:RegisterEvent('UNIT_COMBO_POINTS', Path, true) + self:RegisterEvent('PLAYER_TARGET_CHANGED', Path, true) + self:RegisterEvent('UNIT_AURA', Path, true) + + local cpoints = bar.Combo; + if(cpoints) then + for index = 1, MAX_COMBO_POINTS do + local cpoint = cpoints[index] + if(cpoint:IsObjectType'Texture' and not cpoint:GetTexture()) then + cpoint:SetTexture[[Interface\ComboFrame\ComboPoint]] + cpoint:SetTexCoord(0, 0.375, 0, 1) + end + end + end + return true + end +end + +local Disable = function(self) + local bar = self.HyperCombo + if(bar) then + local cpoints = bar.Combo; + if(cpoints) then + for index = 1, MAX_COMBO_POINTS do + cpoints[index]:Hide() + end + end + self:UnregisterEvent('UNIT_COMBO_POINTS', Path) + self:UnregisterEvent('PLAYER_TARGET_CHANGED', Path) + self:UnregisterEvent('UNIT_AURA', Path) + end +end + +oUF:AddElement('HyperCombo', Path, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua index 99c60be..bc55667 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua @@ -3,6 +3,10 @@ local _G = _G; --LUA local unpack = _G.unpack; local select = _G.select; + +local class = select(2, UnitClass("player")); +if(class ~= "ROGUE") then return end; + local assert = _G.assert; local error = _G.error; local print = _G.print; @@ -30,9 +34,6 @@ local MAX_COMBO_POINTS = _G.MAX_COMBO_POINTS; local GetSpellInfo = _G.GetSpellInfo; local GetComboPoints = _G.GetComboPoints; -local class = select(2, UnitClass("player")); -if(class ~= "ROGUE" and class ~= "DRUID") then return end - local parent, ns = ... local oUF = ns.oUF @@ -62,21 +63,20 @@ local function UpdateGuile() end end -local function FivePointsAlarm(frame, points) +local function FivePointsAlarm(points) if not CombatText_AddMessage then return end - if(points == 5 and not frame.ALERTED) then + if(points == 5 and not ALERTED) then CombatText_AddMessage("5 Points", CombatText_StandardScroll, 0.1, 0.5, 1, "crit") - frame.ALERTED = true - elseif(frame.ALERTED and points < 5) then - frame.ALERTED = false + ALERTED = true + elseif(ALERTED and points < 5) then + ALERTED = false end end local Update = function(self, event, unit) if(unit == 'pet') then return end local bar = self.HyperCombo; - local cpoints = bar.CPoints; - local tracker = bar.Tracking; + local cpoints = bar.Combo; if(bar.PreUpdate) then bar:PreUpdate() @@ -89,6 +89,8 @@ local Update = function(self, event, unit) current = GetComboPoints('player', 'target') end + local anti = select(4, UnitBuff("player", ANTICIPATION)) -- Anticipation stacks + if(cpoints) then for i=1, MAX_COMBO_POINTS do if(i <= current) then @@ -102,56 +104,29 @@ local Update = function(self, event, unit) bar.PointHide(cpoints[i], i) end end + if(anti) then + if(i <= anti) then + cpoints[i].Anticipation:Show() + else + cpoints[i].Anticipation:Hide() + end + end end end - if(class == "ROGUE") then - if(tracker) then - if(current > 0) then - tracker.Text:SetText(current) - tracker.Text:SetTextColor(unpack(TextColors[current])) - FivePointsAlarm(tracker, current) - else - tracker.Text:SetText("0") - tracker.Text:SetTextColor(0.3,0.3,0.3) - end + local guile = bar.Guile; + if(guile) then + local insight = UpdateGuile() + if(insight and insight > 0) then + guile.Text:SetText(insight) + guile.Text:SetTextColor(unpack(TextColors[insight])) + else + guile.Text:SetText("") end + end - local anticipation = bar.Anticipation; - if(anticipation) then - local anti = select(4, UnitBuff("player", ANTICIPATION)) -- Anticipation stacks - if(anti and anti > 0) then - anticipation.Text:SetText(anti) - anticipation.Text:SetTextColor(unpack(TextColors[anti])) - else - anticipation.Text:SetText("") - end - end - local guile = bar.Guile; - if(guile) then - local insight = UpdateGuile() - if(insight and insight > 0) then - guile.Text:SetText(insight) - guile.Text:SetTextColor(unpack(TextColors[insight])) - else - guile.Text:SetText("") - end - end - else - if(tracker) then - if(GetShapeshiftForm() == 3) then - if(current > 0) then - tracker.Text:SetText(current) - tracker.Text:SetTextColor(unpack(TextColors[current])) - FivePointsAlarm(tracker, current) - else - tracker.Text:SetText("0") - tracker.Text:SetTextColor(0.3,0.3,0.3) - end - else - tracker.Text:SetText("") - end - end + if(current > 0) then + FivePointsAlarm(current) end if(bar.PostUpdate) then @@ -163,16 +138,6 @@ local Path = function(self, ...) return (self.HyperCombo.Override or Update) (self, ...) end --- local Tracker = function(self, ...) --- local bar = self.HyperCombo --- if(UnitHasVehicleUI'player') then --- bar.LAST_COMBO_POINTS = GetComboPoints('vehicle', 'target') --- else --- bar.LAST_COMBO_POINTS = GetComboPoints('player', 'target') --- end --- return Path(self, ...) --- end - local ForceUpdate = function(element) return Path(element.__owner, 'ForceUpdate', element.__owner.unit) end @@ -182,14 +147,12 @@ local Enable = function(self) if(bar) then bar.__owner = self bar.ForceUpdate = ForceUpdate - bar.EXISTING_COMBO_POINTS = 0 - bar.LAST_COMBO_POINTS = 0 self:RegisterEvent('UNIT_COMBO_POINTS', Path, true) self:RegisterEvent('PLAYER_TARGET_CHANGED', Path, true) self:RegisterEvent('UNIT_AURA', Path, true) - local cpoints = bar.CPoints; + local cpoints = bar.Combo; if(cpoints) then for index = 1, MAX_COMBO_POINTS do local cpoint = cpoints[index] @@ -206,7 +169,7 @@ end local Disable = function(self) local bar = self.HyperCombo if(bar) then - local cpoints = bar.CPoints; + local cpoints = bar.Combo; if(cpoints) then for index = 1, MAX_COMBO_POINTS do cpoints[index]:Hide() diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua deleted file mode 100644 index 9e2c149..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua +++ /dev/null @@ -1,69 +0,0 @@ ---GLOBAL NAMESPACE -local _G = _G; ---LUA -local unpack = _G.unpack; -local select = _G.select; -local assert = _G.assert; ---BLIZZARD API -local UnitInRaid = _G.UnitInRaid; -local GetRaidRosterInfo = _G.GetRaidRosterInfo; -local UnitHasVehicleUI = _G.UnitHasVehicleUI; - -local parent, ns = ... -local oUF = ns.oUF - -local Update = function(self, event) - local raidID = UnitInRaid(self.unit) - if(not raidID) then return end - - local maintank = self.MainTank - if(maintank.PreUpdate) then - maintank:PreUpdate() - end - - local _, _, _, _, _, _, _, _, _, rinfo = GetRaidRosterInfo(raidID) - if(rinfo == 'MAINTANK' and not UnitHasVehicleUI(self.unit)) then - self.MainTank:Show() - else - self.MainTank:Hide() - end - - if(maintank.PostUpdate) then - return maintank:PostUpdate(rinfo) - end -end - -local Path = function(self, ...) - return (self.MainTank.Override or Update)(self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local mt = self.MainTank - - if(mt) then - mt.__owner = self - mt.ForceUpdate = ForceUpdate - - self:RegisterEvent('GROUP_ROSTER_UPDATE', Path, true) - - if(mt:IsObjectType'Texture' and not mt:GetTexture()) then - mt:SetTexture[[Interface\GROUPFRAME\UI-GROUP-MAINTANKICON]] - end - - return true - end -end - -local Disable = function(self) - local mt = self.MainTank - - if (mt) then - self:UnregisterEvent('GROUP_ROSTER_UPDATE', Path) - end -end - -oUF:AddElement('MainTank', Path, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Necromancy/oUF_Necromancy.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Necromancy/oUF_Necromancy.lua new file mode 100644 index 0000000..1cc3b91 --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Necromancy/oUF_Necromancy.lua @@ -0,0 +1,115 @@ +if select(2, UnitClass("player")) ~= "DEATHKNIGHT" then return end + + +local parent, ns = ... +local oUF = ns.oUF +local floor = math.floor + +local runeColors = { + {0.75, 0, 0}, -- blood + {0.1, 0.75, 0}, -- unholy + {0, 0.5, 0.75}, -- frost + {0.5, 0, 1}, -- death +} + +local runemap = { 1, 2, 5, 6, 3, 4 } +local BLOOD_OF_THE_NORTH = 54637 +local OnUpdate = function(self, elapsed) + local duration = self.duration + elapsed + if(duration >= self.max) then + return self:SetScript("OnUpdate", nil) + else + self.duration = duration + return self:SetValue(duration) + end +end + +local spellName = GetSpellInfo(54637) +local UpdateType = function(self, event, rid, alt) + local isUsable = IsUsableSpell(spellName) + local rune = self.Necromancy[runemap[rid]] + local runeType = GetRuneType(rid) or alt + if isUsable and runeType == 1 then runeType = 4; end + if(rune.bar.Change) then + rune.bar:Change(runeType) + end + if not runeType then return; end + local colors = runeColors[runeType] + local r, g, b = colors[1], colors[2], colors[3] + rune.bar:SetStatusBarColor(r, g, b) +end + +local UpdateRune = function(self, event, rid) + local rune = self.Necromancy[runemap[rid]] + if(rune) then + local start, duration, runeReady = GetRuneCooldown(rid) + if(runeReady) then + rune.bar:SetMinMaxValues(0, 1) + rune.bar:SetValue(1) + rune.bar:SetScript("OnUpdate", nil) + else + rune.bar.duration = GetTime() - start + rune.bar.max = duration + rune.bar:SetMinMaxValues(1, duration) + rune.bar:SetScript("OnUpdate", OnUpdate) + end + end +end + +local Update = function(self, event) + for i=1, 6 do + UpdateRune(self, event, i) + end +end + +local function UpdateAllRuneTypes(self) + if(self) then + for i=1, 6 do + UpdateType(self, nil, i) + end + end +end + +local ForceUpdate = function(element) + return Update(element.__owner, 'ForceUpdate') +end + +local Enable = function(self, unit) + local runes = self.Necromancy + if(runes and unit == 'player') then + runes.__owner = self + runes.ForceUpdate = ForceUpdate + + self:RegisterEvent("RUNE_POWER_UPDATE", UpdateRune, true) + self:RegisterEvent("RUNE_TYPE_UPDATE", UpdateType, true) --I have no idea why this won't fire on initial login. + self:RegisterEvent("PLAYER_ENTERING_WORLD", UpdateAllRuneTypes) + + if not runes.UpdateAllRuneTypes then runes.UpdateAllRuneTypes = UpdateAllRuneTypes end + + for i=1, 6 do + UpdateType(self, nil, i, floor((runemap[i]+1)/2)) + end + + RuneFrame.Show = RuneFrame.Hide + RuneFrame:Hide() + + return true + end +end + +local Disable = function(self) + RuneFrame.Show = nil + RuneFrame:Show() + + + local runes = self.Necromancy + if(runes) then + runes:SetScript('OnUpdate', nil) + + self:UnregisterEvent("RUNE_POWER_UPDATE", UpdateRune) + self:UnregisterEvent("RUNE_TYPE_UPDATE", UpdateType) + self:UnregisterEvent("PLAYER_ENTERING_WORLD", UpdateAllRuneTypes) + end +end + +oUF:AddElement("Necromancy", Update, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua index a40210b..bd70c67 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua @@ -28,91 +28,104 @@ local SPEC_WARLOCK_DESTRUCTION = SPEC_WARLOCK_DESTRUCTION local SPEC_WARLOCK_AFFLICTION = SPEC_WARLOCK_AFFLICTION local SPEC_WARLOCK_DEMONOLOGY = SPEC_WARLOCK_DEMONOLOGY -oUF.colors.WarlockShards = { - [1] = {100/255, 0/255, 255/255}, - [2] = {180/255, 30/255, 255/255}, - [3] = {255/255, 115/255, 10/255} +local shardColor = { + [1] = {0.57,0.08,1}, + [2] = {1,0,0}, + [3] = {1,0.25,0} } local Update = function(self, event, unit, powerType) - local wsb = self.WarlockShards - if(wsb.PreUpdate) then wsb:PreUpdate(unit) end + local bar = self.WarlockShards; + local fury = bar.DemonicFury; + local maxBars = bar.MaxCount or 4; + + if(bar.PreUpdate) then bar:PreUpdate(unit) end if UnitHasVehicleUI("player") then - wsb:Hide() + bar:Hide() else - wsb:Show() + bar:Show() end local spec = GetSpecialization() + if spec then - if not wsb:IsShown() then - wsb:Show() + if not bar:IsShown() then + bar:Show() end - for i = 1, 4 do - wsb[i]:Show() - wsb[i]:SetStatusBarColor(unpack(oUF.colors.WarlockShards[spec])) + if((not bar.CurrentSpec) or (bar.CurrentSpec ~= spec and bar.UpdateTextures)) then + bar:UpdateTextures(spec) end - if (spec == SPEC_WARLOCK_DESTRUCTION) then + local colors = shardColor[spec] + + if (spec == SPEC_WARLOCK_DESTRUCTION) then + if fury:IsShown() then fury:Hide() end; local maxPower = UnitPowerMax("player", SPELL_POWER_BURNING_EMBERS, true) local power = UnitPower("player", SPELL_POWER_BURNING_EMBERS, true) local numEmbers = power / MAX_POWER_PER_EMBER local numBars = floor(maxPower / MAX_POWER_PER_EMBER) - wsb.number = numBars - - -- bar unavailable - if numBars == 3 then - wsb[4]:Hide() - else - wsb[4]:Show() - end - for i = 1, numBars do - wsb[i]:SetMinMaxValues((MAX_POWER_PER_EMBER * i) - MAX_POWER_PER_EMBER, MAX_POWER_PER_EMBER * i) - wsb[i]:SetValue(power) + for i = 1, maxBars do + if((i == maxBars) and (numBars == 3)) then + bar[i]:Hide() + else + bar[i]:Show() + bar[i]:SetStatusBarColor(unpack(colors)) + bar[i]:SetMinMaxValues((MAX_POWER_PER_EMBER * i) - MAX_POWER_PER_EMBER, MAX_POWER_PER_EMBER * i) + bar[i]:SetValue(power) + if(bar[i].Update) then + local filled = (power >= MAX_POWER_PER_EMBER * i) and 1 or 0 + bar[i]:Update(filled) + end + end end elseif ( spec == SPEC_WARLOCK_AFFLICTION ) then + if fury:IsShown() then fury:Hide() end; local numShards = UnitPower("player", SPELL_POWER_SOUL_SHARDS) local maxShards = UnitPowerMax("player", SPELL_POWER_SOUL_SHARDS) - wsb.number = maxShards - - -- bar unavailable - if maxShards == 3 then - wsb[4]:Hide() - else - wsb[4]:Show() - end - - for i = 1, maxShards do - wsb[i]:SetMinMaxValues(0, 1) - if i <= numShards then - wsb[i]:SetValue(1) + + for i = 1, maxBars do + if((i == maxBars) and (maxShards == 3)) then + bar[i]:Hide() else - wsb[i]:SetValue(0) + bar[i]:Show() + bar[i]:SetStatusBarColor(unpack(colors)) + bar[i]:SetMinMaxValues(0, 1) + local filled = (i <= numShards) and 1 or 0 + bar[i]:SetValue(filled) + if(bar[i].Update) then + bar[i]:Update(filled) + end end end elseif spec == SPEC_WARLOCK_DEMONOLOGY then + if not fury:IsShown() then fury:Show() end; local power = UnitPower("player", SPELL_POWER_DEMONIC_FURY) local maxPower = UnitPowerMax("player", SPELL_POWER_DEMONIC_FURY) + local percent = (power / maxPower) * 100 + + for i = 1, maxBars do + bar[i]:Hide() + end - wsb.number = 1 - wsb[2]:Hide() - wsb[3]:Hide() - wsb[4]:Hide() + fury.bar:SetStatusBarColor(unpack(colors)) + fury.bar:SetMinMaxValues(0, maxPower) + fury.bar:SetValue(power) - wsb[1]:SetMinMaxValues(0, maxPower) - wsb[1]:SetValue(power) + if(fury.bar.Update) then + local filled = (percent > 80) and 1 or 0 + fury.bar:Update(filled) + end end else - if wsb:IsShown() then - wsb:Hide() - end + if bar:IsShown() then bar:Hide() end; + if fury:IsShown() then fury:Hide() end; end - if(wsb.PostUpdate) then - return wsb:PostUpdate(unit, spec) + if(bar.PostUpdate) then + return bar:PostUpdate(unit, spec) end end @@ -127,35 +140,36 @@ end local function Enable(self, unit) if(unit ~= 'player') then return end - local wsb = self.WarlockShards - if(wsb) then - wsb.__owner = self - wsb.ForceUpdate = ForceUpdate + local bar = self.WarlockShards + if(bar) then + bar.__owner = self + bar.ForceUpdate = ForceUpdate self:RegisterEvent('UNIT_POWER', Path) self:RegisterEvent("PLAYER_TALENT_UPDATE", Path) + self:RegisterEvent("PLAYER_ENTERING_WORLD", Path) - for i = 1, 4 do - if not wsb[i]:GetStatusBarTexture() then - wsb[i]:SetStatusBarTexture([=[Interface\TargetingFrame\UI-StatusBar]=]) + local maxBars = bar.MaxCount or 4; + for i = 1, maxBars do + if not bar[i]:GetStatusBarTexture() then + bar[i]:SetStatusBarTexture([=[Interface\TargetingFrame\UI-StatusBar]=]) end - wsb[i]:SetFrameLevel(wsb:GetFrameLevel() + 1) - wsb[i]:GetStatusBarTexture():SetHorizTile(false) + bar[i]:SetFrameLevel(bar:GetFrameLevel() + 1) + bar[i]:GetStatusBarTexture():SetHorizTile(false) end - - wsb.number = 4 return true end end local function Disable(self) - local wsb = self.WarlockShards - if(wsb) then + local bar = self.WarlockShards + if(bar) then self:UnregisterEvent('UNIT_POWER', Path) self:UnregisterEvent("PLAYER_TALENT_UPDATE", Path) - wsb:Hide() + self:UnregisterEvent("PLAYER_ENTERING_WORLD", Path) + bar:Hide() end end diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/cpoints.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/cpoints.lua deleted file mode 100644 index ee12aec..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/cpoints.lua +++ /dev/null @@ -1,77 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -local GetComboPoints = GetComboPoints -local MAX_COMBO_POINTS = MAX_COMBO_POINTS - -local Update = function(self, event, unit) - if(unit == 'pet') then return end - - local cpoints = self.CPoints - if(cpoints.PreUpdate) then - cpoints:PreUpdate() - end - - local cp - if(UnitHasVehicleUI'player') then - cp = GetComboPoints('vehicle', 'target') - else - cp = GetComboPoints('player', 'target') - end - - for i=1, MAX_COMBO_POINTS do - if(i <= cp) then - cpoints[i]:Show() - else - cpoints[i]:Hide() - end - end - - if(cpoints.PostUpdate) then - return cpoints:PostUpdate(cp) - end -end - -local Path = function(self, ...) - return (self.CPoints.Override or Update) (self, ...) -end - -local ForceUpdate = function(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local Enable = function(self) - local cpoints = self.CPoints - if(cpoints) then - cpoints.__owner = self - cpoints.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_COMBO_POINTS', Path, true) - self:RegisterEvent('PLAYER_TARGET_CHANGED', Path, true) - self:RegisterEvent('UNIT_AURA', Path, true) - - for index = 1, MAX_COMBO_POINTS do - local cpoint = cpoints[index] - if(cpoint:IsObjectType'Texture' and not cpoint:GetTexture()) then - cpoint:SetTexture[[Interface\ComboFrame\ComboPoint]] - cpoint:SetTexCoord(0, 0.375, 0, 1) - end - end - - return true - end -end - -local Disable = function(self) - local cpoints = self.CPoints - if(cpoints) then - for index = 1, MAX_COMBO_POINTS do - cpoints[index]:Hide() - end - self:UnregisterEvent('UNIT_COMBO_POINTS', Path) - self:UnregisterEvent('PLAYER_TARGET_CHANGED', Path) - self:UnregisterEvent('UNIT_AURA', Path) - end -end - -oUF:AddElement('CPoints', Path, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/druidmana.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/druidmana.lua deleted file mode 100644 index 2dc1673..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/druidmana.lua +++ /dev/null @@ -1,114 +0,0 @@ --- Druid Mana Bar for Cat and Bear forms --- Authors: Califpornia aka Ennie // some code taken from oUF`s EclipseBar element -if(select(2, UnitClass('player')) ~= 'DRUID') then return end - -local _, ns = ... -local oUF = ns.oUF - -local function Update(self, event, unit, powertype) - --only the player frame will have this unit enable - --i mainly place this check for UNIT_DISPLAYPOWER and entering a vehicle - if(unit ~= 'player' or (powertype and powertype ~= 'MANA')) then return end - - local druidmana = self.DruidMana - if(druidmana.PreUpdate) then druidmana:PreUpdate(unit) end - - --check form - if(UnitPowerType('player') == SPELL_POWER_MANA) then - return druidmana:Hide() - else - druidmana:Show() - end - - local min, max = UnitPower('player', SPELL_POWER_MANA), UnitPowerMax('player', SPELL_POWER_MANA) - druidmana:SetMinMaxValues(0, max) - druidmana:SetValue(min) - - local r, g, b, t - if(druidmana.colorClass) then - t = self.colors.class['DRUID'] - elseif(druidmana.colorSmooth) then - r, g, b = self.ColorGradient(min, max, unpack(druidmana.smoothGradient or self.colors.smooth)) - elseif(druidmana.colorPower) then - t = self.colors.power['MANA'] - end - - if(t) then - r, g, b = t[1], t[2], t[3] - end - - if(b) then - druidmana:SetStatusBarColor(r, g, b) - - local bg = druidmana.bg - if(bg) then - local mu = bg.multiplier or 1 - bg:SetVertexColor(r * mu, g * mu, b * mu) - end - end - - if(druidmana.PostUpdate) then - return druidmana:PostUpdate(unit, min, max) - end -end - -local function Path(self, ...) - return (self.DruidMana.Override or Update) (self, ...) -end - -local function ForceUpdate(element) - return Path(element.__owner, 'ForceUpdate', element.__owner.unit) -end - -local OnDruidManaUpdate -do - local UnitPower = UnitPower - OnDruidManaUpdate = function(self) - local unit = self.__owner.unit - local mana = UnitPower(unit, SPELL_POWER_MANA) - - if(mana ~= self.min) then - self.min = mana - return Path(self.__owner, 'OnDruidManaUpdate', unit) - end - end -end - -local Enable = function(self, unit) - local druidmana = self.DruidMana - if(druidmana and unit == 'player') then - druidmana.__owner = self - druidmana.ForceUpdate = ForceUpdate - - if(druidmana.frequentUpdates) then - druidmana:SetScript('OnUpdate', OnDruidManaUpdate) - else - self:RegisterEvent('UNIT_POWER', Path) - end - - self:RegisterEvent('UNIT_DISPLAYPOWER', Path) - self:RegisterEvent('UNIT_MAXPOWER', Path) - - if(druidmana:IsObjectType'StatusBar' and not druidmana:GetStatusBarTexture()) then - druidmana:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] - end - - return true - end -end - -local Disable = function(self) - local druidmana = self.DruidMana - if(druidmana) then - if(druidmana:GetScript'OnUpdate') then - druidmana:SetScript("OnUpdate", nil) - else - self:UnregisterEvent('UNIT_POWER', Path) - end - - self:UnregisterEvent('UNIT_DISPLAYPOWER', Path) - self:UnregisterEvent('UNIT_MAXPOWER', Path) - end -end - -oUF:AddElement('DruidMana', Path, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/eclipsebar.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/eclipsebar.lua deleted file mode 100644 index 8653f0f..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/eclipsebar.lua +++ /dev/null @@ -1,144 +0,0 @@ ---[[ Element: Eclipse Bar - - THIS FILE HEAVILY MODIFIED FOR USE WITH SUPERVILLAIN UI - -]] -if(select(2, UnitClass('player')) ~= 'DRUID') then return end - -local parent, ns = ... -local oUF = ns.oUF - -local ECLIPSE_BAR_SOLAR_BUFF_ID = ECLIPSE_BAR_SOLAR_BUFF_ID -local ECLIPSE_BAR_LUNAR_BUFF_ID = ECLIPSE_BAR_LUNAR_BUFF_ID -local SPELL_POWER_ECLIPSE = SPELL_POWER_ECLIPSE -local MOONKIN_FORM = MOONKIN_FORM - -local UNIT_POWER = function(self, event, unit, powerType) - if(self.unit ~= unit or (event == 'UNIT_POWER' and powerType ~= 'ECLIPSE')) then return end - - local eb = self.EclipseBar - - local power = UnitPower('player', SPELL_POWER_ECLIPSE) - local maxPower = UnitPowerMax('player', SPELL_POWER_ECLIPSE) - - if(eb.LunarBar) then - eb.LunarBar:SetMinMaxValues(-maxPower, maxPower) - eb.LunarBar:SetValue(power) - end - - if(eb.SolarBar) then - eb.SolarBar:SetMinMaxValues(-maxPower, maxPower) - eb.SolarBar:SetValue(power * -1) - end - - if(eb.PostUpdatePower) then - return eb:PostUpdatePower(unit) - end -end - -local UPDATE_VISIBILITY = function(self, event) - local eb = self.EclipseBar - - -- check form/mastery - local showBar - local form = GetShapeshiftFormID() - if(not form) then - local ptt = GetSpecialization() - if(ptt and ptt == 1) then -- player has balance spec - showBar = true - end - elseif(form == MOONKIN_FORM) then - showBar = true - end - - if(showBar) then - eb:Show() - else - eb:Hide() - end - - if(eb.PostUpdateVisibility) then - return eb:PostUpdateVisibility(self.unit) - end -end - -local UNIT_AURA = function(self, event, unit) - if(self.unit ~= unit) or not unit then return end - - local i = 1 - local hasSolarEclipse, hasLunarEclipse - repeat - local _, _, _, _, _, _, _, _, _, _, spellID = UnitAura(unit, i, 'HELPFUL') - - if(spellID == ECLIPSE_BAR_SOLAR_BUFF_ID) then - hasSolarEclipse = true - elseif(spellID == ECLIPSE_BAR_LUNAR_BUFF_ID) then - hasLunarEclipse = true - end - - i = i + 1 - until not spellID - - local eb = self.EclipseBar - eb.hasSolarEclipse = hasSolarEclipse - eb.hasLunarEclipse = hasLunarEclipse - - if(eb.PostUnitAura) then - return eb:PostUnitAura(unit) - end -end - -local ECLIPSE_DIRECTION_CHANGE = function(self, event, status) - local eb = self.EclipseBar - - if(status and eb:IsVisible() and eb.PostDirectionChange[status]) then - return eb.PostDirectionChange[status](eb) - end -end - -local Update = function(self, ...) - UNIT_POWER(self, ...) - UNIT_AURA(self, ...) - return UPDATE_VISIBILITY(self, ...) -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate', element.__owner.unit, 'ECLIPSE') -end - -local function Enable(self) - local eb = self.EclipseBar - if(eb) then - eb.__owner = self - eb.ForceUpdate = ForceUpdate - - if(eb.LunarBar and eb.LunarBar:IsObjectType'StatusBar' and not eb.LunarBar:GetStatusBarTexture()) then - eb.LunarBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - if(eb.SolarBar and eb.SolarBar:IsObjectType'StatusBar' and not eb.SolarBar:GetStatusBarTexture()) then - eb.SolarBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - - self:RegisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE, true) - self:RegisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY, true) - self:RegisterEvent('UNIT_AURA', UNIT_AURA) - self:RegisterEvent('UNIT_POWER', UNIT_POWER) - self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY, true) - - return true - end -end - -local function Disable(self) - local eb = self.EclipseBar - if(eb) then - eb:Hide() - self:UnregisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE) - self:UnregisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY) - self:UnregisterEvent('UNIT_AURA', UNIT_AURA) - self:UnregisterEvent('UNIT_POWER', UNIT_POWER) - self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY) - end -end - -oUF:AddElement('EclipseBar', Update, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/maintank.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/maintank.lua new file mode 100644 index 0000000..9e2c149 --- /dev/null +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/maintank.lua @@ -0,0 +1,69 @@ +--GLOBAL NAMESPACE +local _G = _G; +--LUA +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +--BLIZZARD API +local UnitInRaid = _G.UnitInRaid; +local GetRaidRosterInfo = _G.GetRaidRosterInfo; +local UnitHasVehicleUI = _G.UnitHasVehicleUI; + +local parent, ns = ... +local oUF = ns.oUF + +local Update = function(self, event) + local raidID = UnitInRaid(self.unit) + if(not raidID) then return end + + local maintank = self.MainTank + if(maintank.PreUpdate) then + maintank:PreUpdate() + end + + local _, _, _, _, _, _, _, _, _, rinfo = GetRaidRosterInfo(raidID) + if(rinfo == 'MAINTANK' and not UnitHasVehicleUI(self.unit)) then + self.MainTank:Show() + else + self.MainTank:Hide() + end + + if(maintank.PostUpdate) then + return maintank:PostUpdate(rinfo) + end +end + +local Path = function(self, ...) + return (self.MainTank.Override or Update)(self, ...) +end + +local ForceUpdate = function(element) + return Path(element.__owner, 'ForceUpdate') +end + +local Enable = function(self) + local mt = self.MainTank + + if(mt) then + mt.__owner = self + mt.ForceUpdate = ForceUpdate + + self:RegisterEvent('GROUP_ROSTER_UPDATE', Path, true) + + if(mt:IsObjectType'Texture' and not mt:GetTexture()) then + mt:SetTexture[[Interface\GROUPFRAME\UI-GROUP-MAINTANKICON]] + end + + return true + end +end + +local Disable = function(self) + local mt = self.MainTank + + if (mt) then + self:UnregisterEvent('GROUP_ROSTER_UPDATE', Path) + end +end + +oUF:AddElement('MainTank', Path, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/runebar.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/runebar.lua deleted file mode 100644 index a1077c5..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/runebar.lua +++ /dev/null @@ -1,164 +0,0 @@ ---[[ Element: Runes Bar - - Handle updating and visibility of the Death Knight's Rune indicators. - - Widget - - Runes - An array holding six StatusBar's. - - Sub-Widgets - - .bg - A Texture which functions as a background. It will inherit the color of - the main StatusBar. - - Notes - - The default StatusBar texture will be applied if the UI widget doesn't have a - status bar texture or color defined. - - Sub-Widgets Options - - .multiplier - Defines a multiplier, which is used to tint the background based - on the main widgets R, G and B values. Defaults to 1 if not - present. - - Examples - - local Runes = {} - for index = 1, 6 do - -- Position and size of the rune bar indicators - local Rune = CreateFrame('StatusBar', nil, self) - Rune:SetSize(120 / 6, 20) - Rune:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', index * 120 / 6, 0) - - Runes[index] = Rune - end - - -- Register with oUF - self.Runes = Runes -]] - -if select(2, UnitClass("player")) ~= "DEATHKNIGHT" then return end - - -local parent, ns = ... -local oUF = ns.oUF -local floor = math.floor - -oUF.colors.Runes = { - {0.75, 0, 0}, -- blood - {0.1, 0.75, 0}, -- unholy - {0, 0.5, 0.75}, -- frost - {0.5, 0, 1}, -- death -} - -local runemap = { 1, 2, 5, 6, 3, 4 } -local BLOOD_OF_THE_NORTH = 54637 -local OnUpdate = function(self, elapsed) - local duration = self.duration + elapsed - if(duration >= self.max) then - return self:SetScript("OnUpdate", nil) - else - self.duration = duration - return self:SetValue(duration) - end -end - -local spellName = GetSpellInfo(54637) -local UpdateType = function(self, event, rid, alt) - local isUsable = IsUsableSpell(spellName) - local rune = self.Runes[runemap[rid]] - local runeType = GetRuneType(rid) or alt - if isUsable and runeType == 1 then runeType = 4; end - if(rune.bar.Change) then - rune.bar:Change(runeType) - end - if not runeType then return; end - local colors = oUF.colors.Runes[runeType] - local r, g, b = colors[1], colors[2], colors[3] - rune.bar:SetStatusBarColor(r, g, b) -end - -local UpdateRune = function(self, event, rid) - local rune = self.Runes[runemap[rid]] - if(rune) then - local start, duration, runeReady = GetRuneCooldown(rid) - if(runeReady) then - rune.bar:SetMinMaxValues(0, 1) - rune.bar:SetValue(1) - rune.bar:SetScript("OnUpdate", nil) - else - rune.bar.duration = GetTime() - start - rune.bar.max = duration - rune.bar:SetMinMaxValues(1, duration) - rune.bar:SetScript("OnUpdate", OnUpdate) - end - -- if(rune.bar.Change) then - -- rune.bar:Change(runeType) - -- end - end -end - -local Update = function(self, event) - for i=1, 6 do - UpdateRune(self, event, i) - end -end - -local function UpdateAllRuneTypes(self) - if(self) then - for i=1, 6 do - UpdateType(self, nil, i) - end - end -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate') -end - -local Enable = function(self, unit) - local runes = self.Runes - if(runes and unit == 'player') then - runes.__owner = self - runes.ForceUpdate = ForceUpdate - - self:RegisterEvent("RUNE_POWER_UPDATE", UpdateRune, true) - self:RegisterEvent("RUNE_TYPE_UPDATE", UpdateType, true) --I have no idea why this won't fire on initial login. - self:RegisterEvent("PLAYER_ENTERING_WORLD", UpdateAllRuneTypes) - - if not runes.UpdateAllRuneTypes then runes.UpdateAllRuneTypes = UpdateAllRuneTypes end - - for i=1, 6 do - -- From my minor testing this is a okey solution. A full login always remove - -- the death runes, or at least the clients knowledge about them. - UpdateType(self, nil, i, floor((runemap[i]+1)/2)) - end - - -- oUF leaves the vehicle events registered on the player frame, so - -- buffs and such are correctly updated when entering/exiting vehicles. - -- - -- This however makes the code also show/hide the RuneFrame. - RuneFrame.Show = RuneFrame.Hide - RuneFrame:Hide() - - return true - end -end - -local Disable = function(self) - RuneFrame.Show = nil - RuneFrame:Show() - - - local runes = self.Runes - if(runes) then - runes:SetScript('OnUpdate', nil) - - self:UnregisterEvent("RUNE_POWER_UPDATE", UpdateRune) - self:UnregisterEvent("RUNE_TYPE_UPDATE", UpdateType) - self:UnregisterEvent("PLAYER_ENTERING_WORLD", UpdateAllRuneTypes) - end -end - -oUF:AddElement("Runes", Update, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/stagger.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/stagger.lua deleted file mode 100644 index 6cc7dc9..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/stagger.lua +++ /dev/null @@ -1,140 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - --- percentages at which the bar should change color -local STAGGER_YELLOW_TRANSITION = STAGGER_YELLOW_TRANSITION -local STAGGER_RED_TRANSITION = STAGGER_RED_TRANSITION - --- table indices of bar colors -local GREEN_INDEX = 1; -local YELLOW_INDEX = 2; -local RED_INDEX = 3; - -local STANCE_OF_THE_STURY_OX_ID = 23 - -local UnitHealthMax = UnitHealthMax -local UnitStagger = UnitStagger - -local _, playerClass = UnitClass("player") - --- TODO: fix color in the power element -oUF.colors.power[BREWMASTER_POWER_BAR_NAME] = { - {0.52, 1.0, 0.52}, - {1.0, 0.98, 0.72}, - {1.0, 0.42, 0.42}, -} -local color = oUF.colors.power[BREWMASTER_POWER_BAR_NAME] - -local function UpdateMaxValues(self) - local stagger = self.Stagger - if(stagger) then - local maxhealth = UnitHealthMax("player"); - stagger:SetMinMaxValues(0, maxhealth); - end -end - -local Update = function(self, event, unit) - if unit and unit ~= self.unit then return end - local element = self.Stagger - - if(element.PreUpdate) then - element:PreUpdate() - end - - local maxHealth = UnitHealthMax("player") - local stagger = UnitStagger("player") - local staggerPercent = stagger / maxHealth - - element:SetMinMaxValues(0, maxHealth) - element:SetValue(stagger) - - local rgb - if(staggerPercent >= STAGGER_RED_TRANSITION) then - rgb = color[RED_INDEX] - elseif(staggerPercent > STAGGER_YELLOW_TRANSITION) then - rgb = color[YELLOW_INDEX] - else - rgb = color[GREEN_INDEX] - end - - local r, g, b = rgb[1], rgb[2], rgb[3] - element:SetStatusBarColor(r, g, b) - - local bg = element.bg - if(bg) then - local mu = bg.multiplier or 1 - bg:SetVertexColor(r * mu, g * mu, b * mu) - end - - if(element.PostUpdate) then - element:PostUpdate(maxHealth, stagger, staggerPercent, r, g, b) - end -end - -local Path = function(self, ...) - return (self.Stagger.Override or Update)(self, ...) -end - -local Visibility = function(self, event, unit) - if(STANCE_OF_THE_STURY_OX_ID ~= GetShapeshiftFormID() or UnitHasVehiclePlayerFrameUI("player")) then - if self.Stagger:IsShown() then - self.Stagger:Hide() - self:UnregisterEvent('UNIT_AURA', Path) - end - elseif not self.Stagger:IsShown() then - self.Stagger:Show() - self:RegisterEvent('UNIT_AURA', Path) - return Path(self, event, unit) - end -end - -local VisibilityPath = function(self, ...) - return (self.Stagger.OverrideVisibility or Visibility)(self, ...) -end - -local ForceUpdate = function(element) - return VisibilityPath(element.__owner, "ForceUpdate", element.__owner.unit) -end - -local Enable = function(self, unit) - if(playerClass ~= "MONK" or unit ~= 'player') then return end - - local element = self.Stagger - if(element) then - element.__owner = self - element.ForceUpdate = ForceUpdate - - self:RegisterEvent('UNIT_DISPLAYPOWER', VisibilityPath) - self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', VisibilityPath) - - if(element:IsObjectType'StatusBar' and not element:GetStatusBarTexture()) then - element:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] - end - - MonkStaggerBar.Hide = MonkStaggerBar.Show - MonkStaggerBar:UnregisterEvent'PLAYER_ENTERING_WORLD' - MonkStaggerBar:UnregisterEvent'PLAYER_SPECIALIZATION_CHANGED' - MonkStaggerBar:UnregisterEvent'UNIT_DISPLAYPOWER' - MonkStaggerBar:UnregisterEvent'UPDATE_VEHICLE_ACTION_BAR' - return true - end -end - -local Disable = function(self) - local element = self.Stagger - if(element) then - element:Hide() - self:UnregisterEvent('UNIT_AURA', Path) - self:UnregisterEvent('UNIT_DISPLAYPOWER', VisibilityPath) - self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', VisibilityPath) - - MonkStaggerBar.Show = nil - MonkStaggerBar:Show() - MonkStaggerBar:UnregisterEvent'PLAYER_ENTERING_WORLD' - MonkStaggerBar:UnregisterEvent'PLAYER_SPECIALIZATION_CHANGED' - MonkStaggerBar:UnregisterEvent'UNIT_DISPLAYPOWER' - MonkStaggerBar:UnregisterEvent'UPDATE_VEHICLE_ACTION_BAR' - end -end - -oUF:AddElement("Stagger", VisibilityPath, Enable, Disable) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/totems.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/totems.lua deleted file mode 100644 index c504fd4..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/totems.lua +++ /dev/null @@ -1,133 +0,0 @@ -local parent, ns = ... -local oUF = ns.oUF - -oUF.colors.totems = { - [FIRE_TOTEM_SLOT] = { 181/255, 073/255, 033/255 }, - [EARTH_TOTEM_SLOT] = { 074/255, 142/255, 041/255 }, - [WATER_TOTEM_SLOT] = { 057/255, 146/255, 181/255 }, - [AIR_TOTEM_SLOT] = { 132/255, 056/255, 231/255 } -} - -local priorities = STANDARD_TOTEM_PRIORITIES -if(select(2, UnitClass'player') == 'SHAMAN') then - priorities = SHAMAN_TOTEM_PRIORITIES -end - -local OnClick = function(self) - DestroyTotem(self:GetID()) -end - -local UpdateTooltip = function(self) - GameTooltip:SetTotem(self:GetID()) -end - -local OnEnter = function(self) - if(not self:IsVisible()) then return end - GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT') - self:UpdateTooltip() -end - -local OnLeave = function() - GameTooltip:Hide() -end - -local UpdateTotem = function(self, event, slot) - if(slot > MAX_TOTEMS) then return end - local totems = self.Totems - - if(totems.PreUpdate) then totems:PreUpdate(priorities[slot]) end - - local totem = totems[priorities[slot]] - local haveTotem, name, start, duration, icon = GetTotemInfo(slot) - if(duration > 0) then - if(totem.Icon) then - totem.Icon:SetTexture(icon) - end - - if(totem.Cooldown) then - totem.Cooldown:SetCooldown(start, duration) - end - - totem:Show() - else - totem:Hide() - end - - if(totems.PostUpdate) then - return totems:PostUpdate(priorities[slot], haveTotem, name, start, duration, icon) - end -end - -local Path = function(self, ...) - return (self.Totems.Override or UpdateTotem) (self, ...) -end - -local Update = function(self, event) - for i = 1, MAX_TOTEMS do - Path(self, event, i) - end -end - -local ForceUpdate = function(element) - return Update(element.__owner, 'ForceUpdate') -end - -local Enable = function(self) - local totems = self.Totems - - if(totems) then - totems.__owner = self - totems.__map = { unpack(priorities) } - totems.ForceUpdate = ForceUpdate - - for i = 1, MAX_TOTEMS do - local totem = totems[i] - - totem:SetID(priorities[i]) - - if(totem:HasScript'OnClick') then - totem:SetScript('OnClick', OnClick) - end - - if(totem:IsMouseEnabled()) then - totem:SetScript('OnEnter', OnEnter) - totem:SetScript('OnLeave', OnLeave) - - if(not totem.UpdateTooltip) then - totem.UpdateTooltip = UpdateTooltip - end - end - end - - self:RegisterEvent('PLAYER_TOTEM_UPDATE', Path, true) - - TotemFrame.Show = TotemFrame.Hide - TotemFrame:Hide() - - TotemFrame:UnregisterEvent"PLAYER_TOTEM_UPDATE" - TotemFrame:UnregisterEvent"PLAYER_ENTERING_WORLD" - TotemFrame:UnregisterEvent"UPDATE_SHAPESHIFT_FORM" - TotemFrame:UnregisterEvent"PLAYER_TALENT_UPDATE" - - return true - end -end - -local Disable = function(self) - if(self.Totems) then - for i = 1, MAX_TOTEMS do - self.Totems[i]:Hide() - end - TotemFrame.Show = nil - TotemFrame:Show() - - TotemFrame:RegisterEvent"PLAYER_TOTEM_UPDATE" - TotemFrame:RegisterEvent"PLAYER_ENTERING_WORLD" - TotemFrame:RegisterEvent"UPDATE_SHAPESHIFT_FORM" - TotemFrame:RegisterEvent"PLAYER_TALENT_UPDATE" - - self:UnregisterEvent('PLAYER_TOTEM_UPDATE', Path) - end -end - -oUF:AddElement("Totems", Update, Enable, Disable) diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF_Villain.xml b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF_Villain.xml index b595d50..890bb5a 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF_Villain.xml +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF_Villain.xml @@ -14,7 +14,6 @@