diff --git a/SVUI_Chat/SVUI_Chat.lua b/SVUI_Chat/SVUI_Chat.lua index 37d4689..4eb98d3 100644 --- a/SVUI_Chat/SVUI_Chat.lua +++ b/SVUI_Chat/SVUI_Chat.lua @@ -1144,7 +1144,7 @@ local function OpenNewSVUIChatFrame(newname) ChatFrame_RemoveAllMessageGroups(chatFrame); ChatFrame_RemoveAllChannels(chatFrame); ChatFrame_ReceiveAllPrivateMessages(chatFrame); - ChatFrame_ReceiveAllBNConversations(chatFrame); + --ChatFrame_ReceiveAllBNConversations(chatFrame); ChatFrame_AddMessageGroup(chatFrame, "SAY"); ChatFrame_AddMessageGroup(chatFrame, "YELL"); diff --git a/SVUI_NamePlates/SVUI_NamePlates.lua b/SVUI_NamePlates/SVUI_NamePlates.lua index 58481f9..1255bc3 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.lua +++ b/SVUI_NamePlates/SVUI_NamePlates.lua @@ -136,10 +136,10 @@ function MOD:PLAYER_REGEN_ENABLED() end function MOD:PLAYER_TARGET_CHANGED() - NPGlow:Hide() - if(NPGlow.FX:IsShown()) then - NPGlow.FX:Hide() - end + -- NPGlow:Hide() + -- if(NPGlow.FX:IsShown()) then + -- NPGlow.FX:Hide() + -- end if(UnitExists("target")) then CURRENT_TARGET_NAME = UnitName("target"); TARGET_CHECKS = 1; @@ -194,12 +194,12 @@ end function MOD:Load() SV:FontManager(SystemFont_NamePlate, "platename") - SV.SpecialFX:Register("platepoint", [[Spells\Arrow_state_animated.m2]], -12, 12, 12, -50, 0.75, 0, 0.1) - SV.SpecialFX:SetFXFrame(NPGlow, "platepoint", true) - NPGlow.FX:SetParent(SV.Screen) - NPGlow.FX:SetFrameStrata("BACKGROUND") - NPGlow.FX:SetFrameLevel(0) - NPGlow.FX:Hide() + --SV.SpecialFX:Register("platepoint", [[Spells\Arrow_state_animated.m2]], -12, 12, 12, -50, 0.75, 0, 0.1) + --SV.SpecialFX:SetFXFrame(NPGlow, "platepoint", true) + -- NPGlow.FX:SetParent(SV.Screen) + -- NPGlow.FX:SetFrameStrata("BACKGROUND") + -- NPGlow.FX:SetFrameLevel(0) + -- NPGlow.FX:Hide() self:UpdateLocals() self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("PLAYER_TARGET_CHANGED") @@ -209,6 +209,6 @@ function MOD:Load() ClassNameplateManaBarFrame:SetStyle("Frame", "Bar") ClassNameplateManaBarFrame:SetStatusBarTexture(SV.media.statusbar.glow) end - + self:CombatToggle(true) end diff --git a/SVUI_NamePlates/SVUI_NamePlates.xml b/SVUI_NamePlates/SVUI_NamePlates.xml index 9fa3fa3..d3b8e47 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.xml +++ b/SVUI_NamePlates/SVUI_NamePlates.xml @@ -105,5 +105,5 @@ <Script file="Loader.lua"/> <Script file='SVUI_NamePlates.lua'/> - <Script file='components\healers.lua'/> + <!-- <Script file='components\healers.lua'/> --> </Ui> diff --git a/SVUI_UnitFrames/Loader.lua b/SVUI_UnitFrames/Loader.lua index 15e80f0..46a8421 100644 --- a/SVUI_UnitFrames/Loader.lua +++ b/SVUI_UnitFrames/Loader.lua @@ -20,7 +20,14 @@ local Schema = MOD.Schema; local unitframeColors = { ["health"] = {0.3, 0.5, 0.3}, ["healthBackdrop"] = {0.1, 0.1, 0.1}, - ["power"] = { }, + ["power"] = { + ["MANA"] = {0.31, 0.75, 1}, + ["RAGE"] = {1, 0.31, 0.31}, + ["FOCUS"] = {1, 0.63, 0.27}, + ["ENERGY"] = {0.85, 0.83, 0.25}, + ["RUNES"] = {0.55, 0.57, 0.61}, + ["RUNIC_POWER"] = {0, 0.82, 1} + }, ["reaction"] = { [1] = {0.92, 0.15, 0.15}, [2] = {0.92, 0.15, 0.15}, diff --git a/SVUI_UnitFrames/class_resources/warlock.lua b/SVUI_UnitFrames/class_resources/warlock.lua index c29e4c6..53f1395 100644 --- a/SVUI_UnitFrames/class_resources/warlock.lua +++ b/SVUI_UnitFrames/class_resources/warlock.lua @@ -1,7 +1,7 @@ --[[ ########################################################## S V U I By: Munglunch -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -22,8 +22,8 @@ local math = _G.math; local random, floor = math.random, math.floor; local CreateFrame = _G.CreateFrame; local GetSpecialization = _G.GetSpecialization; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- @@ -32,22 +32,24 @@ local L = SV.L; local LSM = _G.LibStub("LibSharedMedia-3.0") local MOD = SV.UnitFrames -if(not MOD) then return end +if(not MOD) then return end local oUF_SVUI = MOD.oUF assert(oUF_SVUI, "SVUI UnitFrames: unable to locate oUF.") -if(SV.class ~= "WARLOCK") then return end +if(SV.class ~= "WARLOCK") then return end -SV.SpecialFX:Register("affliction", [[Spells\Warlock_bodyofflames_medium_state_shoulder_right_purple.m2]], -12, 12, 12, -12, 0.45, 0, 0.45); ---[[ -########################################################## +--SV.SpecialFX:Register("affliction", [[Spells\Fel_fire_precast_high_hand.m2]], -12, 12, 12, -12, 0.35, 0, 0); +SV.SpecialFX:Register("demonology", [[Spells\Warlock_bodyofflames_medium_state_shoulder_right_purple.m2]], -12, 12, 12, -12, 0.4, 0, 0.45) +SV.SpecialFX:Register("destruction", [[Spells\Fill_fire_cast_01.m2]], -12, 12, 12, -12, 1.5, -0.25, 0.5); +--[[ +########################################################## LOCAL FUNCTIONS ########################################################## ]]-- local FURY_FONT = [[Interface\AddOns\SVUI_!Core\assets\fonts\Numbers.ttf]] local shardColors = { - [1] = {{0.67,0.42,0.93,1}, {0,0,0,0.9}}, - [2] = {{0.87,0.32,0.93,1}, {0,0,0,0.9}}, + [1] = {{0.5,1,0,1}, {0,0,0,0.9}}, + [2] = {{0.67,0.42,0.93,1}, {0,0,0,0.9}}, [3] = {{1,1,0,1}, {0,0,0,0.9}}, [4] = {{0.5,1,0,1}, {0,0,0,0.9}} } @@ -55,27 +57,22 @@ local shardTextures = { [1] = { [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD]], [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD-BG]], - [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD-FG]], - "affliction" + [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD-FG]] }, [2] = { [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD]], [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD-BG]], - [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD-FG]], - "affliction" + [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-SHARD-FG]] }, [3] = { [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-EMBER]], [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-EMBER]], - [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-EMBER-FG]], - "fire" + [[Interface\Addons\SVUI_UnitFrames\assets\Class\WARLOCK-EMBER-FG]] }, } -local SPEC_WARLOCK_DESTRUCTION = SPEC_WARLOCK_DESTRUCTION -local SPEC_WARLOCK_AFFLICTION = SPEC_WARLOCK_AFFLICTION -local SPEC_WARLOCK_DEMONOLOGY = SPEC_WARLOCK_DEMONOLOGY ---[[ -########################################################## +local specFX = {"demonology","demonology","destruction"}; +--[[ +########################################################## POSITIONING ########################################################## ]]-- @@ -102,29 +99,26 @@ local Reposition = function(self) bar:ClearAllPoints() bar:SetAllPoints(bar.Holder) - for i = 1, max do + for i = 1, max do bar[i]:ClearAllPoints() bar[i]:SetHeight(size) bar[i]:SetWidth(size) - if(i == 1) then + if(i == 1) then bar[i]:SetPoint("LEFT", bar) - else + else bar[i]:SetPoint("LEFT", bar[i - 1], "RIGHT", -2, 0) - end + end end -end ---[[ -########################################################## +end +--[[ +########################################################## CUSTOM HANDLERS ########################################################## ]]-- local UpdateTextures = function(self, spec) local max = self.MaxCount; local colors = shardColors[spec]; - local textures = shardTextures[1]; - if(spec == SPEC_WARLOCK_DESTRUCTION and IsSpellKnown(101508)) then - colors = shardColors[4] - end + local textures = shardTextures[spec]; for i = 1, max do self[i]:SetStatusBarTexture(textures[1]) self[i]:GetStatusBarTexture():SetHorizTile(false) @@ -132,12 +126,10 @@ local UpdateTextures = function(self, spec) self[i].overlay:SetVertexColor(unpack(colors[1])) self[i].bg:SetTexture(textures[2]) self[i].bg:SetVertexColor(unpack(colors[2])) - if(textures[4] ~= none) then - self[i].FX:SetEffect(textures[4]) - end + self[i].FX:SetEffect(specFX[spec]) end self.CurrentSpec = spec -end +end local ShardUpdate = function(self, value) if (value and value == 1) then @@ -145,7 +137,7 @@ local ShardUpdate = function(self, value) self.overlay:Show() SV.Animate:Flash(self.overlay,1,true) end - if(not self.FX:IsShown()) then + if(not self.FX:IsShown()) then self.FX:Show() end self.FX:UpdateEffect() @@ -156,9 +148,9 @@ local ShardUpdate = function(self, value) end self.FX:Hide() end -end ---[[ -########################################################## +end +--[[ +########################################################## WARLOCK ########################################################## ]]-- @@ -172,7 +164,7 @@ function MOD:CreateClassBar(playerFrame) local colors = shardColors[1]; local bar = CreateFrame("Frame",nil,playerFrame) bar:SetFrameLevel(playerFrame.TextGrip:GetFrameLevel() + 30) - for i = 1, max do + for i = 1, max do bar[i] = CreateFrame("StatusBar", nil, bar) bar[i].noupdate = true; bar[i]:SetOrientation("VERTICAL") @@ -191,10 +183,10 @@ function MOD:CreateClassBar(playerFrame) bar[i].overlay:Hide() bar[i].overlay:SetVertexColor(unpack(colors[1])) - SV.SpecialFX:SetFXFrame(bar[i], textures[4], true) + SV.SpecialFX:SetFXFrame(bar[i], specFX[1], true) bar[i].Update = ShardUpdate end - + bar.UpdateTextures = UpdateTextures; bar.MaxCount = max; @@ -207,5 +199,5 @@ function MOD:CreateClassBar(playerFrame) playerFrame.MaxClassPower = max; playerFrame.RefreshClassBar = Reposition; playerFrame.WarlockShards = bar - return 'WarlockShards' -end \ No newline at end of file + return 'WarlockShards' +end diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua b/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua index 5604a0c..0c9b3d9 100644 --- a/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua +++ b/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua @@ -54,28 +54,6 @@ local ProxyShow = function(self) self:Show() end -local UpdateAura = function(self, event, unit) - if(unit and unit ~= "player") then return end - local chicken = self.Druidness.Chicken - if(not chicken) then return end - chicken.inEclipse = false - for i = 1, 40, 1 do - local name, _, _, _, _, _, _, _, _, _, spellID = UnitAura("player", i, "HELPFUL|PLAYER") - if not name then break end - if spellID == ECLIPSE_BAR_SOLAR_BUFF_ID then - chicken.inEclipse = true - break - elseif spellID == ECLIPSE_BAR_LUNAR_BUFF_ID then - chicken.inEclipse = true - break - end - end - - if(chicken.PostUpdateAura) then - return chicken:PostUpdateAura() - end -end - local function CatOverMana(mana, form) if mana.ManaBar:GetValue() < UnitPowerMax('player', SPELL_POWER_MANA) then mana:ProxyShow() @@ -199,7 +177,6 @@ end local Update = function(self, ...) UpdatePower(self, ...) - UpdateAura(self, ...) UpdateComboPoints(self, ...) return UpdateVisibility(self, ...) end diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua b/SVUI_UnitFrames/libs/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua index ce045d0..19a24ac 100644 --- a/SVUI_UnitFrames/libs/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua +++ b/SVUI_UnitFrames/libs/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua @@ -21,33 +21,30 @@ local oUF = ns.oUF or oUF assert(oUF, 'oUF_WarlockShards was unable to locate oUF install') local shardColor = { - [1] = {0.57,0.08,1}, - [2] = {1,0,0}, + [1] = {0,0.72,0.1}, + [2] = {0.57,0.08,1}, [3] = {1,0.25,0} } -local shardMax = { - [1] = 5, - [2] = 4, - [3] = 4 -} - local Update = function(self, event, unit, powerType) local bar = self.WarlockShards; if(bar.PreUpdate) then bar:PreUpdate(unit) end - + if UnitHasVehicleUI("player") then bar:Hide() else bar:Show() end - + local spec = GetSpecialization() if spec then - bar.MaxCount = shardMax[spec] - if not bar:IsShown() then + local colors = shardColor[spec] + local numShards = UnitPower("player", SPELL_POWER_SOUL_SHARDS); + bar.MaxCount = UnitPowerMax("player", SPELL_POWER_SOUL_SHARDS); + + if not bar:IsShown() then bar:Show() end @@ -55,10 +52,6 @@ local Update = function(self, event, unit, powerType) bar:UpdateTextures(spec) end - local colors = shardColor[spec] - - local numShards = UnitPower("player", SPELL_POWER_SOUL_SHARDS); - for i = 1, 5 do if(i > bar.MaxCount) then bar[i]:Hide() @@ -92,7 +85,7 @@ end local function Enable(self, unit) if(unit ~= 'player') then return end - + local bar = self.WarlockShards if(bar) then bar.__owner = self @@ -134,4 +127,4 @@ local function Disable(self) end end -oUF:AddElement('WarlockShards', Path, Enable, Disable) \ No newline at end of file +oUF:AddElement('WarlockShards', Path, Enable, Disable) diff --git a/SVUI_UnitFrames/libs/oUF/elements/health.lua b/SVUI_UnitFrames/libs/oUF/elements/health.lua index e3d31de..a75e020 100644 --- a/SVUI_UnitFrames/libs/oUF/elements/health.lua +++ b/SVUI_UnitFrames/libs/oUF/elements/health.lua @@ -32,7 +32,7 @@ local parent, ns = ... local oUF = ns.oUF oUF.colors.health = {49/255, 207/255, 37/255} -local UpdateFrequentUpdates +--local UpdateFrequentUpdates local Update = function(self, event, unit) if(self.unit ~= unit) or not unit then return end @@ -101,9 +101,9 @@ local Update = function(self, event, unit) end end - if health.frequentUpdates ~= health.__frequentUpdates then - UpdateFrequentUpdates(self) - end + -- if health.frequentUpdates ~= health.__frequentUpdates then + -- UpdateFrequentUpdates(self) + -- end if self.ResurrectIcon then self.ResurrectIcon:SetAlpha(min == 0 and 1 or 0) @@ -132,27 +132,27 @@ local ForceUpdate = function(element) return Update(element.__owner, 'ForceUpdate', element.__owner.unit) end -function UpdateFrequentUpdates(self) - local health = self.Health - health.__frequentUpdates = health.frequentUpdates - if health.frequentUpdates and not self:IsEventRegistered("UNIT_HEALTH_FREQUENT") then - if GetCVarBool("predictedHealth") ~= 1 then - SetCVar("predictedHealth", 1) - end - - self:RegisterEvent('UNIT_HEALTH_FREQUENT', Update) - - if self:IsEventRegistered("UNIT_HEALTH") then - self:UnregisterEvent("UNIT_HEALTH", Update) - end - elseif not self:IsEventRegistered("UNIT_HEALTH") then - self:RegisterEvent('UNIT_HEALTH', Update) - - if self:IsEventRegistered("UNIT_HEALTH_FREQUENT") then - self:UnregisterEvent("UNIT_HEALTH_FREQUENT", Update) - end - end -end +-- function UpdateFrequentUpdates(self) +-- local health = self.Health +-- health.__frequentUpdates = health.frequentUpdates +-- if health.frequentUpdates and not self:IsEventRegistered("UNIT_HEALTH_FREQUENT") then +-- if GetCVarBool("predictedHealth") ~= 1 then +-- SetCVar("predictedHealth", 1) +-- end +-- +-- self:RegisterEvent('UNIT_HEALTH_FREQUENT', Update) +-- +-- if self:IsEventRegistered("UNIT_HEALTH") then +-- self:UnregisterEvent("UNIT_HEALTH", Update) +-- end +-- elseif not self:IsEventRegistered("UNIT_HEALTH") then +-- self:RegisterEvent('UNIT_HEALTH', Update) +-- +-- if self:IsEventRegistered("UNIT_HEALTH_FREQUENT") then +-- self:UnregisterEvent("UNIT_HEALTH_FREQUENT", Update) +-- end +-- end +-- end local Enable = function(self, unit) local health = self.Health @@ -161,17 +161,12 @@ local Enable = function(self, unit) health.ForceUpdate = ForceUpdate health.__frequentUpdates = health.frequentUpdates - if(health.frequentUpdates) then - self:RegisterEvent('UNIT_HEALTH_FREQUENT', Update) - else - self:RegisterEvent('UNIT_HEALTH', Update) - end - + self:RegisterEvent('UNIT_HEALTH', Update) self:RegisterEvent("UNIT_MAXHEALTH", Update) self:RegisterEvent('UNIT_CONNECTION', Update) - - -- For tapping. self:RegisterEvent('UNIT_FACTION', Update) + self:RegisterUnitEvent("UNIT_HEALTH", unit); + self:RegisterUnitEvent("UNIT_MAXHEALTH", unit); if(health:IsObjectType'StatusBar' and not health:GetStatusBarTexture()) then health:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]] diff --git a/SVUI_UnitFrames/libs/oUF/elements/power.lua b/SVUI_UnitFrames/libs/oUF/elements/power.lua index d246560..98e612b 100644 --- a/SVUI_UnitFrames/libs/oUF/elements/power.lua +++ b/SVUI_UnitFrames/libs/oUF/elements/power.lua @@ -1,13 +1,13 @@ local parent, ns = ... local oUF = ns.oUF -local updateFrequentUpdates oUF.colors.power = {} for power, color in next, PowerBarColor do if(type(power) == 'string') then oUF.colors.power[power] = {color.r, color.g, color.b} end end + local GetDisplayPower = function(power, unit) if not unit then return; end local _, _, _, _, _, _, showOnRaid = UnitAlternatePowerInfo(unit) @@ -24,14 +24,14 @@ local Update = function(self, event, unit) if(power.PreUpdate) then power:PreUpdate(unit) end - local displayType = GetDisplayPower(power, unit) - local min, max = UnitPower(unit, displayType), UnitPowerMax(unit, displayType) + local displayType = GetDisplayPower(power, unit); + local min = UnitPower(unit, displayType); + local max = UnitPowerMax(unit, displayType); local disconnected = not UnitIsConnected(unit) if max == 0 then max = 1 end power:SetMinMaxValues(0, max) - if(disconnected) then power:SetValue(max) else @@ -41,7 +41,6 @@ local Update = function(self, event, unit) power.disconnected = disconnected if power.frequentUpdates ~= power.__frequentUpdates then power.__frequentUpdates = power.frequentUpdates - updateFrequentUpdates(self) end local r, g, b, t @@ -93,23 +92,6 @@ local ForceUpdate = function(element) return Path(element.__owner, 'ForceUpdate', element.__owner.unit) end -function updateFrequentUpdates(self) - local power = self.Power - if power.frequentUpdates and not self:IsEventRegistered('UNIT_POWER_FREQUENT') then - self:RegisterEvent('UNIT_POWER_FREQUENT', Path) - - if self:IsEventRegistered('UNIT_POWER') then - self:UnregisterEvent('UNIT_POWER', Path) - end - elseif not self:IsEventRegistered('UNIT_POWER') then - self:RegisterEvent('UNIT_POWER', Path) - - if self:IsEventRegistered('UNIT_POWER_FREQUENT') then - self:UnregisterEvent('UNIT_POWER_FREQUENT', Path) - end - end -end - local Enable = function(self, unit) local power = self.Power if(power) then @@ -117,16 +99,17 @@ local Enable = function(self, unit) power.ForceUpdate = ForceUpdate power.__frequentUpdates = power.frequentUpdates - updateFrequentUpdates(self) self:RegisterEvent('UNIT_POWER_BAR_SHOW', Path) self:RegisterEvent('UNIT_POWER_BAR_HIDE', Path) self:RegisterEvent('UNIT_DISPLAYPOWER', Path) self:RegisterEvent('UNIT_CONNECTION', Path) + self:RegisterEvent('UNIT_FACTION', Path) self:RegisterEvent('UNIT_MAXPOWER', Path) + self:RegisterEvent('UNIT_POWER', Path) + self:RegisterUnitEvent("UNIT_POWER", unit); + self:RegisterUnitEvent("UNIT_MAXPOWER", unit); - -- For tapping. - self:RegisterEvent('UNIT_FACTION', Path) if(power:IsObjectType'StatusBar' and not power:GetStatusBarTexture()) then power:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]]