mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
update some more (still needs more work)
This commit is contained in:
@@ -9,19 +9,20 @@
|
|||||||
<Include file="AceComm-3.0\AceComm-3.0.xml"/>
|
<Include file="AceComm-3.0\AceComm-3.0.xml"/>
|
||||||
<Include file="AceSerializer-3.0\AceSerializer-3.0.xml"/>
|
<Include file="AceSerializer-3.0\AceSerializer-3.0.xml"/>
|
||||||
<Include file="AceTimer-3.0\AceTimer-3.0.xml"/>
|
<Include file="AceTimer-3.0\AceTimer-3.0.xml"/>
|
||||||
<Include file="LibItemPrice-1.1\LibItemPrice-1.1.xml"/>
|
|
||||||
<Include file="AceHook-3.0\AceHook-3.0.xml"/>
|
<Include file="AceHook-3.0\AceHook-3.0.xml"/>
|
||||||
|
<Include file="LibItemPrice-1.1\LibItemPrice-1.1.xml"/>
|
||||||
<Include file="LibSharedMedia-3.0\LibSharedMedia-3.0.xml"/>
|
<Include file="LibSharedMedia-3.0\LibSharedMedia-3.0.xml"/>
|
||||||
<Include file="LibSimpleSticky\LibSimpleSticky.xml"/>
|
<Include file="LibSimpleSticky\LibSimpleSticky.xml"/>
|
||||||
<Include file="LibDataBroker\LibDataBroker-1.1.xml"/>
|
<Include file="LibDataBroker\LibDataBroker-1.1.xml"/>
|
||||||
<Include file="LibElvUIPlugin-1.0\LibElvUIPlugin-1.0.xml"/>
|
<Include file="LibElvUIPlugin-1.0\LibElvUIPlugin-1.0.xml"/>
|
||||||
<Include file="oUF\oUF.xml"/>
|
<Include file="oUF\oUF.xml"/>
|
||||||
<Include file="oUF_Plugins\oUF_Plugins.xml"/>
|
<Include file="oUF_Plugins\oUF_Plugins.xml"/>
|
||||||
|
<Include file="LibElvUIPlugin-1.0\LibElvUIPlugin-1.0.xml"/>
|
||||||
<Include file="UTF8\UTF8.xml"/>
|
<Include file="UTF8\UTF8.xml"/>
|
||||||
|
<Include file="LibItemSearch-1.2\LibItemSearch-1.2.xml"/>
|
||||||
<Include file="LibCompress\LibCompress.xml"/>
|
<Include file="LibCompress\LibCompress.xml"/>
|
||||||
<Include file="LibBase64-1.0\LibBase64-1.0.xml"/>
|
<Include file="LibBase64-1.0\LibBase64-1.0.xml"/>
|
||||||
<Include file="LibAnim\LibAnim.xml"/>
|
<Include file="LibAnim\LibAnim.xml"/>
|
||||||
<Include file="LibWho-2.0\LibWho-2.0.xml"/>
|
<Include file="LibWho-2.0\LibWho-2.0.xml"/>
|
||||||
<Include file="LibUIDropDownMenu\LibUIDropDownMenu.xml"/>
|
<Include file="LibUIDropDownMenu\LibUIDropDownMenu.xml"/>
|
||||||
<Include file="LibItemSearch-1.2\LibItemSearch-1.2.xml"/>
|
|
||||||
</Ui>
|
</Ui>
|
||||||
@@ -14,6 +14,5 @@
|
|||||||
<Script file="masterlooterindicator.lua"/>
|
<Script file="masterlooterindicator.lua"/>
|
||||||
<Script file="assistantindicator.lua"/>
|
<Script file="assistantindicator.lua"/>
|
||||||
<Script file="combopoints.lua"/>
|
<Script file="combopoints.lua"/>
|
||||||
<!-- <Script file="raidroleindicator.lua"/> -->
|
|
||||||
<Script file="happinessindicator.lua"/>
|
<Script file="happinessindicator.lua"/>
|
||||||
</Ui>
|
</Ui>
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
--[[
|
|
||||||
# Element: Raid Role Indicator
|
|
||||||
|
|
||||||
Handles the visibility and updating of an indicator based on the unit's raid assignment (main tank or main assist).
|
|
||||||
|
|
||||||
## Widget
|
|
||||||
|
|
||||||
RaidRoleIndicator - A `Texture` representing the unit's raid assignment.
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
This element updates by changing the texture.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
-- Position and size
|
|
||||||
local RaidRoleIndicator = self:CreateTexture(nil, 'OVERLAY')
|
|
||||||
RaidRoleIndicator:SetSize(16, 16)
|
|
||||||
RaidRoleIndicator:SetPoint('TOPLEFT')
|
|
||||||
|
|
||||||
-- Register it with oUF
|
|
||||||
self.RaidRoleIndicator = RaidRoleIndicator
|
|
||||||
--]]
|
|
||||||
|
|
||||||
local ns = oUF
|
|
||||||
local oUF = ns.oUF
|
|
||||||
|
|
||||||
local GetPartyAssignment = GetPartyAssignment
|
|
||||||
local UnitInRaid = UnitInRaid
|
|
||||||
|
|
||||||
local MAINTANK_ICON = [[Interface\GROUPFRAME\UI-GROUP-MAINTANKICON]]
|
|
||||||
local MAINASSIST_ICON = [[Interface\GROUPFRAME\UI-GROUP-MAINASSISTICON]]
|
|
||||||
|
|
||||||
local function Update(self, event)
|
|
||||||
local unit = self.unit
|
|
||||||
|
|
||||||
local element = self.RaidRoleIndicator
|
|
||||||
|
|
||||||
--[[ Callback: RaidRoleIndicator:PreUpdate()
|
|
||||||
Called before the element has been updated.
|
|
||||||
|
|
||||||
* self - the RaidRoleIndicator element
|
|
||||||
--]]
|
|
||||||
if(element.PreUpdate) then
|
|
||||||
element:PreUpdate()
|
|
||||||
end
|
|
||||||
|
|
||||||
local role, isShown
|
|
||||||
if(UnitInRaid(unit)) then
|
|
||||||
if(GetPartyAssignment('MAINTANK', unit)) then
|
|
||||||
isShown = true
|
|
||||||
element:SetTexture(MAINTANK_ICON)
|
|
||||||
role = 'MAINTANK'
|
|
||||||
elseif(GetPartyAssignment('MAINASSIST', unit)) then
|
|
||||||
isShown = true
|
|
||||||
element:SetTexture(MAINASSIST_ICON)
|
|
||||||
role = 'MAINASSIST'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if isShown then
|
|
||||||
element:Show()
|
|
||||||
else
|
|
||||||
element:Hide()
|
|
||||||
end
|
|
||||||
|
|
||||||
--[[ Callback: RaidRoleIndicator:PostUpdate(role)
|
|
||||||
Called after the element has been updated.
|
|
||||||
|
|
||||||
* self - the RaidRoleIndicator element
|
|
||||||
* role - the unit's raid assignment (string?)['MAINTANK', 'MAINASSIST']
|
|
||||||
--]]
|
|
||||||
if(element.PostUpdate) then
|
|
||||||
return element:PostUpdate(role)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function Path(self, ...)
|
|
||||||
--[[ Override: RaidRoleIndicator.Override(self, event, ...)
|
|
||||||
Used to completely override the internal update function.
|
|
||||||
|
|
||||||
* self - the parent object
|
|
||||||
* event - the event triggering the update (string)
|
|
||||||
* ... - the arguments accompanying the event
|
|
||||||
--]]
|
|
||||||
return (self.RaidRoleIndicator.Override or Update)(self, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function ForceUpdate(element)
|
|
||||||
return Path(element.__owner, 'ForceUpdate')
|
|
||||||
end
|
|
||||||
|
|
||||||
local function Enable(self)
|
|
||||||
local element = self.RaidRoleIndicator
|
|
||||||
if(element) then
|
|
||||||
element.__owner = self
|
|
||||||
element.ForceUpdate = ForceUpdate
|
|
||||||
|
|
||||||
self:RegisterEvent('PARTY_MEMBERS_CHANGED', Path, true)
|
|
||||||
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function Disable(self)
|
|
||||||
local element = self.RaidRoleIndicator
|
|
||||||
if(element) then
|
|
||||||
element:Hide()
|
|
||||||
|
|
||||||
self:UnregisterEvent('PARTY_MEMBERS_CHANGED', Path)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
oUF:AddElement('RaidRoleIndicator', Path, Enable, Disable)
|
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
--By Elv, for E.
|
||||||
|
local ns = oUF
|
||||||
|
local oUF = ns.oUF
|
||||||
|
|
||||||
|
local UnitAffectingCombat = UnitAffectingCombat
|
||||||
|
local UnitHealth, UnitHealthMax = UnitHealth, UnitHealthMax
|
||||||
|
local UnitExists = UnitExists
|
||||||
|
|
||||||
|
local frames, allFrames = {}, {}
|
||||||
|
local showStatus
|
||||||
|
|
||||||
|
local CheckForReset = function()
|
||||||
|
for frame, unit in pairs(allFrames) do
|
||||||
|
if frame.fadeInfo and frame.fadeInfo.reset then
|
||||||
|
frame:SetAlpha(1)
|
||||||
|
frame.fadeInfo.reset = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local FadeFramesInOut = function(fade, unit)
|
||||||
|
local E = unpack(ElvUI)
|
||||||
|
for frame, unit in pairs(frames) do
|
||||||
|
if not UnitExists(unit) then return end
|
||||||
|
if fade then
|
||||||
|
if frame:GetAlpha() ~= 1 or (frame.fadeInfo and frame.fadeInfo.endAlpha == 0) then
|
||||||
|
UIFrameFadeIn(frame, 0.15)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if frame:GetAlpha() ~= 0 then
|
||||||
|
UIFrameFadeOut(frame, 0.15)
|
||||||
|
frame.fadeInfo.finishedFunc = CheckForReset
|
||||||
|
else
|
||||||
|
showStatus = false;
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if unit == "player" then
|
||||||
|
showStatus = fade
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local Update = function(self, arg1, arg2)
|
||||||
|
if arg1 == "UNIT_HEALTH" and self and self.unit ~= arg2 then return end
|
||||||
|
if type(arg1) == "boolean" and not frames[self] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local E = unpack(ElvUI)
|
||||||
|
|
||||||
|
if not frames[self] then
|
||||||
|
UIFrameFadeIn(self, 0.15)
|
||||||
|
self.fadeInfo.reset = true
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local combat = UnitAffectingCombat("player")
|
||||||
|
local cur, max = UnitHealth("player"), UnitHealthMax("player")
|
||||||
|
local target = UnitExists("target")
|
||||||
|
|
||||||
|
if cur ~= max and showStatus ~= true then
|
||||||
|
FadeFramesInOut(true, frames[self])
|
||||||
|
elseif target and showStatus ~= true then
|
||||||
|
FadeFramesInOut(true, frames[self])
|
||||||
|
elseif arg1 == true and showStatus ~= true then
|
||||||
|
FadeFramesInOut(true, frames[self])
|
||||||
|
else
|
||||||
|
if combat and showStatus ~= true then
|
||||||
|
FadeFramesInOut(true, frames[self])
|
||||||
|
elseif not target and not combat and (cur == max) then
|
||||||
|
FadeFramesInOut(false, frames[self])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local Enable = function(self, unit)
|
||||||
|
if self.CombatFade then
|
||||||
|
frames[self] = self.unit
|
||||||
|
allFrames[self] = self.unit
|
||||||
|
|
||||||
|
if unit == "player" then
|
||||||
|
showStatus = false;
|
||||||
|
end
|
||||||
|
|
||||||
|
self:RegisterEvent("PLAYER_ENTERING_WORLD", Update)
|
||||||
|
self:RegisterEvent("PLAYER_REGEN_ENABLED", Update)
|
||||||
|
self:RegisterEvent("PLAYER_REGEN_DISABLED", Update)
|
||||||
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", Update)
|
||||||
|
self:RegisterEvent("UNIT_HEALTH", Update)
|
||||||
|
self:RegisterEvent("UNIT_SPELLCAST_START", Update)
|
||||||
|
self:RegisterEvent("UNIT_SPELLCAST_STOP", Update)
|
||||||
|
self:RegisterEvent("UNIT_PORTRAIT_UPDATE", Update)
|
||||||
|
self:RegisterEvent("UNIT_MODEL_CHANGED", Update)
|
||||||
|
|
||||||
|
if not self.CombatFadeHooked then
|
||||||
|
HookScript(self, "OnEnter", function(self) Update(self, true) end)
|
||||||
|
HookScript(self, "OnLeave", function(self) Update(self, false) end)
|
||||||
|
self.CombatFadeHooked = true
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local Disable = function(self)
|
||||||
|
if(self.CombatFade) then
|
||||||
|
frames[self] = nil
|
||||||
|
Update(self)
|
||||||
|
|
||||||
|
self:UnregisterEvent("PLAYER_ENTERING_WORLD", Update)
|
||||||
|
self:UnregisterEvent("PLAYER_REGEN_ENABLED", Update)
|
||||||
|
self:UnregisterEvent("PLAYER_REGEN_DISABLED", Update)
|
||||||
|
self:UnregisterEvent("PLAYER_TARGET_CHANGED", Update)
|
||||||
|
self:UnregisterEvent("UNIT_HEALTH", Update)
|
||||||
|
self:UnregisterEvent("UNIT_SPELLCAST_START", Update)
|
||||||
|
self:UnregisterEvent("UNIT_SPELLCAST_STOP", Update)
|
||||||
|
self:UnregisterEvent("UNIT_PORTRAIT_UPDATE", Update)
|
||||||
|
self:UnregisterEvent("UNIT_MODEL_CHANGED", Update)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
oUF:AddElement("CombatFade", Update, Enable, Disable)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
|
<Script file="oUF_CombatFader.lua"/>
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
local ns = oUF
|
||||||
|
local oUF = ns.oUF
|
||||||
|
if not oUF then return end
|
||||||
|
|
||||||
|
local UnitAura = UnitAura
|
||||||
|
local UnitCanAssist = UnitCanAssist
|
||||||
|
|
||||||
|
local playerClass = select(2, UnitClass("player"))
|
||||||
|
local CanDispel = {
|
||||||
|
PRIEST = {Magic = true, Disease = true},
|
||||||
|
SHAMAN = {Poison = true, Disease = true},
|
||||||
|
PALADIN = {Magic = true, Poison = true, Disease = true},
|
||||||
|
MAGE = {Curse = true},
|
||||||
|
DRUID = {Curse = true, Poison = true}
|
||||||
|
}
|
||||||
|
|
||||||
|
local dispellist = CanDispel[playerClass] or {}
|
||||||
|
local origColors = {}
|
||||||
|
local origBorderColors = {}
|
||||||
|
local origPostUpdateAura = {}
|
||||||
|
|
||||||
|
local function GetDebuffType(unit, filter, filterTable)
|
||||||
|
if not unit or not UnitCanAssist("player", unit) then return nil end
|
||||||
|
local i = 1
|
||||||
|
while true do
|
||||||
|
local name, _, texture, _, debufftype = UnitAura(unit, i, "HARMFUL")
|
||||||
|
if not texture then break end
|
||||||
|
|
||||||
|
local filterSpell = filterTable[name]
|
||||||
|
|
||||||
|
if(filterTable and filterSpell and filterSpell.enable) then
|
||||||
|
return debufftype, texture, true, filterSpell.style, filterSpell.color
|
||||||
|
elseif(debufftype and (not filter or (filter and dispellist[debufftype]))) then
|
||||||
|
return debufftype, texture;
|
||||||
|
end
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Update(object, event, unit)
|
||||||
|
if(unit ~= object.unit) then return; end
|
||||||
|
|
||||||
|
local debuffType, texture, wasFiltered, style, color = GetDebuffType(unit, object.DebuffHighlightFilter, object.DebuffHighlightFilterTable);
|
||||||
|
if(wasFiltered) then
|
||||||
|
if(style == "GLOW" and object.DBHGlow) then
|
||||||
|
object.DBHGlow:Show();
|
||||||
|
object.DBHGlow:SetBackdropBorderColor(color.r, color.g, color.b);
|
||||||
|
elseif(object.DBHGlow) then
|
||||||
|
object.DBHGlow:Hide();
|
||||||
|
object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, color.a or object.DebuffHighlightAlpha or .5);
|
||||||
|
end
|
||||||
|
elseif(debuffType) then
|
||||||
|
color = DebuffTypeColor[debuffType];
|
||||||
|
if(object.DebuffHighlightBackdrop and object.DBHGlow) then
|
||||||
|
object.DBHGlow:Show();
|
||||||
|
object.DBHGlow:SetBackdropBorderColor(color.r, color.g, color.b);
|
||||||
|
elseif(object.DebuffHighlightUseTexture) then
|
||||||
|
object.DebuffHighlight:SetTexture(texture);
|
||||||
|
else
|
||||||
|
object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, object.DebuffHighlightAlpha or .5);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if(object.DBHGlow) then
|
||||||
|
object.DBHGlow:Hide();
|
||||||
|
end
|
||||||
|
|
||||||
|
if(object.DebuffHighlightUseTexture) then
|
||||||
|
object.DebuffHighlight:SetTexture(nil);
|
||||||
|
else
|
||||||
|
object.DebuffHighlight:SetVertexColor(0, 0, 0, 0);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if object.DebuffHighlight.PostUpdate then
|
||||||
|
object.DebuffHighlight:PostUpdate(object, debuffType, texture, wasFiltered, style, color)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Enable(object)
|
||||||
|
-- if we're not highlighting this unit return
|
||||||
|
if not object.DebuffHighlightBackdrop and not object.DebuffHighlight and not object.DBHGlow then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- if we're filtering highlights and we're not of the dispelling type, return
|
||||||
|
if object.DebuffHighlightFilter and not CanDispel[playerClass] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- make sure aura scanning is active for this object
|
||||||
|
object:RegisterEvent("UNIT_AURA", Update)
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Disable(object)
|
||||||
|
object:UnregisterEvent("UNIT_AURA", Update)
|
||||||
|
|
||||||
|
if(object.DBHGlow) then
|
||||||
|
object.DBHGlow:Hide();
|
||||||
|
end
|
||||||
|
|
||||||
|
if(object.DebuffHighlight) then
|
||||||
|
local color = origColors[object];
|
||||||
|
if(color) then
|
||||||
|
object.DebuffHighlight:SetVertexColor(color.r, color.g, color.b, color.a);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
oUF:AddElement("DebuffHighlight", Update, Enable, Disable)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
|
<Script file="oUF_DebuffHighlight.lua"/>
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,354 @@
|
|||||||
|
--[[
|
||||||
|
Name: LibDruidMana-1.0
|
||||||
|
Revision: $Rev: 29 $
|
||||||
|
Author: Cameron Kenneth Knight (ckknight@gmail.com)
|
||||||
|
Inspired By: SmartyCat by Darravis
|
||||||
|
Website: http://www.wowace.com/
|
||||||
|
Description: A library to provide data on mana for druids in bear or cat form.
|
||||||
|
License: LGPL v2.1
|
||||||
|
]]
|
||||||
|
|
||||||
|
if(select(2, UnitClass("player")) ~= "DRUID") then return; end
|
||||||
|
|
||||||
|
local MAJOR_VERSION = "LibDruidMana-1.0"
|
||||||
|
local MINOR_VERSION = 90001 + tonumber(string.match("$Revision: 29 $", "%d+"))
|
||||||
|
|
||||||
|
local floor = math.floor
|
||||||
|
|
||||||
|
local GetManaRegen = GetManaRegen
|
||||||
|
local GetNumSpellTabs = GetNumSpellTabs
|
||||||
|
local GetSpellName = GetSpellName
|
||||||
|
local GetSpellTabInfo = GetSpellTabInfo
|
||||||
|
local GetSpellTexture = GetSpellTexture
|
||||||
|
local GetTime = GetTime
|
||||||
|
local UnitMana = UnitMana
|
||||||
|
local UnitManaMax = UnitManaMax
|
||||||
|
local UnitPowerType = UnitPowerType
|
||||||
|
local UnitStat = UnitStat
|
||||||
|
|
||||||
|
local lib, oldMinor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
|
||||||
|
if not lib then return end
|
||||||
|
local oldLib
|
||||||
|
if oldMinor then
|
||||||
|
oldLib = {}
|
||||||
|
for k, v in pairs(lib) do
|
||||||
|
oldLib[k] = v
|
||||||
|
lib[k] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local regenMana, maxMana, currMana, currInt, fiveSecondRule
|
||||||
|
currMana, maxMana = 0, 0
|
||||||
|
local bearID, bearName, catName
|
||||||
|
|
||||||
|
-- frame for events and OnUpdate
|
||||||
|
local frame
|
||||||
|
if oldLib and oldLib.frame then
|
||||||
|
frame = oldLib.frame
|
||||||
|
frame:UnregisterAllEvents()
|
||||||
|
frame:SetScript("OnEvent", nil)
|
||||||
|
frame:SetScript("OnUpdate", nil)
|
||||||
|
for k in pairs(frame) do
|
||||||
|
if k ~= 0 then
|
||||||
|
frame[k] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frame = CreateFrame("Frame", MAJOR_VERSION .. "_Frame")
|
||||||
|
end
|
||||||
|
lib.frame = frame
|
||||||
|
|
||||||
|
-- tooltip for scanning the mana cost for shapeshifting.
|
||||||
|
local tt
|
||||||
|
if oldLib and oldLib.tt then
|
||||||
|
tt = oldLib.tt
|
||||||
|
else
|
||||||
|
tt = CreateFrame("GameTooltip", MAJOR_VERSION .. "_Tooltip")
|
||||||
|
end
|
||||||
|
lib.tt = tt
|
||||||
|
if not tt.left then
|
||||||
|
tt.left = {}
|
||||||
|
tt.right = {}
|
||||||
|
end
|
||||||
|
for i = table.getn(tt.left) + 1, 30 do
|
||||||
|
local left, right = tt:CreateFontString(), tt:CreateFontString()
|
||||||
|
tt.left[i] = left
|
||||||
|
tt.right[i] = right
|
||||||
|
left:SetFontObject(GameFontNormal)
|
||||||
|
right:SetFontObject(GameFontNormal)
|
||||||
|
tt:AddFontStrings(left, right)
|
||||||
|
end
|
||||||
|
tt:SetOwner(UIParent, "ANCHOR_NONE")
|
||||||
|
|
||||||
|
-- set of functions to call when mana is updated
|
||||||
|
local registry = oldLib and oldLib.registry or {}
|
||||||
|
lib.registry = registry
|
||||||
|
|
||||||
|
local function getShapeshiftCost()
|
||||||
|
if not bearID then return 0 end
|
||||||
|
|
||||||
|
tt:ClearLines()
|
||||||
|
tt:SetSpell(bearID, "spell")
|
||||||
|
|
||||||
|
if not tt:IsOwned(UIParent) then
|
||||||
|
tt:SetOwner(UIParent, "ANCHOR_NONE")
|
||||||
|
end
|
||||||
|
|
||||||
|
local line = tt.left[2]:GetText()
|
||||||
|
if line then
|
||||||
|
line = tonumber(string.match(line, "(%d+)"))
|
||||||
|
end
|
||||||
|
|
||||||
|
return line or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
frame:SetScript("OnEvent", function(...)
|
||||||
|
this[event](this, unpack(arg))
|
||||||
|
end)
|
||||||
|
|
||||||
|
local SetMax_time = nil
|
||||||
|
local UpdateMana_time = nil
|
||||||
|
local killFSR_time = nil
|
||||||
|
|
||||||
|
frame:SetScript("OnUpdate", function(this, elapsed)
|
||||||
|
local currentTime = GetTime()
|
||||||
|
if SetMax_time and SetMax_time <= currentTime then
|
||||||
|
SetMax_time = nil
|
||||||
|
this:SetMax()
|
||||||
|
end
|
||||||
|
if UpdateMana_time and UpdateMana_time <= currentTime then
|
||||||
|
UpdateMana_time = UpdateMana_time + 2
|
||||||
|
this:UpdateMana()
|
||||||
|
end
|
||||||
|
if killFSR_time and killFSR_time <= currentTime then
|
||||||
|
killFSR_time = nil
|
||||||
|
fiveSecondRule = false
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
function frame:PLAYER_LOGIN()
|
||||||
|
self.PLAYER_LOGIN = nil
|
||||||
|
|
||||||
|
self:LEARNED_SPELL_IN_TAB()
|
||||||
|
|
||||||
|
self:RegisterEvent("UNIT_DISPLAYPOWER")
|
||||||
|
|
||||||
|
if UnitPowerType("player") == 0 then
|
||||||
|
self:UNIT_DISPLAYPOWER("player")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:UNIT_DISPLAYPOWER(unit)
|
||||||
|
if unit ~= "player" or UnitPowerType("player") ~= 0 then return end
|
||||||
|
|
||||||
|
self:UnregisterEvent("UNIT_DISPLAYPOWER")
|
||||||
|
self.UNIT_DISPLAYPOWER = nil
|
||||||
|
|
||||||
|
maxMana = UnitManaMax("player")
|
||||||
|
currMana = UnitMana("player")
|
||||||
|
local _
|
||||||
|
_, currInt = UnitStat("player", 4)
|
||||||
|
|
||||||
|
self:RegisterEvent("UNIT_MANA")
|
||||||
|
self:RegisterEvent("UNIT_MAXMANA")
|
||||||
|
self:RegisterEvent("UNIT_INVENTORY_CHANGED")
|
||||||
|
self:RegisterEvent("PLAYER_AURAS_CHANGED")
|
||||||
|
self:RegisterEvent("LEARNED_SPELL_IN_TAB")
|
||||||
|
self:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
|
self:RegisterEvent("PLAYER_LEAVING_WORLD")
|
||||||
|
self:RegisterEvent("COMBAT_TEXT_UPDATE")
|
||||||
|
|
||||||
|
self:Update()
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:PLAYER_ENTERING_WORLD()
|
||||||
|
if UnitPowerType("player") ~= 0 then
|
||||||
|
SetMax_time = GetTime() + 7
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:PLAYER_LEAVING_WORLD()
|
||||||
|
SetMax_time = nil
|
||||||
|
UpdateMana_time = nil
|
||||||
|
killFSR_time = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:UNIT_MANA(unit)
|
||||||
|
if unit ~= "player" then return end
|
||||||
|
|
||||||
|
if UnitPowerType("player") == 0 then
|
||||||
|
currMana = UnitMana("player")
|
||||||
|
maxMana = UnitManaMax("player")
|
||||||
|
self:Update()
|
||||||
|
else
|
||||||
|
if regenMana and not UpdateMana_time then
|
||||||
|
-- Update mana every 2 seconds
|
||||||
|
UpdateMana_time = GetTime() + 2
|
||||||
|
self:UpdateMana()
|
||||||
|
end
|
||||||
|
-- if mana hasn't been updated for 7 seconds, set current mana to the max mana
|
||||||
|
SetMax_time = GetTime() + 7
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:UNIT_MAXMANA(unit)
|
||||||
|
if unit ~= "player" then return end
|
||||||
|
|
||||||
|
local _, int = UnitStat("player", 4)
|
||||||
|
if UnitPowerType("player") == 0 then
|
||||||
|
maxMana = UnitManaMax("player")
|
||||||
|
currMana = UnitMana("player")
|
||||||
|
currInt = int
|
||||||
|
elseif currInt ~= int then
|
||||||
|
-- int buff maybe
|
||||||
|
maxMana = maxMana + ((int - currInt) * 15)
|
||||||
|
currInt = int
|
||||||
|
if currMana > maxMana then
|
||||||
|
currMana = maxMana
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self:Update()
|
||||||
|
end
|
||||||
|
frame.UNIT_INVENTORY_CHANGED = frame.UNIT_MAXMANA
|
||||||
|
|
||||||
|
function frame:PLAYER_AURAS_CHANGED()
|
||||||
|
-- possibly losing the bear/cat buff
|
||||||
|
if UnitPowerType("player") == 0 then
|
||||||
|
regenMana = false
|
||||||
|
SetMax_time = nil
|
||||||
|
UpdateMana_time = nil
|
||||||
|
killFSR_time = nil
|
||||||
|
currMana = UnitMana("player")
|
||||||
|
maxMana = UnitManaMax("player")
|
||||||
|
end
|
||||||
|
|
||||||
|
self:Update()
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:COMBAT_TEXT_UPDATE()
|
||||||
|
-- if the spell is cast for either bear or cat, deduct the cost.
|
||||||
|
-- we can't rely on UNIT_DISPLAYPOWER since you could switch from bear -> bear, never calling that, so we check the spellcast.
|
||||||
|
if (bearName and arg2 == bearName) or (catName and arg2 == catName) then
|
||||||
|
regenMana = true
|
||||||
|
fiveSecondRule = true
|
||||||
|
killFSR_time = GetTime() + 5
|
||||||
|
currMana = currMana - getShapeshiftCost()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:LEARNED_SPELL_IN_TAB()
|
||||||
|
for i = 1, GetNumSpellTabs() do
|
||||||
|
local _, texture, offset, numSpells = GetSpellTabInfo(i)
|
||||||
|
-- the spell tab that shows the bear is the feral tree, gonna check for bear form and cat form, gleam important info
|
||||||
|
if string.find(texture, "Ability_Racial_BearForm") then
|
||||||
|
for j = offset + 1, offset + numSpells do
|
||||||
|
if string.find(GetSpellTexture(j, "spell"), "Ability_Racial_BearForm") then
|
||||||
|
bearID = j
|
||||||
|
bearName = GetSpellName(j, "spell")
|
||||||
|
elseif string.find(GetSpellTexture(j, "spell"), "Ability_Druid_CatForm") then
|
||||||
|
catName = GetSpellName(j, "spell")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:UpdateMana()
|
||||||
|
print(this)
|
||||||
|
local regen, castingRegen = GetManaRegen()
|
||||||
|
if fiveSecondRule then
|
||||||
|
currMana = currMana + floor(castingRegen * 2 + 0.5)
|
||||||
|
else
|
||||||
|
currMana = currMana + floor(regen * 2 + 0.5)
|
||||||
|
end
|
||||||
|
|
||||||
|
if currMana >= maxMana then
|
||||||
|
currMana = maxMana
|
||||||
|
|
||||||
|
-- we're at max mana, no need for any more checking
|
||||||
|
SetMax_time = nil
|
||||||
|
UpdateMana_time = nil
|
||||||
|
killFSR_time = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
self:Update()
|
||||||
|
end
|
||||||
|
|
||||||
|
function frame:SetMax()
|
||||||
|
currMana = maxMana
|
||||||
|
|
||||||
|
-- we're at max mana, no need for any more checking
|
||||||
|
SetMax_time = nil
|
||||||
|
UpdateMana_time = nil
|
||||||
|
killFSR_time = nil
|
||||||
|
|
||||||
|
self:Update()
|
||||||
|
end
|
||||||
|
local i = 0
|
||||||
|
local lastMaxMana, lastCurrMana = 0, 0
|
||||||
|
function frame:Update()
|
||||||
|
if lastMaxMana == maxMana and lastCurrMana == currMana then return end
|
||||||
|
|
||||||
|
lastMaxMana = maxMana
|
||||||
|
lastCurrMana = currMana
|
||||||
|
|
||||||
|
-- trigger event
|
||||||
|
for func in pairs(registry) do
|
||||||
|
local success, ret = pcall(func, currMana, maxMana)
|
||||||
|
if not success then
|
||||||
|
geterrorhandler()(ret)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- if IsLoggedIn() then
|
||||||
|
frame:PLAYER_LOGIN()
|
||||||
|
-- else
|
||||||
|
-- frame:RegisterEvent("PLAYER_LOGIN")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
function lib:GetCurrentMana()
|
||||||
|
return currMana
|
||||||
|
end
|
||||||
|
|
||||||
|
function lib:GetMaximumMana()
|
||||||
|
return maxMana
|
||||||
|
end
|
||||||
|
|
||||||
|
function lib:AddListener(tab, method)
|
||||||
|
local func
|
||||||
|
if type(tab) == "table" then
|
||||||
|
if type(method) ~= "string" then
|
||||||
|
error(format("Bad argument #3 to `AddListener'. Expected %q, got %q.", "string", type(method)), 2)
|
||||||
|
elseif type(tab[method]) ~= "function" then
|
||||||
|
error(format("Bad argument #3 to `AddListener'. Expected method, got %q.", type(tab[method])), 2)
|
||||||
|
end
|
||||||
|
func = function(...)
|
||||||
|
return tab[method](tab, unpack(arg))
|
||||||
|
end
|
||||||
|
elseif type(tab) == "function" then
|
||||||
|
func = tab
|
||||||
|
if method and type(method) ~= "string" then
|
||||||
|
method = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
error(format("Bad argument #2 to `AddListener'. Expected %q or %q, got %q.", "table", "function", type(tab)), 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
registry[func] = method
|
||||||
|
end
|
||||||
|
|
||||||
|
function lib:RemoveListener(method)
|
||||||
|
if type(method) ~= "string" then
|
||||||
|
error(format("Bad argument #2 to `RemoveListener'. Expected %q, got %q.", "string", type(method)), 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
for func, methodName in pairs(registry) do
|
||||||
|
if methodName == method then
|
||||||
|
registry[func] = nil
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
|
<Script file="LibDruidMana-1.0.lua"/>
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
if(select(2, UnitClass("player")) ~= "DRUID") then return; end
|
||||||
|
|
||||||
|
local ns = oUF
|
||||||
|
local oUF = ns.oUF
|
||||||
|
|
||||||
|
local LDM = LibStub("LibDruidMana-1.0")
|
||||||
|
|
||||||
|
local function UpdateColor(element, cur, max)
|
||||||
|
local parent = element.__owner
|
||||||
|
|
||||||
|
local r, g, b, t
|
||||||
|
if(element.colorClass) then
|
||||||
|
t = parent.colors.class['DRUID']
|
||||||
|
elseif(element.colorSmooth) then
|
||||||
|
r, g, b = parent.ColorGradient(cur, max, unpack(element.smoothGradient or parent.colors.smooth))
|
||||||
|
elseif(element.colorPower) then
|
||||||
|
t = parent.colors.power[0]
|
||||||
|
end
|
||||||
|
|
||||||
|
if(t) then
|
||||||
|
r, g, b = t[1], t[2], t[3]
|
||||||
|
end
|
||||||
|
|
||||||
|
if(b) then
|
||||||
|
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
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Update(self, event, unit, currMana, maxMana)
|
||||||
|
if(unit ~= 'player') then return end
|
||||||
|
|
||||||
|
local element = self.DruidAltMana
|
||||||
|
if(element.PreUpdate) then element:PreUpdate(unit) end
|
||||||
|
|
||||||
|
local cur, max = currMana, maxMana
|
||||||
|
if not (cur and max) then
|
||||||
|
cur, max = LDM:GetCurrentMana(), LDM:GetMaximumMana()
|
||||||
|
end
|
||||||
|
|
||||||
|
element:SetMinMaxValues(0, max)
|
||||||
|
element:SetValue(cur)
|
||||||
|
|
||||||
|
element:UpdateColor(cur, max)
|
||||||
|
|
||||||
|
if(element.PostUpdate) then
|
||||||
|
return element:PostUpdate(unit, cur, max, event)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Path(self, ...)
|
||||||
|
return (self.DruidAltMana.Override or Update) (self, unpack(arg))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function ElementEnable(self)
|
||||||
|
self:RegisterEvent("UNIT_MANA", Path)
|
||||||
|
self:RegisterEvent("UNIT_MAXMANA", Path)
|
||||||
|
|
||||||
|
self.DruidAltMana:Show()
|
||||||
|
|
||||||
|
if self.DruidAltMana.PostUpdateVisibility then
|
||||||
|
self.DruidAltMana:PostUpdateVisibility(true, not self.DruidAltMana.isEnabled)
|
||||||
|
end
|
||||||
|
|
||||||
|
self.DruidAltMana.isEnabled = true
|
||||||
|
|
||||||
|
Path(self, 'ElementEnable', 'player', UnitPowerType("player", 0))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function ElementDisable(self)
|
||||||
|
self:UnregisterEvent("UNIT_MANA", Path)
|
||||||
|
self:UnregisterEvent("UNIT_MAXMANA", Path)
|
||||||
|
|
||||||
|
self.DruidAltMana:Hide()
|
||||||
|
|
||||||
|
if self.DruidAltMana.PostUpdateVisibility then
|
||||||
|
self.DruidAltMana:PostUpdateVisibility(false, self.DruidAltMana.isEnabled)
|
||||||
|
end
|
||||||
|
|
||||||
|
self.DruidAltMana.isEnabled = nil
|
||||||
|
|
||||||
|
Path(self, 'ElementDisable', 'player', UnitPowerType("player", 0))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Visibility(self, event, unit)
|
||||||
|
local shouldEnable
|
||||||
|
|
||||||
|
if UnitPowerType("player") ~= 0 then
|
||||||
|
shouldEnable = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if(shouldEnable) then
|
||||||
|
ElementEnable(self)
|
||||||
|
else
|
||||||
|
ElementDisable(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function VisibilityPath(self, ...)
|
||||||
|
return (self.DruidAltMana.OverrideVisibility or Visibility) (self, unpack(arg))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function ForceUpdate(element)
|
||||||
|
return VisibilityPath(element.__owner, 'ForceUpdate', element.__owner.unit)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Enable(self, unit)
|
||||||
|
local element = self.DruidAltMana
|
||||||
|
if(element and unit == 'player') then
|
||||||
|
element.__owner = self
|
||||||
|
element.ForceUpdate = ForceUpdate
|
||||||
|
|
||||||
|
LDM:AddListener(function(currMana, maxMana)
|
||||||
|
Update(self, "Listener", "player", currMana, maxMana)
|
||||||
|
end, "oUF_DruidMana")
|
||||||
|
|
||||||
|
self:RegisterEvent('PLAYER_LOGIN', VisibilityPath) -- need?
|
||||||
|
self:RegisterEvent('PLAYER_ENTERING_WORLD', VisibilityPath)
|
||||||
|
self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', VisibilityPath) -- need?
|
||||||
|
self:RegisterEvent('UNIT_DISPLAYPOWER', VisibilityPath)
|
||||||
|
|
||||||
|
if(element:IsObjectType('StatusBar') and not element:GetStatusBarTexture()) then
|
||||||
|
element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
|
||||||
|
end
|
||||||
|
|
||||||
|
if(not element.UpdateColor) then
|
||||||
|
element.UpdateColor = UpdateColor
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Disable(self)
|
||||||
|
local element = self.DruidAltMana
|
||||||
|
if(element) then
|
||||||
|
ElementDisable(self)
|
||||||
|
LDM:RemoveListener("oUF_DruidMana")
|
||||||
|
|
||||||
|
self:UnregisterEvent('PLAYER_LOGIN', VisibilityPath) -- need?
|
||||||
|
self:UnregisterEvent('PLAYER_ENTERING_WORLD', VisibilityPath)
|
||||||
|
self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', VisibilityPath) -- need?
|
||||||
|
self:UnregisterEvent('UNIT_DISPLAYPOWER', VisibilityPath)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
oUF:AddElement("DruidAltMana", VisibilityPath, Enable, Disable)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
|
<Include file="LibDruidMana-1.0\LibDruidMana-1.0.xml"/>
|
||||||
|
<Script file="oUF_DruidMana.lua"/>
|
||||||
|
</Ui>
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
|
<Include file="oUF_RaidDebuffs\oUF_RaidDebuffs.xml"/>
|
||||||
|
<Include file="oUF_DruidMana\oUF_DruidMana.xml"/>
|
||||||
|
<Include file="oUF_DebuffHighlight\oUF_DebuffHighlight.xml"/>
|
||||||
<Include file="oUF_Smooth\oUF_Smooth.xml"/>
|
<Include file="oUF_Smooth\oUF_Smooth.xml"/>
|
||||||
|
<Include file="oUF_CombatFader\oUF_CombatFader.xml"/>
|
||||||
<Include file="oUF_GPS\oUF_GPS.xml"/>
|
<Include file="oUF_GPS\oUF_GPS.xml"/>
|
||||||
</Ui>
|
</Ui>
|
||||||
@@ -0,0 +1,263 @@
|
|||||||
|
local ns = oUF
|
||||||
|
local oUF = ns.oUF
|
||||||
|
|
||||||
|
local pairs, type = pairs, type
|
||||||
|
local format = string.format
|
||||||
|
local floor = math.floor
|
||||||
|
|
||||||
|
local GetSpellInfo = GetSpellInfo
|
||||||
|
local GetTime = GetTime
|
||||||
|
local UnitDebuff = UnitAura
|
||||||
|
|
||||||
|
local addon = {}
|
||||||
|
ns.oUF_RaidDebuffs = addon
|
||||||
|
oUF_RaidDebuffs = ns.oUF_RaidDebuffs
|
||||||
|
if(not _G.oUF_RaidDebuffs) then
|
||||||
|
_G.oUF_RaidDebuffs = addon
|
||||||
|
end
|
||||||
|
|
||||||
|
local debuff_data = {}
|
||||||
|
addon.DebuffData = debuff_data
|
||||||
|
|
||||||
|
addon.ShowDispellableDebuff = true
|
||||||
|
addon.FilterDispellableDebuff = true
|
||||||
|
|
||||||
|
addon.priority = 10
|
||||||
|
|
||||||
|
local function add(spell, priority, stackThreshold)
|
||||||
|
if(spell) then
|
||||||
|
debuff_data[spell] = {
|
||||||
|
priority = (addon.priority + priority),
|
||||||
|
stackThreshold = (stackThreshold or 0)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function addon:RegisterDebuffs(t)
|
||||||
|
for spell, value in pairs(t) do
|
||||||
|
if(type(t[spell]) == 'boolean') then
|
||||||
|
local oldValue = t[spell]
|
||||||
|
t[spell] = {
|
||||||
|
['enable'] = oldValue,
|
||||||
|
['priority'] = 0,
|
||||||
|
['stackThreshold'] = 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if(t[spell].enable) then
|
||||||
|
add(spell, t[spell].priority, t[spell].stackThreshold)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function addon:ResetDebuffData()
|
||||||
|
wipe(debuff_data)
|
||||||
|
end
|
||||||
|
|
||||||
|
local DispellColor = {
|
||||||
|
['Magic'] = {.2, .6, 1},
|
||||||
|
['Curse'] = {.6, 0, 1},
|
||||||
|
['Disease'] = {.6, .4, 0},
|
||||||
|
['Poison'] = {0, .6, 0}
|
||||||
|
}
|
||||||
|
|
||||||
|
local DispellPriority = {
|
||||||
|
['Magic'] = 4,
|
||||||
|
['Curse'] = 3,
|
||||||
|
['Disease'] = 2,
|
||||||
|
['Poison'] = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
local DispellFilter
|
||||||
|
do
|
||||||
|
local dispellClasses = {
|
||||||
|
['PRIEST'] = {
|
||||||
|
['Magic'] = true,
|
||||||
|
['Disease'] = true
|
||||||
|
},
|
||||||
|
['SHAMAN'] = {
|
||||||
|
['Poison'] = true,
|
||||||
|
['Disease'] = true
|
||||||
|
},
|
||||||
|
['PALADIN'] = {
|
||||||
|
['Poison'] = true,
|
||||||
|
['Magic'] = true,
|
||||||
|
['Disease'] = true
|
||||||
|
},
|
||||||
|
['MAGE'] = {
|
||||||
|
['Curse'] = true
|
||||||
|
},
|
||||||
|
['DRUID'] = {
|
||||||
|
['Curse'] = true,
|
||||||
|
['Poison'] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DispellFilter = dispellClasses[select(2, UnitClass('player'))] or {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function formatTime(s)
|
||||||
|
if(s > 60) then
|
||||||
|
return format('%dm', s/60), string.mod(s, 60)
|
||||||
|
elseif(s < 1) then
|
||||||
|
return format('%.1f', s), s - floor(s)
|
||||||
|
else
|
||||||
|
return format('%d', s), s - floor(s)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function onUpdate(self, elapsed)
|
||||||
|
self.elapsed = (self.elapsed or 0) + elapsed
|
||||||
|
if self.elapsed >= 0.1 then
|
||||||
|
local _, _, _, _, _, _, timeLeft = UnitDebuff(self.__owner.unit, self.index, "HARMFUL")
|
||||||
|
if timeLeft and timeLeft > 0 then
|
||||||
|
self.time:SetText(formatTime(timeLeft))
|
||||||
|
else
|
||||||
|
self:SetScript('OnUpdate', nil)
|
||||||
|
self.time:Hide()
|
||||||
|
end
|
||||||
|
self.elapsed = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function UpdateDebuff(self, name, icon, count, debuffType, duration, endTime, stackThreshold)
|
||||||
|
local element = self.RaidDebuffs
|
||||||
|
|
||||||
|
if(name and (count >= stackThreshold)) then
|
||||||
|
element.icon:SetTexture(icon)
|
||||||
|
element.icon:Show()
|
||||||
|
element.duration = duration
|
||||||
|
|
||||||
|
if(element.count) then
|
||||||
|
if(count and count > 1) then
|
||||||
|
element.count:SetText(count)
|
||||||
|
element.count:Show()
|
||||||
|
else
|
||||||
|
element.count:SetText('')
|
||||||
|
element.count:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if(element.time) then
|
||||||
|
if(duration and duration > 0 and endTime) then
|
||||||
|
element:SetScript('OnUpdate', onUpdate)
|
||||||
|
element.time:Show()
|
||||||
|
else
|
||||||
|
element:SetScript('OnUpdate', nil)
|
||||||
|
element.time:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if(element.cd) then
|
||||||
|
if(duration and duration > 0 and endTime) then
|
||||||
|
element.cd:SetCooldown(GetTime() - (endTime - duration), duration)
|
||||||
|
element.cd:Show()
|
||||||
|
else
|
||||||
|
element.cd:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local c = DispellColor[debuffType] or ElvUI[1].media.bordercolor
|
||||||
|
element:SetBackdropBorderColor(c[1], c[2], c[3])
|
||||||
|
|
||||||
|
element:Show()
|
||||||
|
else
|
||||||
|
element:Hide()
|
||||||
|
element.index = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Update(self, event, unit)
|
||||||
|
if(not unit or self.unit ~= unit) then return end
|
||||||
|
|
||||||
|
local element = self.RaidDebuffs
|
||||||
|
|
||||||
|
local _, name, icon, count, debuffType, duration, expirationTime
|
||||||
|
local _name, _icon, _count, _dtype, _duration, _endTime
|
||||||
|
local _priority, priority = 0, 0
|
||||||
|
local _stackThreshold = 0
|
||||||
|
|
||||||
|
for i = 1, 40 do
|
||||||
|
name, _, icon, count, debuffType, duration, expirationTime = UnitDebuff(unit, i, "HARMFUL")
|
||||||
|
if not (name and icon) then break end
|
||||||
|
|
||||||
|
if(addon.ShowDispellableDebuff and (element.showDispellableDebuff ~= false) and debuffType) then
|
||||||
|
if(addon.FilterDispellableDebuff) then
|
||||||
|
DispellPriority[debuffType] = (DispellPriority[debuffType] or 0) + addon.priority
|
||||||
|
priority = DispellFilter[debuffType] and DispellPriority[debuffType] or 0
|
||||||
|
if(priority == 0) then
|
||||||
|
debuffType = nil
|
||||||
|
end
|
||||||
|
else
|
||||||
|
priority = DispellPriority[debuffType] or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if(priority > _priority) then
|
||||||
|
_priority, _name, _icon, _count, _dtype, _duration, _endTime = priority, name, icon, count, debuffType, duration, expirationTime
|
||||||
|
element.index = i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
priority = debuff_data[name] and debuff_data[name].priority
|
||||||
|
if(priority and (priority > _priority)) then
|
||||||
|
_priority, _name, _icon, _count, _dtype, _duration, _endTime = priority, name, icon, count, debuffType, duration, expirationTime
|
||||||
|
element.index = i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if(element.forceShow) then
|
||||||
|
_name, _, _icon = GetSpellInfo(26993)
|
||||||
|
_count, _dtype, _duration, _endTime, _stackThreshold = 5, 'Magic', 0, 60, 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if(_name and _icon) then
|
||||||
|
_stackThreshold = debuff_data[_name] and debuff_data[_name].stackThreshold or _stackThreshold
|
||||||
|
end
|
||||||
|
|
||||||
|
UpdateDebuff(self, _name, _icon, _count, _dtype, _duration, _endTime, _stackThreshold)
|
||||||
|
|
||||||
|
--Reset the DispellPriority
|
||||||
|
DispellPriority = {
|
||||||
|
['Magic'] = 4,
|
||||||
|
['Curse'] = 3,
|
||||||
|
['Disease'] = 2,
|
||||||
|
['Poison'] = 1
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Path(self, ...)
|
||||||
|
--[[ Override: RaidDebuffs.Override(self, event, ...)
|
||||||
|
Used to completely override the element's update process.
|
||||||
|
|
||||||
|
* self - the parent object
|
||||||
|
* event - the event triggering the update (string)
|
||||||
|
* ... - the arguments accompanying the event (string)
|
||||||
|
--]]
|
||||||
|
return (self.RaidDebuffs.Override or Update) (self, unpack(arg))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function ForceUpdate(element)
|
||||||
|
return Path(element.__owner, 'ForceUpdate', element.__owner.unit)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Enable(self)
|
||||||
|
local element = self.RaidDebuffs
|
||||||
|
if(element) then
|
||||||
|
element.__owner = self
|
||||||
|
element.ForceUpdate = ForceUpdate
|
||||||
|
|
||||||
|
self:RegisterEvent('UNIT_AURA', Update)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function Disable(self)
|
||||||
|
local element = self.RaidDebuffs
|
||||||
|
if(element) then
|
||||||
|
element:Hide()
|
||||||
|
|
||||||
|
self:UnregisterEvent('UNIT_AURA', Update)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
oUF:AddElement('RaidDebuffs', Update, Enable, Disable)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
|
<Script file="oUF_RaidDebuffs.lua"/>
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
|
local UF = E:GetModule("UnitFrames");
|
||||||
|
local LSM = LibStub("LibSharedMedia-3.0");
|
||||||
|
|
||||||
|
--Cache global variables
|
||||||
|
--Lua functions
|
||||||
|
local assert, select, pairs, unpack = assert, select, pairs, unpack
|
||||||
|
local tinsert, wipe = tinsert, wipe
|
||||||
|
local getn = table.getn
|
||||||
|
--WoW API / Variables
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
local UnitBuff = UnitBuff
|
||||||
|
|
||||||
|
function UF:Construct_AuraWatch(frame)
|
||||||
|
local auras = CreateFrame("Frame", nil, frame)
|
||||||
|
auras:SetFrameLevel(frame.RaisedElementParent:GetFrameLevel() + 10)
|
||||||
|
E:SetInside(auras, frame.Health)
|
||||||
|
auras.presentAlpha = 1
|
||||||
|
auras.missingAlpha = 0
|
||||||
|
auras.icons = {}
|
||||||
|
|
||||||
|
return auras
|
||||||
|
end
|
||||||
|
|
||||||
|
local counterOffsets = {
|
||||||
|
["TOPLEFT"] = {6, 1},
|
||||||
|
["TOPRIGHT"] = {-6, 1},
|
||||||
|
["BOTTOMLEFT"] = {6, 1},
|
||||||
|
["BOTTOMRIGHT"] = {-6, 1},
|
||||||
|
["LEFT"] = {6, 1},
|
||||||
|
["RIGHT"] = {-6, 1},
|
||||||
|
["TOP"] = {0, 0},
|
||||||
|
["BOTTOM"] = {0, 0}
|
||||||
|
}
|
||||||
|
|
||||||
|
local textCounterOffsets = {
|
||||||
|
["TOPLEFT"] = {"LEFT", "RIGHT", -2, 0},
|
||||||
|
["TOPRIGHT"] = {"RIGHT", "LEFT", 2, 0},
|
||||||
|
["BOTTOMLEFT"] = {"LEFT", "RIGHT", -2, 0},
|
||||||
|
["BOTTOMRIGHT"] = {"RIGHT", "LEFT", 2, 0},
|
||||||
|
["LEFT"] = {"LEFT", "RIGHT", -2, 0},
|
||||||
|
["RIGHT"] = {"RIGHT", "LEFT", 2, 0},
|
||||||
|
["TOP"] = {"RIGHT", "LEFT", 2, 0},
|
||||||
|
["BOTTOM"] = {"RIGHT", "LEFT", 2, 0}
|
||||||
|
}
|
||||||
|
|
||||||
|
function UF:UpdateAuraWatchFromHeader(group, petOverride)
|
||||||
|
assert(self[group], "Invalid group specified.")
|
||||||
|
group = self[group]
|
||||||
|
for i = 1, group:GetNumChildren() do
|
||||||
|
local frame = select(i, group:GetChildren())
|
||||||
|
if frame and frame.Health then
|
||||||
|
UF:UpdateAuraWatch(frame, petOverride, group.db)
|
||||||
|
elseif frame then
|
||||||
|
for n = 1, frame:GetNumChildren() do
|
||||||
|
local child = select(n, frame:GetChildren())
|
||||||
|
if child and child.Health then
|
||||||
|
UF:UpdateAuraWatch(child, petOverride, group.db)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local buffs = {}
|
||||||
|
function UF:UpdateAuraWatch(frame, petOverride, db)
|
||||||
|
wipe(buffs)
|
||||||
|
local auras = frame.AuraWatch
|
||||||
|
db = db and db.buffIndicator or frame.db.buffIndicator
|
||||||
|
|
||||||
|
if not db.enable then
|
||||||
|
auras:Hide()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
auras:Show()
|
||||||
|
end
|
||||||
|
|
||||||
|
if frame.unit == "pet" and not petOverride then
|
||||||
|
local petWatch = E.global.unitframe.buffwatch.PET or {}
|
||||||
|
for _, value in pairs(petWatch) do
|
||||||
|
if value.style == "text" then value.style = "NONE" end --depreciated
|
||||||
|
tinsert(buffs, value)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local buffWatch = not db.profileSpecific and (E.global.unitframe.buffwatch[E.myclass] or {}) or (E.db.unitframe.filters.buffwatch or {})
|
||||||
|
for _, value in pairs(buffWatch) do
|
||||||
|
if value.style == "text" then value.style = "NONE" end --depreciated
|
||||||
|
tinsert(buffs, value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--CLEAR CACHE
|
||||||
|
if auras.icons then
|
||||||
|
for i = 1, getn(auras.icons) do
|
||||||
|
local matchFound = false
|
||||||
|
for j = 1, getn(buffs) do
|
||||||
|
if buffs[j].id and buffs[j].id == auras.icons[i] then
|
||||||
|
matchFound = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not matchFound then
|
||||||
|
auras.icons[i]:Hide()
|
||||||
|
auras.icons[i] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local unitframeFont = LSM:Fetch("font", E.db.unitframe.font)
|
||||||
|
|
||||||
|
for i = 1, getn(buffs) do
|
||||||
|
if buffs[i].id then
|
||||||
|
local name, _, image = UnitBuff(frame.unit, buffs[i].id)
|
||||||
|
if name then
|
||||||
|
local icon
|
||||||
|
if not auras.icons[buffs[i].id] then
|
||||||
|
icon = CreateFrame("Frame", nil, auras)
|
||||||
|
else
|
||||||
|
icon = auras.icons[buffs[i].id]
|
||||||
|
end
|
||||||
|
icon.name = name
|
||||||
|
icon.image = image
|
||||||
|
icon.spellID = buffs[i].id
|
||||||
|
icon.style = buffs[i].style
|
||||||
|
icon.onlyShowMissing = buffs[i].onlyShowMissing
|
||||||
|
icon.presentAlpha = icon.onlyShowMissing and 0 or 1
|
||||||
|
icon.missingAlpha = icon.onlyShowMissing and 1 or 0
|
||||||
|
icon.textThreshold = buffs[i].textThreshold or -1
|
||||||
|
icon.displayText = buffs[i].displayText
|
||||||
|
icon.decimalThreshold = buffs[i].decimalThreshold
|
||||||
|
icon.size = (buffs[i].sizeOverride ~= nil and buffs[i].sizeOverride > 0 and buffs[i].sizeOverride or db.size)
|
||||||
|
|
||||||
|
icon:SetWidth(icon.size)
|
||||||
|
icon:SetHeight(icon.size)
|
||||||
|
--Protect against missing .point value
|
||||||
|
if not buffs[i].point then buffs[i].point = "TOPLEFT" end
|
||||||
|
|
||||||
|
icon:ClearAllPoints()
|
||||||
|
E:Point(icon, buffs[i].point or "TOPLEFT", frame.Health, buffs[i].point or "TOPLEFT", buffs[i].xOffset, buffs[i].yOffset)
|
||||||
|
|
||||||
|
if not icon.icon then
|
||||||
|
icon.icon = icon:CreateTexture(nil, "BORDER")
|
||||||
|
icon.icon:SetAllPoints(icon)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not icon.text then
|
||||||
|
local f = CreateFrame("Frame", nil, icon)
|
||||||
|
f:SetFrameLevel(icon:GetFrameLevel() + 50)
|
||||||
|
icon.text = f:CreateFontString(nil, "BORDER")
|
||||||
|
end
|
||||||
|
|
||||||
|
if not icon.border then
|
||||||
|
icon.border = icon:CreateTexture(nil, "BACKGROUND")
|
||||||
|
E:Point(icon.border, "TOPLEFT", -E.mult, E.mult)
|
||||||
|
E:Point(icon.border, "BOTTOMRIGHT", E.mult, -E.mult)
|
||||||
|
icon.border:SetTexture(E.media.blankTex)
|
||||||
|
icon.border:SetVertexColor(0, 0, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not icon.cd then
|
||||||
|
icon.cd = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate")
|
||||||
|
icon.cd:SetAllPoints(icon)
|
||||||
|
icon.cd.noOCC = true
|
||||||
|
icon.cd.noCooldownCount = true
|
||||||
|
icon.cd:SetReverse(true)
|
||||||
|
icon.cd:SetFrameLevel(icon:GetFrameLevel())
|
||||||
|
end
|
||||||
|
|
||||||
|
if icon.style == "coloredIcon" then
|
||||||
|
icon.icon:SetTexture(E.media.blankTex)
|
||||||
|
|
||||||
|
if buffs[i].color then
|
||||||
|
icon.icon:SetVertexColor(buffs[i].color.r, buffs[i].color.g, buffs[i].color.b)
|
||||||
|
else
|
||||||
|
icon.icon:SetVertexColor(0.8, 0.8, 0.8)
|
||||||
|
end
|
||||||
|
icon.icon:Show()
|
||||||
|
icon.border:Show()
|
||||||
|
icon.cd:SetAlpha(1)
|
||||||
|
elseif icon.style == "texturedIcon" then
|
||||||
|
icon.icon:SetVertexColor(1, 1, 1)
|
||||||
|
icon.icon:SetTexCoord(unpack(E.TexCoords))
|
||||||
|
icon.icon:SetTexture(icon.image)
|
||||||
|
icon.icon:Show()
|
||||||
|
icon.border:Show()
|
||||||
|
icon.cd:SetAlpha(1)
|
||||||
|
else
|
||||||
|
icon.border:Hide()
|
||||||
|
icon.icon:Hide()
|
||||||
|
icon.cd:SetAlpha(0)
|
||||||
|
end
|
||||||
|
|
||||||
|
if icon.displayText then
|
||||||
|
icon.text:Show()
|
||||||
|
local r, g, b = 1, 1, 1
|
||||||
|
if buffs[i].textColor then
|
||||||
|
r, g, b = buffs[i].textColor.r, buffs[i].textColor.g, buffs[i].textColor.b
|
||||||
|
end
|
||||||
|
|
||||||
|
icon.text:SetTextColor(r, g, b)
|
||||||
|
else
|
||||||
|
icon.text:Hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
if not icon.count then
|
||||||
|
icon.count = icon:CreateFontString(nil, "OVERLAY")
|
||||||
|
end
|
||||||
|
|
||||||
|
icon.count:ClearAllPoints()
|
||||||
|
if icon.displayText then
|
||||||
|
local point, anchorPoint, x, y = unpack(textCounterOffsets[buffs[i].point])
|
||||||
|
E:Point(icon.count, point, icon.text, anchorPoint, x, y)
|
||||||
|
else
|
||||||
|
E:Point(icon.count, "CENTER", unpack(counterOffsets[buffs[i].point]))
|
||||||
|
end
|
||||||
|
|
||||||
|
E:FontTemplate(icon.count, unitframeFont, db.fontSize, E.db.unitframe.fontOutline)
|
||||||
|
E:FontTemplate(icon.text, unitframeFont, db.fontSize, E.db.unitframe.fontOutline)
|
||||||
|
icon.text:ClearAllPoints()
|
||||||
|
E:Point(icon.text, buffs[i].point, icon, buffs[i].point)
|
||||||
|
|
||||||
|
if buffs[i].enabled then
|
||||||
|
auras.icons[buffs[i].id] = icon
|
||||||
|
if auras.watched then
|
||||||
|
auras.watched[buffs[i].id] = icon
|
||||||
|
end
|
||||||
|
else
|
||||||
|
auras.icons[buffs[i].id] = nil
|
||||||
|
if auras.watched then
|
||||||
|
auras.watched[buffs[i].id] = nil
|
||||||
|
end
|
||||||
|
icon:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if frame.AuraWatch.Update then
|
||||||
|
frame.AuraWatch.Update(frame)
|
||||||
|
end
|
||||||
|
|
||||||
|
frame:UpdateElement("AuraWatch")
|
||||||
|
end
|
||||||
@@ -80,14 +80,14 @@ function UF:Configure_ClassBar(frame)
|
|||||||
end
|
end
|
||||||
else --Detached
|
else --Detached
|
||||||
CLASSBAR_WIDTH = db.classbar.detachedWidth - ((frame.BORDER + frame.SPACING)*2)
|
CLASSBAR_WIDTH = db.classbar.detachedWidth - ((frame.BORDER + frame.SPACING)*2)
|
||||||
bars.Holder:Size(db.classbar.detachedWidth, db.classbar.height)
|
E:Size(bars.Holder, db.classbar.detachedWidth, db.classbar.height)
|
||||||
|
|
||||||
if not bars.Holder.mover then
|
if not bars.Holder.mover then
|
||||||
bars:Width(CLASSBAR_WIDTH)
|
bars:SerWidth(CLASSBAR_WIDTH)
|
||||||
bars:Height(frame.CLASSBAR_HEIGHT - ((frame.BORDER+frame.SPACING)*2))
|
bars:SetHeight(frame.CLASSBAR_HEIGHT - ((frame.BORDER+frame.SPACING)*2))
|
||||||
bars:ClearAllPoints()
|
bars:ClearAllPoints()
|
||||||
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
||||||
E:CreateMover(bars.Holder, "ClassBarMover", L["Classbar"], nil, nil, nil, "ALL,SOLO")
|
E:CreateMover(bars.Holder, "ClassBarMover", L["Classbar"], nil, nil, nil, "ALL,SOLO", nil, "unitframe,player,classbar")
|
||||||
else
|
else
|
||||||
bars:ClearAllPoints()
|
bars:ClearAllPoints()
|
||||||
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
||||||
@@ -114,8 +114,8 @@ function UF:Configure_ClassBar(frame)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
bars:Width(CLASSBAR_WIDTH)
|
bars:SetWidth(CLASSBAR_WIDTH)
|
||||||
bars:Height(frame.CLASSBAR_HEIGHT - ((frame.BORDER + frame.SPACING)*2))
|
bars:SetHeight(frame.CLASSBAR_HEIGHT - ((frame.BORDER + frame.SPACING)*2))
|
||||||
|
|
||||||
if frame.ClassBar == "DruidAltMana" then
|
if frame.ClassBar == "DruidAltMana" then
|
||||||
if frame.CLASSBAR_DETACHED and db.classbar.verticalOrientation then
|
if frame.CLASSBAR_DETACHED and db.classbar.verticalOrientation then
|
||||||
@@ -137,6 +137,7 @@ function UF:Configure_ClassBar(frame)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function ToggleResourceBar(bars, overrideVisibility)
|
local function ToggleResourceBar(bars, overrideVisibility)
|
||||||
|
local bars = bars or this
|
||||||
local frame = bars.origParent or bars:GetParent()
|
local frame = bars.origParent or bars:GetParent()
|
||||||
local db = frame.db
|
local db = frame.db
|
||||||
if not db then return end
|
if not db then return end
|
||||||
@@ -177,13 +178,13 @@ function UF:Construct_DruidAltMana(frame)
|
|||||||
druidAltMana.colorPower = true
|
druidAltMana.colorPower = true
|
||||||
druidAltMana.PostUpdate = UF.PostUpdateDruidAltMana
|
druidAltMana.PostUpdate = UF.PostUpdateDruidAltMana
|
||||||
druidAltMana.PostUpdateVisibility = UF.PostVisibilityDruidAltMana
|
druidAltMana.PostUpdateVisibility = UF.PostVisibilityDruidAltMana
|
||||||
druidAltMana:CreateBackdrop("Default")
|
E:CreateBackdrop(druidAltMana, "Default")
|
||||||
UF["statusbars"][druidAltMana] = true
|
UF.statusbars[druidAltMana] = true
|
||||||
druidAltMana:SetStatusBarTexture(E["media"].blankTex)
|
druidAltMana:SetStatusBarTexture(E.media.blankTex)
|
||||||
|
|
||||||
druidAltMana.bg = druidAltMana:CreateTexture(nil, "BORDER")
|
druidAltMana.bg = druidAltMana:CreateTexture(nil, "BORDER")
|
||||||
druidAltMana.bg:SetAllPoints(druidAltMana)
|
druidAltMana.bg:SetAllPoints(druidAltMana)
|
||||||
druidAltMana.bg:SetTexture(E["media"].blankTex)
|
druidAltMana.bg:SetTexture(E.media.blankTex)
|
||||||
druidAltMana.bg.multiplier = 0.3
|
druidAltMana.bg.multiplier = 0.3
|
||||||
|
|
||||||
druidAltMana.text = druidAltMana:CreateFontString(nil, "OVERLAY")
|
druidAltMana.text = druidAltMana:CreateFontString(nil, "OVERLAY")
|
||||||
@@ -195,17 +196,18 @@ function UF:Construct_DruidAltMana(frame)
|
|||||||
return druidAltMana
|
return druidAltMana
|
||||||
end
|
end
|
||||||
|
|
||||||
function UF:PostUpdateDruidAltMana(_, min, max, event)
|
function UF:PostUpdateDruidAltMana(_, cur, max, event)
|
||||||
local frame = self.origParent or self:GetParent()
|
local frame = self.origParent or self:GetParent()
|
||||||
local db = frame.db
|
local db = frame.db
|
||||||
|
|
||||||
if frame.USE_CLASSBAR and ((min ~= max or (not db.classbar.autoHide)) and (event ~= "ElementDisable")) then
|
--if frame.USE_CLASSBAR and ((cur ~= max or (not db.classbar.autoHide)) and (event ~= "ElementDisable")) then
|
||||||
|
if frame.USE_CLASSBAR and ((cur ~= max or (not db.classbar.autoHide)) and (event ~= "ElementDisable")) then
|
||||||
if db.classbar.additionalPowerText then
|
if db.classbar.additionalPowerText then
|
||||||
local powerValue = frame.Power.value
|
local powerValue = frame.Power.value
|
||||||
local powerValueText = powerValue:GetText()
|
local powerValueText = powerValue:GetText()
|
||||||
local powerValueParent = powerValue:GetParent()
|
local powerValueParent = powerValue:GetParent()
|
||||||
local powerTextPosition = db.power.position
|
local powerTextPosition = db.power.position
|
||||||
local color = ElvUF["colors"].power[0]
|
local color = ElvUF.colors.power[0]
|
||||||
color = E:RGBToHex(color[1], color[2], color[3])
|
color = E:RGBToHex(color[1], color[2], color[3])
|
||||||
|
|
||||||
--Attempt to remove |cFFXXXXXX color codes in order to determine if power text is really empty
|
--Attempt to remove |cFFXXXXXX color codes in order to determine if power text is really empty
|
||||||
@@ -224,27 +226,27 @@ function UF:PostUpdateDruidAltMana(_, min, max, event)
|
|||||||
if (powerValueText and (powerValueText ~= "" and powerValueText ~= " ")) then
|
if (powerValueText and (powerValueText ~= "" and powerValueText ~= " ")) then
|
||||||
if find(powerTextPosition, "RIGHT") then
|
if find(powerTextPosition, "RIGHT") then
|
||||||
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
|
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
|
||||||
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(min / max * 100)))
|
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(cur / max * 100)))
|
||||||
elseif find(powerTextPosition, "LEFT") then
|
elseif find(powerTextPosition, "LEFT") then
|
||||||
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
|
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
|
||||||
self.text:SetText(format("|cffD7BEA5 -|r"..color.." %d%%|r", floor(min / max * 100)))
|
self.text:SetText(format("|cffD7BEA5 -|r"..color.." %d%%|r", floor(cur / max * 100)))
|
||||||
else
|
else
|
||||||
if select(4, powerValue:GetPoint()) <= 0 then
|
if select(4, powerValue:GetPoint()) <= 0 then
|
||||||
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
|
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
|
||||||
self.text:SetText(format(" |cffD7BEA5-|r"..color.." %d%%|r", floor(min / max * 100)))
|
self.text:SetText(format(" |cffD7BEA5-|r"..color.." %d%%|r", floor(cur / max * 100)))
|
||||||
else
|
else
|
||||||
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
|
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
|
||||||
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(min / max * 100)))
|
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(cur / max * 100)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
E:Point(self.text, powerValue:GetPoint())
|
E:Point(self.text, powerValue:GetPoint())
|
||||||
self.text:SetText(format(color.."%d%%|r", floor(min / max * 100)))
|
self.text:SetText(format(color.."%d%%|r", floor(cur / max * 100)))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.text:SetParent(self)
|
self.text:SetParent(frame.RaisedElementParent)
|
||||||
E:Point(self.text, "CENTER", self)
|
E:Point(self.text, "CENTER", self)
|
||||||
self.text:SetText(format(color.."%d%%|r", floor(min / max * 100)))
|
self.text:SetText(format(color.."%d%%|r", floor(cur / max * 100)))
|
||||||
end
|
end
|
||||||
else --Text disabled
|
else --Text disabled
|
||||||
self.text:SetText()
|
self.text:SetText()
|
||||||
@@ -264,6 +266,6 @@ function UF:PostVisibilityDruidAltMana(enabled, stateChanged)
|
|||||||
UF:Configure_ClassBar(frame)
|
UF:Configure_ClassBar(frame)
|
||||||
UF:Configure_HealthBar(frame)
|
UF:Configure_HealthBar(frame)
|
||||||
UF:Configure_Power(frame)
|
UF:Configure_Power(frame)
|
||||||
UF:Configure_InfoPanel(frame, true) --2nd argument is to prevent it from setting template, which removes threat border
|
UF:Configure_InfoPanel(frame)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -12,9 +12,9 @@ function UF:Construct_CombatIndicator(frame)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function UF:Configure_CombatIndicator(frame)
|
function UF:Configure_CombatIndicator(frame)
|
||||||
if frame.db.combatIcon and not frame:IsElementEnabled('CombatIndicator') then
|
if frame.db.combatIcon and not frame:IsElementEnabled("CombatIndicator") then
|
||||||
frame:EnableElement("CombatIndicator")
|
frame:EnableElement("CombatIndicator")
|
||||||
elseif not frame.db.combatIcon and frame:IsElementEnabled('CombatIndicator') then
|
elseif not frame.db.combatIcon and frame:IsElementEnabled("CombatIndicator") then
|
||||||
frame:DisableElement("CombatIndicator")
|
frame:DisableElement("CombatIndicator")
|
||||||
frame.CombatIndicator:Hide()
|
frame.CombatIndicator:Hide()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ assert(ElvUF, "ElvUI was unable to locate oUF.")
|
|||||||
|
|
||||||
function UF:Construct_HealthBar(frame, bg, text, textPos)
|
function UF:Construct_HealthBar(frame, bg, text, textPos)
|
||||||
local health = CreateFrame("StatusBar", nil, frame)
|
local health = CreateFrame("StatusBar", nil, frame)
|
||||||
UF["statusbars"][health] = true
|
UF.statusbars[health] = true
|
||||||
|
|
||||||
health:SetFrameLevel(10) --Make room for Portrait and Power which should be lower by default
|
health:SetFrameLevel(10) --Make room for Portrait and Power which should be lower by default
|
||||||
health.PostUpdate = self.PostUpdateHealth
|
health.PostUpdate = self.PostUpdateHealth
|
||||||
@@ -202,7 +202,7 @@ function UF:PostUpdateHealth(unit, min, max)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local r, g, b = self:GetStatusBarColor()
|
local r, g, b = self:GetStatusBarColor()
|
||||||
local colors = E.db["unitframe"]["colors"]
|
local colors = E.db.unitframe.colors
|
||||||
if ((colors.healthclass == true and colors.colorhealthbyvalue == true) or (colors.colorhealthbyvalue and parent.isForced)) and not (UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then
|
if ((colors.healthclass == true and colors.colorhealthbyvalue == true) or (colors.colorhealthbyvalue and parent.isForced)) and not (UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then
|
||||||
local newr, newg, newb = ElvUF.ColorGradient(min, max, 1, 0, 0, 1, 1, 0, r, g, b)
|
local newr, newg, newb = ElvUF.ColorGradient(min, max, 1, 0, 0, 1, 1, 0, r, g, b)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
<Script file="Auras.lua"/>
|
<Script file="Auras.lua"/>
|
||||||
|
<Script file="BuffIndicator.lua"/>
|
||||||
<Script file="Castbar.lua"/>
|
<Script file="Castbar.lua"/>
|
||||||
<Script file="Classbars.lua"/>
|
<Script file="Classbars.lua"/>
|
||||||
<Script file="CombatIndicator.lua"/>
|
<Script file="CombatIndicator.lua"/>
|
||||||
@@ -15,11 +16,9 @@
|
|||||||
<Script file="InfoPanel.lua"/>
|
<Script file="InfoPanel.lua"/>
|
||||||
<Script file="PvPIcon.lua"/>
|
<Script file="PvPIcon.lua"/>
|
||||||
<Script file="PvPIndicator.lua"/>
|
<Script file="PvPIndicator.lua"/>
|
||||||
|
<Script file="RaidDebuffs.lua"/>
|
||||||
<Script file="RaidIcon.lua"/>
|
<Script file="RaidIcon.lua"/>
|
||||||
<Script file="RaidRoleIcons.lua"/>
|
|
||||||
<Script file="Range.lua"/>
|
<Script file="Range.lua"/>
|
||||||
<Script file="ReadyCheckIcon.lua"/>
|
|
||||||
<Script file="RestingIndicator.lua"/>
|
<Script file="RestingIndicator.lua"/>
|
||||||
<Script file="ResurrectionIcon.lua"/>
|
|
||||||
<Script file="FrameGlow.lua"/>
|
<Script file="FrameGlow.lua"/>
|
||||||
</Ui>
|
</Ui>
|
||||||
@@ -241,4 +241,9 @@ function UF:PostUpdatePower(unit, cur, max)
|
|||||||
if db and db.power and db.power.hideonnpc then
|
if db and db.power and db.power.hideonnpc then
|
||||||
UF:PostNamePosition(parent, unit)
|
UF:PostNamePosition(parent, unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Force update to DruidAltMana in order to reposition text if necessary
|
||||||
|
if parent:IsElementEnabled("DruidAltMana") then
|
||||||
|
E:Delay(0.01, parent.DruidAltMana.ForceUpdate, parent.DruidAltMana) --Delay it slightly so Power text has a chance to clear itself first
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -1,11 +1,6 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
local UF = E:GetModule("UnitFrames");
|
local UF = E:GetModule("UnitFrames");
|
||||||
|
|
||||||
--Cache global variables
|
|
||||||
--Lua functions
|
|
||||||
|
|
||||||
--WoW API / Variables
|
|
||||||
|
|
||||||
function UF:Construct_PvPIndicator(frame)
|
function UF:Construct_PvPIndicator(frame)
|
||||||
local pvp = frame.RaisedElementParent:CreateFontString(nil, "OVERLAY")
|
local pvp = frame.RaisedElementParent:CreateFontString(nil, "OVERLAY")
|
||||||
UF:Configure_FontString(pvp)
|
UF:Configure_FontString(pvp)
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
|
local UF = E:GetModule("UnitFrames");
|
||||||
|
|
||||||
|
--Cache global variables
|
||||||
|
--Lua functions
|
||||||
|
local unpack = unpack
|
||||||
|
--WoW API / Variables
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
|
||||||
|
function UF:Construct_RaidDebuffs(frame)
|
||||||
|
local rdebuff = CreateFrame("Frame", nil, frame.RaisedElementParent)
|
||||||
|
E:SetTemplate(rdebuff, "Default", nil, nil, UF.thinBorders, true)
|
||||||
|
rdebuff:SetFrameLevel(frame.RaisedElementParent:GetFrameLevel() + 20) --Make them appear above regular buffs or debuffs
|
||||||
|
|
||||||
|
local offset = UF.thinBorders and E.mult or E.Border
|
||||||
|
rdebuff.icon = rdebuff:CreateTexture(nil, "OVERLAY")
|
||||||
|
rdebuff.icon:SetTexCoord(unpack(E.TexCoords))
|
||||||
|
E:SetInside(rdebuff.icon, rdebuff, offset, offset)
|
||||||
|
|
||||||
|
rdebuff.count = rdebuff:CreateFontString(nil, "OVERLAY")
|
||||||
|
E:FontTemplate(rdebuff.count, nil, 10, "OUTLINE")
|
||||||
|
E:Point(rdebuff.count, "BOTTOMRIGHT", 0, 2)
|
||||||
|
rdebuff.count:SetTextColor(1, .9, 0)
|
||||||
|
|
||||||
|
rdebuff.time = rdebuff:CreateFontString(nil, "OVERLAY")
|
||||||
|
E:FontTemplate(rdebuff.time, nil, 10, "OUTLINE")
|
||||||
|
E:Point(rdebuff.time, "CENTER")
|
||||||
|
rdebuff.time:SetTextColor(1, .9, 0)
|
||||||
|
|
||||||
|
return rdebuff
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:Configure_RaidDebuffs(frame)
|
||||||
|
if not frame.VARIABLES_SET then return end
|
||||||
|
local db = frame.db
|
||||||
|
local rdebuffs = frame.RaidDebuffs
|
||||||
|
|
||||||
|
if db.rdebuffs.enable then
|
||||||
|
local stackColor = db.rdebuffs.stack.color
|
||||||
|
local durationColor = db.rdebuffs.duration.color
|
||||||
|
local rdebuffsFont = UF.LSM:Fetch("font", db.rdebuffs.font)
|
||||||
|
if not frame:IsElementEnabled("RaidDebuffs") then
|
||||||
|
frame:EnableElement("RaidDebuffs")
|
||||||
|
end
|
||||||
|
|
||||||
|
rdebuffs.showDispellableDebuff = db.rdebuffs.showDispellableDebuff
|
||||||
|
rdebuffs.forceShow = frame.forceShowAuras
|
||||||
|
E:Size(rdebuffs, db.rdebuffs.size)
|
||||||
|
E:Point(rdebuffs, "BOTTOM", frame, "BOTTOM", db.rdebuffs.xOffset, db.rdebuffs.yOffset + frame.SPACING)
|
||||||
|
|
||||||
|
E:FontTemplate(rdebuffs.count, rdebuffsFont, db.rdebuffs.fontSize, db.rdebuffs.fontOutline)
|
||||||
|
rdebuffs.count:ClearAllPoints()
|
||||||
|
E:Point(rdebuffs.count, db.rdebuffs.stack.position, db.rdebuffs.stack.xOffset, db.rdebuffs.stack.yOffset)
|
||||||
|
rdebuffs.count:SetTextColor(stackColor.r, stackColor.g, stackColor.b, stackColor.a)
|
||||||
|
|
||||||
|
E:FontTemplate(rdebuffs.time, rdebuffsFont, db.rdebuffs.fontSize, db.rdebuffs.fontOutline)
|
||||||
|
rdebuffs.time:ClearAllPoints()
|
||||||
|
E:Point(rdebuffs.time, db.rdebuffs.duration.position, db.rdebuffs.duration.xOffset, db.rdebuffs.duration.yOffset)
|
||||||
|
rdebuffs.time:SetTextColor(durationColor.r, durationColor.g, durationColor.b, durationColor.a)
|
||||||
|
elseif frame:IsElementEnabled("RaidDebuffs") then
|
||||||
|
frame:DisableElement("RaidDebuffs")
|
||||||
|
rdebuffs:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
|
||||||
local UF = E:GetModule("UnitFrames");
|
|
||||||
|
|
||||||
--WoW API / Variables
|
|
||||||
local CreateFrame = CreateFrame
|
|
||||||
|
|
||||||
local ns = oUF
|
|
||||||
local ElvUF = ns.oUF
|
|
||||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
|
||||||
|
|
||||||
function UF:Construct_RaidRoleFrames(frame)
|
|
||||||
local anchor = CreateFrame("Frame", nil, frame.RaisedElementParent)
|
|
||||||
frame.LeaderIndicator = anchor:CreateTexture(nil, "OVERLAY")
|
|
||||||
frame.AssistantIndicator = anchor:CreateTexture(nil, "OVERLAY")
|
|
||||||
frame.MasterLooterIndicator = anchor:CreateTexture(nil, "OVERLAY")
|
|
||||||
|
|
||||||
anchor:SetWidth(24)
|
|
||||||
anchor:SetHeight(12)
|
|
||||||
frame.LeaderIndicator:SetWidth(12)
|
|
||||||
frame.LeaderIndicator:SetHeight(12)
|
|
||||||
frame.AssistantIndicator:SetWidth(12)
|
|
||||||
frame.AssistantIndicator:SetHeight(12)
|
|
||||||
frame.MasterLooterIndicator:SetWidth(11)
|
|
||||||
frame.MasterLooterIndicator:SetHeight(11)
|
|
||||||
|
|
||||||
frame.LeaderIndicator.PostUpdate = UF.RaidRoleUpdate
|
|
||||||
frame.AssistantIndicator.PostUpdate = UF.RaidRoleUpdate
|
|
||||||
frame.MasterLooterIndicator.PostUpdate = UF.RaidRoleUpdate
|
|
||||||
|
|
||||||
return anchor
|
|
||||||
end
|
|
||||||
|
|
||||||
function UF:Configure_RaidRoleIcons(frame)
|
|
||||||
local raidRoleFrameAnchor = frame.RaidRoleFramesAnchor
|
|
||||||
|
|
||||||
if frame.db.raidRoleIcons.enable then
|
|
||||||
raidRoleFrameAnchor:Show()
|
|
||||||
if not frame:IsElementEnabled("LeaderIndicator") then
|
|
||||||
frame:EnableElement("LeaderIndicator")
|
|
||||||
frame:EnableElement("MasterLooterIndicator")
|
|
||||||
frame:EnableElement("AssistantIndicator")
|
|
||||||
end
|
|
||||||
|
|
||||||
raidRoleFrameAnchor:ClearAllPoints()
|
|
||||||
if frame.db.raidRoleIcons.position == "TOPLEFT" then
|
|
||||||
raidRoleFrameAnchor:SetPoint("LEFT", frame.Health, "TOPLEFT", 2, 0)
|
|
||||||
else
|
|
||||||
raidRoleFrameAnchor:SetPoint("RIGHT", frame, "TOPRIGHT", -2, 0)
|
|
||||||
end
|
|
||||||
elseif frame:IsElementEnabled("LeaderIndicator") then
|
|
||||||
raidRoleFrameAnchor:Hide()
|
|
||||||
frame:DisableElement("LeaderIndicator")
|
|
||||||
frame:DisableElement("MasterLooterIndicator")
|
|
||||||
frame:DisableElement("AssistantIndicator")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function UF:RaidRoleUpdate()
|
|
||||||
local anchor = self:GetParent()
|
|
||||||
local frame = anchor:GetParent():GetParent()
|
|
||||||
local leader = frame.LeaderIndicator
|
|
||||||
local assistant = frame.AssistantIndicator
|
|
||||||
local masterLooter = frame.MasterLooterIndicator
|
|
||||||
|
|
||||||
if not leader or not masterLooter or not assistant then return; end
|
|
||||||
|
|
||||||
local db = frame.db
|
|
||||||
local isLeader = leader:IsShown()
|
|
||||||
local isMasterLooter = masterLooter:IsShown()
|
|
||||||
local isAssist = assistant:IsShown()
|
|
||||||
|
|
||||||
leader:ClearAllPoints()
|
|
||||||
assistant:ClearAllPoints()
|
|
||||||
masterLooter:ClearAllPoints()
|
|
||||||
|
|
||||||
if db and db.raidRoleIcons then
|
|
||||||
if isLeader and db.raidRoleIcons.position == "TOPLEFT" then
|
|
||||||
leader:SetPoint("LEFT", anchor, "LEFT")
|
|
||||||
masterLooter:SetPoint("RIGHT", anchor, "RIGHT")
|
|
||||||
elseif isLeader and db.raidRoleIcons.position == "TOPRIGHT" then
|
|
||||||
leader:SetPoint("RIGHT", anchor, "RIGHT")
|
|
||||||
masterLooter:SetPoint("LEFT", anchor, "LEFT")
|
|
||||||
elseif isAssist and db.raidRoleIcons.position == "TOPLEFT" then
|
|
||||||
assistant:SetPoint("LEFT", anchor, "LEFT")
|
|
||||||
masterLooter:SetPoint("RIGHT", anchor, "RIGHT")
|
|
||||||
elseif isAssist and db.raidRoleIcons.position == "TOPRIGHT" then
|
|
||||||
assistant:SetPoint("RIGHT", anchor, "RIGHT")
|
|
||||||
masterLooter:SetPoint("LEFT", anchor, "LEFT")
|
|
||||||
elseif isMasterLooter and db.raidRoleIcons.position == "TOPLEFT" then
|
|
||||||
masterLooter:SetPoint("LEFT", anchor, "LEFT")
|
|
||||||
else
|
|
||||||
masterLooter:SetPoint("RIGHT", anchor, "RIGHT")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
|
||||||
local UF = E:GetModule("UnitFrames");
|
|
||||||
|
|
||||||
function UF:Construct_ReadyCheckIcon(frame)
|
|
||||||
local tex = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
|
|
||||||
E:Size(tex, 12)
|
|
||||||
E:Point(tex, "BOTTOM", frame.Health, "BOTTOM", 0, 2)
|
|
||||||
|
|
||||||
return tex
|
|
||||||
end
|
|
||||||
|
|
||||||
function UF:Configure_ReadyCheckIcon(frame)
|
|
||||||
local ReadyCheckIndicator = frame.ReadyCheckIndicator
|
|
||||||
local db = frame.db
|
|
||||||
|
|
||||||
if db.readycheckIcon.enable then
|
|
||||||
if not frame:IsElementEnabled("ReadyCheckIndicator") then
|
|
||||||
frame:EnableElement("ReadyCheckIndicator")
|
|
||||||
end
|
|
||||||
|
|
||||||
local attachPoint = self:GetObjectAnchorPoint(frame, db.readycheckIcon.attachTo)
|
|
||||||
ReadyCheckIndicator:ClearAllPoints()
|
|
||||||
E:Point(ReadyCheckIndicator, db.readycheckIcon.position, attachPoint, db.readycheckIcon.position, db.readycheckIcon.xOffset, db.readycheckIcon.yOffset)
|
|
||||||
E:Size(ReadyCheckIndicator, db.readycheckIcon.size)
|
|
||||||
else
|
|
||||||
frame:DisableElement("ReadyCheckIndicator")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
|
||||||
local UF = E:GetModule("UnitFrames");
|
|
||||||
|
|
||||||
function UF:Construct_ResurrectionIcon(frame)
|
|
||||||
local tex = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
|
|
||||||
tex:SetTexture([[Interface\AddOns\ElvUI\media\textures\Raid-Icon-Rez]])
|
|
||||||
E:Point(tex, "CENTER", frame.Health, "CENTER")
|
|
||||||
E:Size(tex, 30)
|
|
||||||
tex:SetDrawLayer("OVERLAY", 7)
|
|
||||||
|
|
||||||
return tex
|
|
||||||
end
|
|
||||||
|
|
||||||
function UF:Configure_ResurrectionIcon(frame)
|
|
||||||
local RI = frame.ResurrectIndicator
|
|
||||||
local db = frame.db
|
|
||||||
|
|
||||||
if db.resurrectIcon.enable then
|
|
||||||
if not frame:IsElementEnabled("ResurrectIndicator") then
|
|
||||||
frame:EnableElement("ResurrectIndicator")
|
|
||||||
end
|
|
||||||
RI:Show()
|
|
||||||
E:Size(RI, db.resurrectIcon.size)
|
|
||||||
|
|
||||||
local attachPoint = self:GetObjectAnchorPoint(frame, db.resurrectIcon.attachToObject)
|
|
||||||
RI:ClearAllPoints()
|
|
||||||
E:Point(RI, db.resurrectIcon.attachTo, attachPoint, db.resurrectIcon.attachTo, db.resurrectIcon.xOffset, db.resurrectIcon.yOffset)
|
|
||||||
else
|
|
||||||
if frame:IsElementEnabled("ResurrectIndicator") then
|
|
||||||
frame:DisableElement("ResurrectIndicator")
|
|
||||||
end
|
|
||||||
RI:Hide()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||||
<Script file="Party.lua"/>
|
<Script file="Party.lua"/>
|
||||||
<Script file="Raid.lua"/>
|
<Script file="Raid.lua"/>
|
||||||
|
<Script file="Raid40.lua"/>
|
||||||
|
<Script file="RaidPets.lua"/>
|
||||||
</Ui>
|
</Ui>
|
||||||
@@ -1,68 +1,113 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
local UF = E:GetModule("UnitFrames");
|
local UF = E:GetModule("UnitFrames");
|
||||||
|
|
||||||
--Cache global variables
|
|
||||||
--Lua functions
|
|
||||||
local _G = _G
|
|
||||||
--WoW API / Variables
|
|
||||||
local CreateFrame = CreateFrame
|
|
||||||
|
|
||||||
local ns = oUF
|
local ns = oUF
|
||||||
local ElvUF = ns.oUF
|
local ElvUF = ns.oUF
|
||||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||||
|
|
||||||
|
--Cache global variables
|
||||||
|
--Lua functions
|
||||||
|
local _G = _G
|
||||||
|
|
||||||
|
--WoW API / Variables
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
local GetNumRaidMembers = GetNumRaidMembers
|
||||||
|
local UnitInRaid = UnitInRaid
|
||||||
|
|
||||||
function UF:Construct_PartyFrames()
|
function UF:Construct_PartyFrames()
|
||||||
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||||
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||||
|
|
||||||
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
|
||||||
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||||
self.RaisedElementParent.TextureParent:SetFrameLevel(self.RaisedElementParent:GetFrameLevel() + 1)
|
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||||
|
self.BORDER = E.Border
|
||||||
|
self.SPACING = E.Spacing
|
||||||
|
self.SHADOW_SPACING = 3
|
||||||
|
if self.isChild then
|
||||||
|
self.Health = UF:Construct_HealthBar(self, true)
|
||||||
|
|
||||||
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||||
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||||
self.Power.frequentUpdates = false
|
self.Name = UF:Construct_NameText(self)
|
||||||
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||||
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
|
||||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
self.originalParent = self:GetParent()
|
||||||
self.Name = UF:Construct_NameText(self)
|
|
||||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
local childDB = UF.db.units.party.petsGroup
|
||||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
self.childType = "pet"
|
||||||
|
if self == _G[self.originalParent:GetName().."Target"] then
|
||||||
|
childDB = UF.db.units.party.targetsGroup
|
||||||
|
self.childType = "target"
|
||||||
|
end
|
||||||
|
|
||||||
|
self.unitframeType = "party"..self.childType
|
||||||
|
|
||||||
|
self:SetWidth(childDB.width)
|
||||||
|
self:SetHeight(childDB.height)
|
||||||
|
else
|
||||||
|
self:SetWidth(UF.db.units.party.width)
|
||||||
|
self:SetHeight(UF.db.units.party.height)
|
||||||
|
|
||||||
|
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||||
|
|
||||||
|
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
||||||
|
self.Power.frequentUpdates = false
|
||||||
|
|
||||||
|
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||||
|
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||||
|
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||||
|
self.Name = UF:Construct_NameText(self)
|
||||||
|
self.Buffs = UF:Construct_Buffs(self)
|
||||||
|
self.Debuffs = UF:Construct_Debuffs(self)
|
||||||
|
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||||
|
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||||
|
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||||
|
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||||
|
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||||
|
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||||
|
self.GPS = UF:Construct_GPS(self)
|
||||||
|
self.Castbar = UF:Construct_Castbar(self)
|
||||||
|
self.customTexts = {}
|
||||||
|
self.unitframeType = "party"
|
||||||
|
end
|
||||||
|
|
||||||
self.GPS = UF:Construct_GPS(self)
|
|
||||||
self.Range = UF:Construct_Range(self)
|
self.Range = UF:Construct_Range(self)
|
||||||
self.unitframeType = "party"
|
|
||||||
|
|
||||||
UF:Update_StatusBars()
|
UF:Update_StatusBars()
|
||||||
UF:Update_FontStrings()
|
UF:Update_FontStrings()
|
||||||
|
|
||||||
UF:Update_PartyFrames(self, UF.db.units.party)
|
UF:Update_PartyFrames(self, UF.db.units.party)
|
||||||
|
|
||||||
return self;
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
function UF:PartySmartVisibility()
|
function UF:PartySmartVisibility()
|
||||||
if not self then self = this end
|
if not self then self = this end
|
||||||
|
if not self.db or (self.db and not self.db.enable) then return end
|
||||||
|
|
||||||
if GetNumRaidMembers() < 1 then
|
local numMembers = GetNumRaidMembers()
|
||||||
|
if numMembers < 1 then
|
||||||
self:Show()
|
self:Show()
|
||||||
else
|
else
|
||||||
self:Hide()
|
self:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UF:Update_PartyHeader(header)
|
function UF:Update_PartyHeader(header, db)
|
||||||
|
header.db = db
|
||||||
|
|
||||||
if not header.positioned then
|
if not header.positioned then
|
||||||
header:ClearAllPoints()
|
header:ClearAllPoints()
|
||||||
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||||
|
|
||||||
E:CreateMover(header, header:GetName().."Mover", L["Party Frames"], nil, nil, nil, "ALL,PARTY")
|
E:CreateMover(header, header:GetName().."Mover", L["Party Frames"], nil, nil, nil, "ALL,PARTY")
|
||||||
|
|
||||||
|
header:RegisterEvent("PLAYER_LOGIN")
|
||||||
|
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||||
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
header:SetScript("OnEvent", UF.PartySmartVisibility)
|
header:SetScript("OnEvent", UF.PartySmartVisibility)
|
||||||
|
|
||||||
header.positioned = true
|
header.positioned = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -72,7 +117,7 @@ end
|
|||||||
function UF:Update_PartyFrames(frame, db)
|
function UF:Update_PartyFrames(frame, db)
|
||||||
frame.db = db
|
frame.db = db
|
||||||
|
|
||||||
frame.Portrait = db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D
|
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||||
frame.colors = ElvUF.colors
|
frame.colors = ElvUF.colors
|
||||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||||
|
|
||||||
@@ -85,7 +130,7 @@ function UF:Update_PartyFrames(frame, db)
|
|||||||
frame.SPACING = E.Spacing
|
frame.SPACING = E.Spacing
|
||||||
end
|
end
|
||||||
|
|
||||||
frame.ORIENTATION = db.orientation
|
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||||
frame.UNIT_WIDTH = db.width
|
frame.UNIT_WIDTH = db.width
|
||||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||||
|
|
||||||
@@ -102,8 +147,6 @@ function UF:Update_PartyFrames(frame, db)
|
|||||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||||
|
|
||||||
frame.CLASSBAR_WIDTH = 0
|
|
||||||
frame.CLASSBAR_YOFFSET = 0
|
frame.CLASSBAR_YOFFSET = 0
|
||||||
|
|
||||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||||
@@ -114,28 +157,80 @@ function UF:Update_PartyFrames(frame, db)
|
|||||||
frame.VARIABLES_SET = true
|
frame.VARIABLES_SET = true
|
||||||
end
|
end
|
||||||
|
|
||||||
frame:SetWidth(frame.UNIT_WIDTH)
|
if frame.isChild then
|
||||||
frame:SetHeight(frame.UNIT_HEIGHT)
|
frame.USE_PORTAIT = false
|
||||||
|
frame.USE_PORTRAIT_OVERLAY = false
|
||||||
|
frame.PORTRAIT_WIDTH = 0
|
||||||
|
frame.USE_POWERBAR = false
|
||||||
|
frame.USE_INSET_POWERBAR = false
|
||||||
|
frame.USE_MINI_POWERBAR = false
|
||||||
|
frame.USE_POWERBAR_OFFSET = false
|
||||||
|
frame.POWERBAR_OFFSET = 0
|
||||||
|
|
||||||
UF:Configure_InfoPanel(frame)
|
frame.POWERBAR_HEIGHT = 0
|
||||||
|
frame.POWERBAR_WIDTH = 0
|
||||||
|
|
||||||
UF:Configure_HealthBar(frame)
|
frame.BOTTOM_OFFSET = 0
|
||||||
|
|
||||||
UF:UpdateNameSettings(frame)
|
local childDB = db.petsGroup
|
||||||
|
if frame.childType == "target" then
|
||||||
|
childDB = db.targetsGroup
|
||||||
|
end
|
||||||
|
|
||||||
UF:Configure_Power(frame)
|
if not frame.originalParent.childList then
|
||||||
|
frame.originalParent.childList = {}
|
||||||
|
end
|
||||||
|
frame.originalParent.childList[frame] = true
|
||||||
|
|
||||||
UF:Configure_Portrait(frame)
|
if childDB.enable then
|
||||||
|
frame:SetParent(frame.originalParent)
|
||||||
|
RegisterUnitWatch(frame)
|
||||||
|
E:Size(frame, childDB.width, childDB.height)
|
||||||
|
frame:ClearAllPoints()
|
||||||
|
E:Point(frame, E.InversePoints[childDB.anchorPoint], frame.originalParent, childDB.anchorPoint, childDB.xOffset, childDB.yOffset)
|
||||||
|
else
|
||||||
|
UnregisterUnitWatch(frame)
|
||||||
|
frame:SetParent(E.HiddenFrame)
|
||||||
|
end
|
||||||
|
|
||||||
UF:Configure_RaidIcon(frame)
|
UF:Configure_HealthBar(frame)
|
||||||
|
|
||||||
UF:Configure_GPS(frame)
|
UF:Configure_RaidIcon(frame)
|
||||||
|
|
||||||
UF:Configure_RaidRoleIcons(frame)
|
UF:UpdateNameSettings(frame, frame.childType)
|
||||||
|
else
|
||||||
|
|
||||||
|
UF:Configure_InfoPanel(frame)
|
||||||
|
UF:Configure_HealthBar(frame)
|
||||||
|
|
||||||
|
UF:UpdateNameSettings(frame)
|
||||||
|
|
||||||
|
UF:Configure_Power(frame)
|
||||||
|
|
||||||
|
UF:Configure_Portrait(frame)
|
||||||
|
|
||||||
|
UF:EnableDisable_Auras(frame)
|
||||||
|
UF:Configure_Auras(frame, "Buffs")
|
||||||
|
UF:Configure_Auras(frame, "Debuffs")
|
||||||
|
|
||||||
|
UF:Configure_RaidDebuffs(frame)
|
||||||
|
|
||||||
|
UF:Configure_Castbar(frame)
|
||||||
|
|
||||||
|
UF:Configure_RaidIcon(frame)
|
||||||
|
|
||||||
|
UF:Configure_DebuffHighlight(frame)
|
||||||
|
|
||||||
|
UF:Configure_GPS(frame)
|
||||||
|
|
||||||
|
UF:UpdateAuraWatch(frame)
|
||||||
|
|
||||||
|
UF:Configure_CustomTexts(frame)
|
||||||
|
end
|
||||||
|
|
||||||
UF:Configure_Range(frame)
|
UF:Configure_Range(frame)
|
||||||
|
|
||||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||||
end
|
end
|
||||||
|
|
||||||
UF.headerstoload.party = true
|
UF.headerstoload.party = {nil, "ELVUI_UNITPET, ELVUI_UNITTARGET"}
|
||||||
@@ -1,38 +1,54 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
local UF = E:GetModule("UnitFrames");
|
local UF = E:GetModule("UnitFrames");
|
||||||
|
|
||||||
--WoW API / Variables
|
|
||||||
local CreateFrame = CreateFrame
|
|
||||||
|
|
||||||
local ns = oUF
|
local ns = oUF
|
||||||
local ElvUF = ns.oUF
|
local ElvUF = ns.oUF
|
||||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||||
|
|
||||||
|
--Cache global variables
|
||||||
|
--Lua functions
|
||||||
|
|
||||||
|
--WoW API / Variables
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
local GetNumRaidMembers = GetNumRaidMembers
|
||||||
|
local UnitInRaid = UnitInRaid
|
||||||
|
|
||||||
function UF:Construct_RaidFrames()
|
function UF:Construct_RaidFrames()
|
||||||
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||||
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||||
|
|
||||||
|
self:SetWidth(UF.db.units.raid.width)
|
||||||
|
self:SetHeight(UF.db.units.raid.height)
|
||||||
|
|
||||||
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
|
||||||
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||||
self.RaisedElementParent.TextureParent:SetFrameLevel(self.RaisedElementParent:GetFrameLevel() + 1)
|
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||||
|
|
||||||
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||||
|
|
||||||
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
||||||
self.Power.frequentUpdates = false
|
self.Power.frequentUpdates = false
|
||||||
|
|
||||||
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||||
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||||
self.Name = UF:Construct_NameText(self)
|
|
||||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
|
||||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
|
||||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
|
||||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
|
||||||
|
|
||||||
self.GPS = UF:Construct_GPS(self)
|
self.Name = UF:Construct_NameText(self)
|
||||||
|
self.Buffs = UF:Construct_Buffs(self)
|
||||||
|
self.Debuffs = UF:Construct_Debuffs(self)
|
||||||
|
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||||
|
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||||
|
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||||
|
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||||
|
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||||
|
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||||
|
self.GPS = UF:Construct_GPS(self)
|
||||||
self.Range = UF:Construct_Range(self)
|
self.Range = UF:Construct_Range(self)
|
||||||
|
self.customTexts = {}
|
||||||
|
|
||||||
UF:Update_StatusBars()
|
UF:Update_StatusBars()
|
||||||
UF:Update_FontStrings()
|
UF:Update_FontStrings()
|
||||||
|
|
||||||
self.unitframeType = "raid"
|
self.unitframeType = "raid"
|
||||||
|
|
||||||
UF:Update_RaidFrames(self, UF.db.units.raid)
|
UF:Update_RaidFrames(self, UF.db.units.raid)
|
||||||
@@ -42,25 +58,30 @@ end
|
|||||||
|
|
||||||
function UF:RaidSmartVisibility()
|
function UF:RaidSmartVisibility()
|
||||||
if not self then self = this end
|
if not self then self = this end
|
||||||
|
if not self.db or (self.db and not self.db.enable) then return end
|
||||||
|
|
||||||
if GetNumRaidMembers() > 1 then
|
local numMembers = GetNumRaidMembers()
|
||||||
|
if numMembers > 1 then
|
||||||
self:Show()
|
self:Show()
|
||||||
else
|
else
|
||||||
self:Hide()
|
self:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UF:Update_RaidHeader(header)
|
function UF:Update_RaidHeader(header, db)
|
||||||
|
header.db = db
|
||||||
|
|
||||||
if not header.positioned then
|
if not header.positioned then
|
||||||
header:ClearAllPoints()
|
header:ClearAllPoints()
|
||||||
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||||
|
|
||||||
E:CreateMover(header, header:GetName().."Mover", L["Raid Frames"], nil, nil, nil, "ALL,RAID")
|
E:CreateMover(header, header:GetName().."Mover", L["Raid Frames"], nil, nil, nil, "ALL,RAID")
|
||||||
|
|
||||||
|
header:RegisterEvent("PLAYER_LOGIN")
|
||||||
|
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||||
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
header:SetScript("OnEvent", UF.RaidSmartVisibility)
|
header:SetScript("OnEvent", UF.RaidSmartVisibility)
|
||||||
|
|
||||||
header.positioned = true
|
header.positioned = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -82,9 +103,9 @@ function UF:Update_RaidFrames(frame, db)
|
|||||||
frame.BORDER = E.Border
|
frame.BORDER = E.Border
|
||||||
frame.SPACING = E.Spacing
|
frame.SPACING = E.Spacing
|
||||||
end
|
end
|
||||||
|
|
||||||
frame.SHADOW_SPACING = 3
|
frame.SHADOW_SPACING = 3
|
||||||
frame.ORIENTATION = db.orientation
|
|
||||||
|
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||||
|
|
||||||
frame.UNIT_WIDTH = db.width
|
frame.UNIT_WIDTH = db.width
|
||||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||||
@@ -103,9 +124,7 @@ function UF:Update_RaidFrames(frame, db)
|
|||||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||||
|
|
||||||
frame.CLASSBAR_WIDTH = 0
|
|
||||||
frame.CLASSBAR_YOFFSET = 0
|
frame.CLASSBAR_YOFFSET = 0
|
||||||
|
|
||||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||||
|
|
||||||
@@ -114,9 +133,6 @@ function UF:Update_RaidFrames(frame, db)
|
|||||||
frame.VARIABLES_SET = true
|
frame.VARIABLES_SET = true
|
||||||
end
|
end
|
||||||
|
|
||||||
frame:SetWidth(frame.UNIT_WIDTH)
|
|
||||||
frame:SetHeight(frame.UNIT_HEIGHT)
|
|
||||||
|
|
||||||
UF:Configure_InfoPanel(frame)
|
UF:Configure_InfoPanel(frame)
|
||||||
|
|
||||||
UF:Configure_HealthBar(frame)
|
UF:Configure_HealthBar(frame)
|
||||||
@@ -127,14 +143,24 @@ function UF:Update_RaidFrames(frame, db)
|
|||||||
|
|
||||||
UF:Configure_Portrait(frame)
|
UF:Configure_Portrait(frame)
|
||||||
|
|
||||||
UF:Configure_GPS(frame)
|
UF:EnableDisable_Auras(frame)
|
||||||
|
UF:Configure_Auras(frame, "Buffs")
|
||||||
|
UF:Configure_Auras(frame, "Debuffs")
|
||||||
|
|
||||||
|
UF:Configure_RaidDebuffs(frame)
|
||||||
|
|
||||||
UF:Configure_RaidIcon(frame)
|
UF:Configure_RaidIcon(frame)
|
||||||
|
|
||||||
UF:Configure_RaidRoleIcons(frame)
|
UF:Configure_DebuffHighlight(frame)
|
||||||
|
|
||||||
|
UF:Configure_GPS(frame)
|
||||||
|
|
||||||
UF:Configure_Range(frame)
|
UF:Configure_Range(frame)
|
||||||
|
|
||||||
|
UF:UpdateAuraWatch(frame)
|
||||||
|
|
||||||
|
UF:Configure_CustomTexts(frame)
|
||||||
|
|
||||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,168 @@
|
|||||||
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
|
local UF = E:GetModule("UnitFrames");
|
||||||
|
|
||||||
|
local ns = oUF
|
||||||
|
local ElvUF = ns.oUF
|
||||||
|
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||||
|
|
||||||
|
--Cache global variables
|
||||||
|
--Lua functions
|
||||||
|
|
||||||
|
--WoW API / Variables
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
local GetNumRaidMembers = GetNumRaidMembers
|
||||||
|
local UnitInRaid = UnitInRaid
|
||||||
|
|
||||||
|
function UF:Construct_Raid40Frames()
|
||||||
|
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||||
|
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||||
|
|
||||||
|
self:SetWidth(UF.db.units.raid40.width)
|
||||||
|
self:SetHeight(UF.db.units.raid40.height)
|
||||||
|
|
||||||
|
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||||
|
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||||
|
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||||
|
|
||||||
|
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||||
|
|
||||||
|
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
||||||
|
self.Power.frequentUpdates = false
|
||||||
|
|
||||||
|
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||||
|
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||||
|
|
||||||
|
self.Name = UF:Construct_NameText(self)
|
||||||
|
self.Buffs = UF:Construct_Buffs(self)
|
||||||
|
self.Debuffs = UF:Construct_Debuffs(self)
|
||||||
|
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||||
|
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||||
|
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||||
|
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||||
|
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||||
|
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||||
|
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||||
|
self.GPS = UF:Construct_GPS(self)
|
||||||
|
self.Range = UF:Construct_Range(self)
|
||||||
|
self.customTexts = {}
|
||||||
|
|
||||||
|
UF:Update_StatusBars()
|
||||||
|
UF:Update_FontStrings()
|
||||||
|
|
||||||
|
self.unitframeType = "raid40"
|
||||||
|
|
||||||
|
UF:Update_Raid40Frames(self, UF.db.units.raid40)
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:Raid40SmartVisibility()
|
||||||
|
if not self then self = this end
|
||||||
|
if not self.db or (self.db and not self.db.enable) then return end
|
||||||
|
|
||||||
|
local numMembers = GetNumRaidMembers()
|
||||||
|
if numMembers > 20 then
|
||||||
|
self:Show()
|
||||||
|
else
|
||||||
|
self:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:Update_Raid40Header(header, db)
|
||||||
|
header.db = db
|
||||||
|
|
||||||
|
if not header.positioned then
|
||||||
|
header:ClearAllPoints()
|
||||||
|
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||||
|
|
||||||
|
E:CreateMover(header, header:GetName().."Mover", L["Raid-40 Frames"], nil, nil, nil, "ALL,RAID")
|
||||||
|
|
||||||
|
header:RegisterEvent("PLAYER_LOGIN")
|
||||||
|
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||||
|
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
|
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
|
header:SetScript("OnEvent", UF.Raid40SmartVisibility)
|
||||||
|
header.positioned = true
|
||||||
|
end
|
||||||
|
|
||||||
|
UF.Raid40SmartVisibility(header)
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:Update_Raid40Frames(frame, db)
|
||||||
|
frame.db = db
|
||||||
|
|
||||||
|
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||||
|
frame.colors = ElvUF.colors
|
||||||
|
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||||
|
|
||||||
|
do
|
||||||
|
if self.thinBorders then
|
||||||
|
frame.SPACING = 0
|
||||||
|
frame.BORDER = E.mult
|
||||||
|
else
|
||||||
|
frame.BORDER = E.Border
|
||||||
|
frame.SPACING = E.Spacing
|
||||||
|
end
|
||||||
|
frame.SHADOW_SPACING = 3
|
||||||
|
|
||||||
|
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||||
|
|
||||||
|
frame.UNIT_WIDTH = db.width
|
||||||
|
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||||
|
|
||||||
|
frame.USE_POWERBAR = db.power.enable
|
||||||
|
frame.POWERBAR_DETACHED = db.power.detachFromFrame
|
||||||
|
frame.USE_INSET_POWERBAR = not frame.POWERBAR_DETACHED and db.power.width == "inset" and frame.USE_POWERBAR
|
||||||
|
frame.USE_MINI_POWERBAR = (not frame.POWERBAR_DETACHED and db.power.width == "spaced" and frame.USE_POWERBAR)
|
||||||
|
frame.USE_POWERBAR_OFFSET = db.power.offset ~= 0 and frame.USE_POWERBAR and not frame.POWERBAR_DETACHED
|
||||||
|
frame.POWERBAR_OFFSET = frame.USE_POWERBAR_OFFSET and db.power.offset or 0
|
||||||
|
|
||||||
|
frame.POWERBAR_HEIGHT = not frame.USE_POWERBAR and 0 or db.power.height
|
||||||
|
frame.POWERBAR_WIDTH = frame.USE_MINI_POWERBAR and (frame.UNIT_WIDTH - (frame.BORDER*2))/2 or (frame.POWERBAR_DETACHED and db.power.detachedWidth or (frame.UNIT_WIDTH - ((frame.BORDER+frame.SPACING)*2)))
|
||||||
|
|
||||||
|
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||||
|
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||||
|
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||||
|
|
||||||
|
frame.CLASSBAR_YOFFSET = 0
|
||||||
|
|
||||||
|
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||||
|
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||||
|
|
||||||
|
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||||
|
|
||||||
|
frame.VARIABLES_SET = true
|
||||||
|
end
|
||||||
|
|
||||||
|
UF:Configure_InfoPanel(frame)
|
||||||
|
|
||||||
|
UF:Configure_HealthBar(frame)
|
||||||
|
|
||||||
|
UF:UpdateNameSettings(frame)
|
||||||
|
|
||||||
|
UF:Configure_Power(frame)
|
||||||
|
|
||||||
|
UF:Configure_Portrait(frame)
|
||||||
|
|
||||||
|
UF:EnableDisable_Auras(frame)
|
||||||
|
UF:Configure_Auras(frame, "Buffs")
|
||||||
|
UF:Configure_Auras(frame, "Debuffs")
|
||||||
|
|
||||||
|
UF:Configure_RaidDebuffs(frame)
|
||||||
|
|
||||||
|
UF:Configure_RaidIcon(frame)
|
||||||
|
|
||||||
|
UF:Configure_DebuffHighlight(frame)
|
||||||
|
|
||||||
|
UF:Configure_GPS(frame)
|
||||||
|
|
||||||
|
UF:Configure_Range(frame)
|
||||||
|
|
||||||
|
UF:UpdateAuraWatch(frame)
|
||||||
|
|
||||||
|
UF:Configure_CustomTexts(frame)
|
||||||
|
|
||||||
|
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||||
|
end
|
||||||
|
|
||||||
|
UF.headerstoload.raid40 = true
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
|
local UF = E:GetModule("UnitFrames");
|
||||||
|
|
||||||
|
local ns = oUF
|
||||||
|
local ElvUF = ns.oUF
|
||||||
|
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||||
|
|
||||||
|
--WoW API / Variables
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
|
||||||
|
function UF:Construct_RaidpetFrames()
|
||||||
|
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||||
|
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||||
|
|
||||||
|
self:SetWidth(UF.db.units.raidpet.width)
|
||||||
|
self:SetHeight(UF.db.units.raidpet.height)
|
||||||
|
|
||||||
|
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||||
|
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||||
|
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||||
|
|
||||||
|
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||||
|
self.Name = UF:Construct_NameText(self)
|
||||||
|
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||||
|
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||||
|
self.Buffs = UF:Construct_Buffs(self)
|
||||||
|
self.Debuffs = UF:Construct_Debuffs(self)
|
||||||
|
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||||
|
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||||
|
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||||
|
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||||
|
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||||
|
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||||
|
self.Range = UF:Construct_Range(self)
|
||||||
|
self.customTexts = {}
|
||||||
|
|
||||||
|
UF:Update_StatusBars()
|
||||||
|
UF:Update_FontStrings()
|
||||||
|
|
||||||
|
self.unitframeType = "raidpet"
|
||||||
|
|
||||||
|
UF:Update_RaidpetFrames(self, UF.db.units.raidpet)
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:RaidPetsSmartVisibility()
|
||||||
|
if not self then self = this end
|
||||||
|
if not self.db or (self.db and not self.db.enable) then return end
|
||||||
|
|
||||||
|
local numMembers = GetNumRaidMembers()
|
||||||
|
if numMembers > 1 then
|
||||||
|
self:Show()
|
||||||
|
else
|
||||||
|
self:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:Update_RaidpetHeader(header, db)
|
||||||
|
header.db = db
|
||||||
|
|
||||||
|
if not header.positioned then
|
||||||
|
header:ClearAllPoints()
|
||||||
|
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 574)
|
||||||
|
|
||||||
|
E:CreateMover(header, header:GetName().."Mover", L["Raid Pet Frames"], nil, nil, nil, "ALL,RAID10,RAID25,RAID40")
|
||||||
|
|
||||||
|
header:RegisterEvent("PLAYER_LOGIN")
|
||||||
|
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||||
|
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
|
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
|
header:SetScript("OnEvent", UF.RaidPetsSmartVisibility)
|
||||||
|
header.positioned = true
|
||||||
|
end
|
||||||
|
|
||||||
|
UF.RaidPetsSmartVisibility(header)
|
||||||
|
end
|
||||||
|
|
||||||
|
function UF:Update_RaidpetFrames(frame, db)
|
||||||
|
frame.db = db
|
||||||
|
|
||||||
|
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||||
|
frame.colors = ElvUF.colors
|
||||||
|
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||||
|
|
||||||
|
do
|
||||||
|
if self.thinBorders then
|
||||||
|
frame.SPACING = 0
|
||||||
|
frame.BORDER = E.mult
|
||||||
|
else
|
||||||
|
frame.BORDER = E.Border
|
||||||
|
frame.SPACING = E.Spacing
|
||||||
|
end
|
||||||
|
frame.SHADOW_SPACING = 3
|
||||||
|
|
||||||
|
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||||
|
|
||||||
|
frame.UNIT_WIDTH = db.width
|
||||||
|
frame.UNIT_HEIGHT = db.height
|
||||||
|
|
||||||
|
frame.USE_POWERBAR = false
|
||||||
|
frame.POWERBAR_DETACHED = false
|
||||||
|
frame.USE_INSET_POWERBAR = false
|
||||||
|
frame.USE_MINI_POWERBAR = false
|
||||||
|
frame.USE_POWERBAR_OFFSET = false
|
||||||
|
frame.POWERBAR_OFFSET = 0
|
||||||
|
frame.POWERBAR_HEIGHT = 0
|
||||||
|
frame.POWERBAR_WIDTH = 0
|
||||||
|
|
||||||
|
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||||
|
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||||
|
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||||
|
|
||||||
|
frame.CLASSBAR_YOFFSET = 0
|
||||||
|
frame.BOTTOM_OFFSET = 0
|
||||||
|
|
||||||
|
frame.VARIABLES_SET = true
|
||||||
|
end
|
||||||
|
|
||||||
|
UF:Configure_HealthBar(frame)
|
||||||
|
|
||||||
|
UF:UpdateNameSettings(frame)
|
||||||
|
|
||||||
|
UF:Configure_Portrait(frame)
|
||||||
|
|
||||||
|
UF:EnableDisable_Auras(frame)
|
||||||
|
UF:Configure_Auras(frame, "Buffs")
|
||||||
|
UF:Configure_Auras(frame, "Debuffs")
|
||||||
|
|
||||||
|
UF:Configure_RaidDebuffs(frame)
|
||||||
|
|
||||||
|
UF:Configure_RaidIcon(frame)
|
||||||
|
|
||||||
|
UF:Configure_DebuffHighlight(frame)
|
||||||
|
|
||||||
|
UF:Configure_Range(frame)
|
||||||
|
|
||||||
|
UF:UpdateAuraWatch(frame, true) --2nd argument is the petOverride
|
||||||
|
|
||||||
|
UF:Configure_CustomTexts(frame)
|
||||||
|
|
||||||
|
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||||
|
end
|
||||||
|
|
||||||
|
UF.headerstoload.raidpet = true
|
||||||
@@ -794,8 +794,8 @@ function UF:UpdateAllHeaders(event)
|
|||||||
|
|
||||||
if instanceType == "party" or instanceType == "raid" then
|
if instanceType == "party" or instanceType == "raid" then
|
||||||
ORD:RegisterDebuffs(E.global.unitframe.aurafilters.RaidDebuffs.spells)
|
ORD:RegisterDebuffs(E.global.unitframe.aurafilters.RaidDebuffs.spells)
|
||||||
else
|
-- else
|
||||||
ORD:RegisterDebuffs(E.global.unitframe.aurafilters.CCDebuffs.spells)
|
-- ORD:RegisterDebuffs(E.global.unitframe.aurafilters.CCDebuffs.spells)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -809,7 +809,7 @@ function UF:UpdateAllHeaders(event)
|
|||||||
end
|
end
|
||||||
UF.headerFunctions[group]:Update(header)
|
UF.headerFunctions[group]:Update(header)
|
||||||
|
|
||||||
if group == "party" or group == "raid" then
|
if group == "party" or group == "raid" or group == "raid40" then
|
||||||
--Update BuffIndicators on profile change as they might be using profile specific data
|
--Update BuffIndicators on profile change as they might be using profile specific data
|
||||||
--self:UpdateAuraWatchFromHeader(group)
|
--self:UpdateAuraWatchFromHeader(group)
|
||||||
end
|
end
|
||||||
@@ -913,8 +913,8 @@ function UF:Initialize()
|
|||||||
ORD.ShowDispelableDebuff = true
|
ORD.ShowDispelableDebuff = true
|
||||||
ORD.FilterDispellableDebuff = true
|
ORD.FilterDispellableDebuff = true
|
||||||
|
|
||||||
self:UpdateRangeCheckSpells()
|
-- self:UpdateRangeCheckSpells()
|
||||||
self:RegisterEvent("LEARNED_SPELL_IN_TAB", "UpdateRangeCheckSpells")
|
-- self:RegisterEvent("LEARNED_SPELL_IN_TAB", "UpdateRangeCheckSpells")
|
||||||
end
|
end
|
||||||
|
|
||||||
function UF:ResetUnitSettings(unit)
|
function UF:ResetUnitSettings(unit)
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ function UF:Construct_PlayerFrame(frame)
|
|||||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||||
frame.RaidRoleFramesAnchor = self:Construct_RaidRoleFrames(frame)
|
|
||||||
frame.RestingIndicator = self:Construct_RestingIndicator(frame)
|
frame.RestingIndicator = self:Construct_RestingIndicator(frame)
|
||||||
frame.CombatIndicator = self:Construct_CombatIndicator(frame)
|
frame.CombatIndicator = self:Construct_CombatIndicator(frame)
|
||||||
frame.PvPText = self:Construct_PvPIndicator(frame)
|
frame.PvPText = self:Construct_PvPIndicator(frame)
|
||||||
@@ -137,8 +136,6 @@ function UF:Update_PlayerFrame(frame, db)
|
|||||||
|
|
||||||
UF:Configure_PVPIcon(frame)
|
UF:Configure_PVPIcon(frame)
|
||||||
|
|
||||||
UF:Configure_RaidRoleIcons(frame)
|
|
||||||
|
|
||||||
UF:Configure_CustomTexts(frame)
|
UF:Configure_CustomTexts(frame)
|
||||||
|
|
||||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
|
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ function UF:Construct_TargetTargetFrame(frame)
|
|||||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||||
frame.Range = self:Construct_Range(frame)
|
frame.Range = self:Construct_Range(frame)
|
||||||
-- frame.ThreatIndicator = self:Construct_Threat(frame)
|
|
||||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||||
@@ -76,8 +75,6 @@ function UF:Update_TargetTargetFrame(frame, db)
|
|||||||
|
|
||||||
UF:Configure_Portrait(frame)
|
UF:Configure_Portrait(frame)
|
||||||
|
|
||||||
-- UF:Configure_Threat(frame)
|
|
||||||
|
|
||||||
UF:EnableDisable_Auras(frame)
|
UF:EnableDisable_Auras(frame)
|
||||||
UF:Configure_Auras(frame, "Buffs")
|
UF:Configure_Auras(frame, "Buffs")
|
||||||
UF:Configure_Auras(frame, "Debuffs")
|
UF:Configure_Auras(frame, "Debuffs")
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ function UF:Construct_TargetTargetTargetFrame(frame)
|
|||||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||||
frame.Range = self:Construct_Range(frame)
|
frame.Range = self:Construct_Range(frame)
|
||||||
-- frame.ThreatIndicator = self:Construct_Threat(frame)
|
|
||||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||||
@@ -76,8 +75,6 @@ function UF:Update_TargetTargetTargetFrame(frame, db)
|
|||||||
|
|
||||||
UF:Configure_Portrait(frame)
|
UF:Configure_Portrait(frame)
|
||||||
|
|
||||||
-- UF:Configure_Threat(frame)
|
|
||||||
|
|
||||||
UF:EnableDisable_Auras(frame)
|
UF:EnableDisable_Auras(frame)
|
||||||
UF:Configure_Auras(frame, "Buffs")
|
UF:Configure_Auras(frame, "Buffs")
|
||||||
UF:Configure_Auras(frame, "Debuffs")
|
UF:Configure_Auras(frame, "Debuffs")
|
||||||
|
|||||||
+136
-7
@@ -11,8 +11,7 @@ G["general"] = {
|
|||||||
["position"] = "BOTTOMLEFT",
|
["position"] = "BOTTOMLEFT",
|
||||||
["xOffset"] = 0,
|
["xOffset"] = 0,
|
||||||
["yOffset"] = 0
|
["yOffset"] = 0
|
||||||
},
|
}
|
||||||
["versionCheck"] = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
G["classCache"] = {}
|
G["classCache"] = {}
|
||||||
@@ -21,11 +20,6 @@ G["classtimer"] = {}
|
|||||||
|
|
||||||
G["nameplates"] = {}
|
G["nameplates"] = {}
|
||||||
|
|
||||||
G["unitframe"] = {
|
|
||||||
["specialFilters"] = {},
|
|
||||||
["aurafilters"] = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
G["chat"] = {
|
G["chat"] = {
|
||||||
["classColorMentionExcludedNames"] = {}
|
["classColorMentionExcludedNames"] = {}
|
||||||
}
|
}
|
||||||
@@ -34,6 +28,141 @@ G["bags"] = {
|
|||||||
["ignoredItems"] = {}
|
["ignoredItems"] = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G["unitframe"] = {
|
||||||
|
["aurafilters"] = {},
|
||||||
|
["buffwatch"] = {},
|
||||||
|
["raidDebuffIndicator"] = {
|
||||||
|
["instanceFilter"] = "RaidDebuffs",
|
||||||
|
["otherFilter"] = "CCDebuffs",
|
||||||
|
},
|
||||||
|
["spellRangeCheck"] = {
|
||||||
|
["PRIEST"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[585] = true, -- Smite (30 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[589] = true, -- Shadow Word: Pain (30 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {
|
||||||
|
[2050] = true, -- Lesser Heal (40 yards)
|
||||||
|
},
|
||||||
|
["resSpells"] = {
|
||||||
|
[2006] = true, -- Resurrection (30 yards)
|
||||||
|
},
|
||||||
|
["petSpells"] = {},
|
||||||
|
},
|
||||||
|
["DRUID"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[33786] = true, -- Cyclone (20 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[5176] = true, -- Wrath (30 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {
|
||||||
|
[5185] = true, -- Healing Touch (40 yards)
|
||||||
|
},
|
||||||
|
["resSpells"] = {
|
||||||
|
[20484] = true, -- Rebirth (30 yards)
|
||||||
|
},
|
||||||
|
["petSpells"] = {},
|
||||||
|
},
|
||||||
|
["PALADIN"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[20271] = true, -- Judgement (10 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[879] = true, -- Exorcism (30 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {
|
||||||
|
[635] = true, -- Holy Light (40 yards)
|
||||||
|
},
|
||||||
|
["resSpells"] = {
|
||||||
|
[7328] = true, -- Redemption (30 yards)
|
||||||
|
},
|
||||||
|
["petSpells"] = {},
|
||||||
|
},
|
||||||
|
["SHAMAN"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[8042] = true, -- Earth Shock (20 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[403] = true, -- Lightning Bolt (30 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {
|
||||||
|
[331] = true, -- Healing Wave (40 yards)
|
||||||
|
},
|
||||||
|
["resSpells"] = {
|
||||||
|
[2008] = true, -- Ancestral Spirit (30 yards)
|
||||||
|
},
|
||||||
|
["petSpells"] = {},
|
||||||
|
},
|
||||||
|
["WARLOCK"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[5782] = true, -- Fear (20 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[686] = true, -- Shadow Bolt (30 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {
|
||||||
|
[5697] = true, -- Unending Breath (30 yards)
|
||||||
|
},
|
||||||
|
["resSpells"] = {},
|
||||||
|
["petSpells"] = {
|
||||||
|
[755] = true, -- Health Funnel (20 yards)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["MAGE"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[2136] = true, -- Fire Blast (20 yards)
|
||||||
|
[12826] = true, -- Polymorph (30 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[133] = true, -- Fireball (35 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {
|
||||||
|
[475] = true, -- Remove Curse (40 yards)
|
||||||
|
},
|
||||||
|
["resSpells"] = {},
|
||||||
|
["petSpells"] = {},
|
||||||
|
},
|
||||||
|
["HUNTER"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[75] = true, -- Auto Shot (35 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {},
|
||||||
|
["friendlySpells"] = {},
|
||||||
|
["resSpells"] = {},
|
||||||
|
["petSpells"] = {
|
||||||
|
[136] = true, -- Mend Pet (45 yards)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["ROGUE"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[2094] = true, -- Blind (10 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[26679] = true, -- Deadly Throw (30 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {},
|
||||||
|
["resSpells"] = {},
|
||||||
|
["petSpells"] = {},
|
||||||
|
},
|
||||||
|
["WARRIOR"] = {
|
||||||
|
["enemySpells"] = {
|
||||||
|
[5246] = true, -- Intimidating Shout (10 yards)
|
||||||
|
},
|
||||||
|
["longEnemySpells"] = {
|
||||||
|
[100] = true, -- Charge (25 yards)
|
||||||
|
},
|
||||||
|
["friendlySpells"] = {
|
||||||
|
[3411] = true, -- Intervene (25 yards)
|
||||||
|
},
|
||||||
|
["resSpells"] = {},
|
||||||
|
["petSpells"] = {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
G["profileCopy"] = {
|
G["profileCopy"] = {
|
||||||
--Specific values
|
--Specific values
|
||||||
["selected"] = "Minimalistic",
|
["selected"] = "Minimalistic",
|
||||||
|
|||||||
@@ -828,10 +828,6 @@ P["unitframe"] = {
|
|||||||
["size"] = 22,
|
["size"] = 22,
|
||||||
["texture"] = "DEFAULT"
|
["texture"] = "DEFAULT"
|
||||||
},
|
},
|
||||||
["raidRoleIcons"] = {
|
|
||||||
["enable"] = true,
|
|
||||||
["position"] = "TOPLEFT"
|
|
||||||
},
|
|
||||||
["CombatIcon"] = {
|
["CombatIcon"] = {
|
||||||
["enable"] = true,
|
["enable"] = true,
|
||||||
["defaultColor"] = true,
|
["defaultColor"] = true,
|
||||||
@@ -1980,10 +1976,6 @@ P["unitframe"] = {
|
|||||||
["frameLevel"] = 1
|
["frameLevel"] = 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["raidRoleIcons"] = {
|
|
||||||
["enable"] = true,
|
|
||||||
["position"] = "TOPLEFT"
|
|
||||||
},
|
|
||||||
["petsGroup"] = {
|
["petsGroup"] = {
|
||||||
["enable"] = false,
|
["enable"] = false,
|
||||||
["width"] = 100,
|
["width"] = 100,
|
||||||
@@ -2180,10 +2172,6 @@ P["unitframe"] = {
|
|||||||
["color"] = {r = 1, g = 0.9, b = 0, a = 1}
|
["color"] = {r = 1, g = 0.9, b = 0, a = 1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["raidRoleIcons"] = {
|
|
||||||
["enable"] = true,
|
|
||||||
["position"] = "TOPLEFT"
|
|
||||||
},
|
|
||||||
["raidicon"] = {
|
["raidicon"] = {
|
||||||
["enable"] = true,
|
["enable"] = true,
|
||||||
["size"] = 18,
|
["size"] = 18,
|
||||||
@@ -2338,10 +2326,6 @@ P["unitframe"] = {
|
|||||||
["color"] = {r = 1, g = 0.9, b = 0, a = 1}
|
["color"] = {r = 1, g = 0.9, b = 0, a = 1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["raidRoleIcons"] = {
|
|
||||||
["enable"] = true,
|
|
||||||
["position"] = "TOPLEFT"
|
|
||||||
},
|
|
||||||
["buffIndicator"] = {
|
["buffIndicator"] = {
|
||||||
["enable"] = true,
|
["enable"] = true,
|
||||||
["size"] = 8,
|
["size"] = 8,
|
||||||
|
|||||||
+10
-653
@@ -1144,60 +1144,6 @@ local function GetOptionsTable_RaidIcon(updateFunc, groupName, numUnits)
|
|||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
|
|
||||||
local function GetOptionsTable_ResurrectIcon(updateFunc, groupName, numUnits)
|
|
||||||
local config = {
|
|
||||||
order = 5001,
|
|
||||||
type = "group",
|
|
||||||
name = L["Resurrect Icon"],
|
|
||||||
get = function(info) return E.db.unitframe.units[groupName].resurrectIcon[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units[groupName].resurrectIcon[ info[getn(info)] ] = value updateFunc(UF, groupName, numUnits) end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["Resurrect Icon"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
attachTo = {
|
|
||||||
order = 3,
|
|
||||||
type = "select",
|
|
||||||
name = L["Position"],
|
|
||||||
values = positionValues
|
|
||||||
},
|
|
||||||
attachToObject = {
|
|
||||||
order = 4,
|
|
||||||
type = "select",
|
|
||||||
name = L["Attach To"],
|
|
||||||
values = attachToValues
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
order = 5,
|
|
||||||
type = "range",
|
|
||||||
name = L["Size"],
|
|
||||||
min = 8, max = 60, step = 1
|
|
||||||
},
|
|
||||||
xOffset = {
|
|
||||||
order = 6,
|
|
||||||
type = "range",
|
|
||||||
name = L["xOffset"],
|
|
||||||
min = -300, max = 300, step = 1
|
|
||||||
},
|
|
||||||
yOffset = {
|
|
||||||
order = 7,
|
|
||||||
type = "range",
|
|
||||||
name = L["yOffset"],
|
|
||||||
min = -300, max = 300, step = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return config
|
|
||||||
end
|
|
||||||
|
|
||||||
local function GetOptionsTable_RaidDebuff(updateFunc, groupName)
|
local function GetOptionsTable_RaidDebuff(updateFunc, groupName)
|
||||||
local config = {
|
local config = {
|
||||||
order = 800,
|
order = 800,
|
||||||
@@ -1262,12 +1208,12 @@ local function GetOptionsTable_RaidDebuff(updateFunc, groupName)
|
|||||||
name = L["yOffset"],
|
name = L["yOffset"],
|
||||||
min = -300, max = 300, step = 1
|
min = -300, max = 300, step = 1
|
||||||
},
|
},
|
||||||
configureButton = {
|
--[[configureButton = {
|
||||||
order = 10,
|
order = 10,
|
||||||
type = "execute",
|
type = "execute",
|
||||||
name = L["Configure Auras"],
|
name = L["Configure Auras"],
|
||||||
func = function() E:SetToFilterConfig("RaidDebuffs") end
|
func = function() E:SetToFilterConfig("RaidDebuffs") end
|
||||||
},
|
},--]]
|
||||||
duration = {
|
duration = {
|
||||||
order = 11,
|
order = 11,
|
||||||
type = "group",
|
type = "group",
|
||||||
@@ -1362,60 +1308,6 @@ local function GetOptionsTable_RaidDebuff(updateFunc, groupName)
|
|||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
|
|
||||||
local function GetOptionsTable_ReadyCheckIcon(updateFunc, groupName)
|
|
||||||
local config = {
|
|
||||||
order = 700,
|
|
||||||
type = "group",
|
|
||||||
name = L["Ready Check Icon"],
|
|
||||||
get = function(info) return E.db.unitframe.units[groupName].readycheckIcon[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units[groupName].readycheckIcon[ info[getn(info)] ] = value updateFunc(UF, groupName) end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["Ready Check Icon"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Size"],
|
|
||||||
min = 8, max = 60, step = 1
|
|
||||||
},
|
|
||||||
attachTo = {
|
|
||||||
order = 4,
|
|
||||||
type = "select",
|
|
||||||
name = L["Attach To"],
|
|
||||||
values = attachToValues
|
|
||||||
},
|
|
||||||
position = {
|
|
||||||
order = 5,
|
|
||||||
type = "select",
|
|
||||||
name = L["Position"],
|
|
||||||
values = positionValues
|
|
||||||
},
|
|
||||||
xOffset = {
|
|
||||||
order = 6,
|
|
||||||
type = "range",
|
|
||||||
name = L["xOffset"],
|
|
||||||
min = -300, max = 300, step = 1
|
|
||||||
},
|
|
||||||
yOffset = {
|
|
||||||
order = 7,
|
|
||||||
type = "range",
|
|
||||||
name = L["yOffset"],
|
|
||||||
min = -300, max = 300, step = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return config
|
|
||||||
end
|
|
||||||
|
|
||||||
local function GetOptionsTable_GPS(groupName)
|
local function GetOptionsTable_GPS(groupName)
|
||||||
local config = {
|
local config = {
|
||||||
order = 3000,
|
order = 3000,
|
||||||
@@ -1908,22 +1800,6 @@ E.Options.args.unitframe = {
|
|||||||
type = "description",
|
type = "description",
|
||||||
name = " "
|
name = " "
|
||||||
},
|
},
|
||||||
assistShortcut = {
|
|
||||||
order = 29,
|
|
||||||
type = "execute",
|
|
||||||
name = L["Assist Frames"],
|
|
||||||
buttonElvUI = true,
|
|
||||||
func = function() ACD:SelectGroup("ElvUI", "unitframe", "assist") end,
|
|
||||||
disabled = function() return not E.UnitFrames end
|
|
||||||
},
|
|
||||||
tankShortcut = {
|
|
||||||
order = 30,
|
|
||||||
type = "execute",
|
|
||||||
name = L["Tank Frames"],
|
|
||||||
buttonElvUI = true,
|
|
||||||
func = function() ACD:SelectGroup("ElvUI", "unitframe", "tank") end,
|
|
||||||
disabled = function() return not E.UnitFrames end
|
|
||||||
},
|
|
||||||
generalOptionsGroup = {
|
generalOptionsGroup = {
|
||||||
order = 31,
|
order = 31,
|
||||||
type = "group",
|
type = "group",
|
||||||
@@ -3313,34 +3189,6 @@ E.Options.args.unitframe.args.player = {
|
|||||||
width = "full"
|
width = "full"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
raidRoleIcons = {
|
|
||||||
order = 703,
|
|
||||||
type = "group",
|
|
||||||
name = L["RL / ML Icons"],
|
|
||||||
get = function(info) return E.db.unitframe.units.player.raidRoleIcons[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.player.raidRoleIcons[ info[getn(info)] ] = value UF:CreateAndUpdateUF("player") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["RL / ML Icons"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
position = {
|
|
||||||
order = 3,
|
|
||||||
type = "select",
|
|
||||||
name = L["Position"],
|
|
||||||
values = {
|
|
||||||
["TOPLEFT"] = "TOPLEFT",
|
|
||||||
["TOPRIGHT"] = "TOPRIGHT"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4833,7 +4681,6 @@ E.Options.args.unitframe.args.party = {
|
|||||||
values = {
|
values = {
|
||||||
["CLASS"] = CLASS,
|
["CLASS"] = CLASS,
|
||||||
["NAME"] = NAME,
|
["NAME"] = NAME,
|
||||||
["MTMA"] = L["Main Tanks / Main Assist"],
|
|
||||||
["GROUP"] = GROUP
|
["GROUP"] = GROUP
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4913,7 +4760,7 @@ E.Options.args.unitframe.args.party = {
|
|||||||
name = L["Profile Specific"],
|
name = L["Profile Specific"],
|
||||||
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
||||||
},
|
},
|
||||||
configureButton = {
|
--[[configureButton = {
|
||||||
order = 6,
|
order = 6,
|
||||||
type = "execute",
|
type = "execute",
|
||||||
name = L["Configure Auras"],
|
name = L["Configure Auras"],
|
||||||
@@ -4924,35 +4771,7 @@ E.Options.args.unitframe.args.party = {
|
|||||||
E:SetToFilterConfig("Buff Indicator")
|
E:SetToFilterConfig("Buff Indicator")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}--]]
|
||||||
}
|
|
||||||
},
|
|
||||||
raidRoleIcons = {
|
|
||||||
order = 750,
|
|
||||||
type = "group",
|
|
||||||
name = L["RL / ML Icons"],
|
|
||||||
get = function(info) return E.db.unitframe.units.party.raidRoleIcons[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.party.raidRoleIcons[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("party") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["RL / ML Icons"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
position = {
|
|
||||||
order = 3,
|
|
||||||
type = "select",
|
|
||||||
name = L["Position"],
|
|
||||||
values = {
|
|
||||||
["TOPLEFT"] = "TOPLEFT",
|
|
||||||
["TOPRIGHT"] = "TOPRIGHT"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
health = GetOptionsTable_Health(true, UF.CreateAndUpdateHeaderGroup, "party"),
|
health = GetOptionsTable_Health(true, UF.CreateAndUpdateHeaderGroup, "party"),
|
||||||
@@ -5143,8 +4962,6 @@ E.Options.args.unitframe.args.party = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "party"),
|
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "party"),
|
||||||
readycheckIcon = GetOptionsTable_ReadyCheckIcon(UF.CreateAndUpdateHeaderGroup, "party"),
|
|
||||||
resurrectIcon = GetOptionsTable_ResurrectIcon(UF.CreateAndUpdateHeaderGroup, "party"),
|
|
||||||
GPSArrow = GetOptionsTable_GPS("party")
|
GPSArrow = GetOptionsTable_GPS("party")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5371,7 +5188,6 @@ E.Options.args.unitframe.args.raid = {
|
|||||||
values = {
|
values = {
|
||||||
["CLASS"] = CLASS,
|
["CLASS"] = CLASS,
|
||||||
["NAME"] = NAME,
|
["NAME"] = NAME,
|
||||||
["MTMA"] = L["Main Tanks / Main Assist"],
|
|
||||||
["GROUP"] = GROUP
|
["GROUP"] = GROUP
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -5458,7 +5274,7 @@ E.Options.args.unitframe.args.raid = {
|
|||||||
name = L["Profile Specific"],
|
name = L["Profile Specific"],
|
||||||
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
||||||
},
|
},
|
||||||
configureButton = {
|
--[[configureButton = {
|
||||||
order = 6,
|
order = 6,
|
||||||
type = "execute",
|
type = "execute",
|
||||||
name = L["Configure Auras"],
|
name = L["Configure Auras"],
|
||||||
@@ -5469,41 +5285,11 @@ E.Options.args.unitframe.args.raid = {
|
|||||||
E:SetToFilterConfig("Buff Indicator")
|
E:SetToFilterConfig("Buff Indicator")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}--]]
|
||||||
}
|
|
||||||
},
|
|
||||||
raidRoleIcons = {
|
|
||||||
order = 750,
|
|
||||||
type = "group",
|
|
||||||
name = L["RL / ML Icons"],
|
|
||||||
get = function(info) return E.db.unitframe.units.raid.raidRoleIcons[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.raid.raidRoleIcons[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("raid") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["RL / ML Icons"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
position = {
|
|
||||||
order = 3,
|
|
||||||
type = "select",
|
|
||||||
name = L["Position"],
|
|
||||||
values = {
|
|
||||||
["TOPLEFT"] = "TOPLEFT",
|
|
||||||
["TOPRIGHT"] = "TOPRIGHT"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, "raid"),
|
rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, "raid"),
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "raid"),
|
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "raid"),
|
||||||
readycheckIcon = GetOptionsTable_ReadyCheckIcon(UF.CreateAndUpdateHeaderGroup, "raid"),
|
|
||||||
resurrectIcon = GetOptionsTable_ResurrectIcon(UF.CreateAndUpdateHeaderGroup, "raid"),
|
|
||||||
GPSArrow = GetOptionsTable_GPS("raid")
|
GPSArrow = GetOptionsTable_GPS("raid")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5730,7 +5516,6 @@ E.Options.args.unitframe.args.raid40 = {
|
|||||||
values = {
|
values = {
|
||||||
["CLASS"] = CLASS,
|
["CLASS"] = CLASS,
|
||||||
["NAME"] = NAME,
|
["NAME"] = NAME,
|
||||||
["MTMA"] = L["Main Tanks / Main Assist"],
|
|
||||||
["GROUP"] = GROUP
|
["GROUP"] = GROUP
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -5817,7 +5602,7 @@ E.Options.args.unitframe.args.raid40 = {
|
|||||||
name = L["Profile Specific"],
|
name = L["Profile Specific"],
|
||||||
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
||||||
},
|
},
|
||||||
configureButton = {
|
--[[configureButton = {
|
||||||
order = 6,
|
order = 6,
|
||||||
type = "execute",
|
type = "execute",
|
||||||
name = L["Configure Auras"],
|
name = L["Configure Auras"],
|
||||||
@@ -5828,41 +5613,11 @@ E.Options.args.unitframe.args.raid40 = {
|
|||||||
E:SetToFilterConfig("Buff Indicator")
|
E:SetToFilterConfig("Buff Indicator")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}--]]
|
||||||
}
|
|
||||||
},
|
|
||||||
raidRoleIcons = {
|
|
||||||
order = 750,
|
|
||||||
type = "group",
|
|
||||||
name = L["RL / ML Icons"],
|
|
||||||
get = function(info) return E.db.unitframe.units.raid40.raidRoleIcons[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.raid40.raidRoleIcons[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("raid40") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["RL / ML Icons"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
position = {
|
|
||||||
order = 3,
|
|
||||||
type = "select",
|
|
||||||
name = L["Position"],
|
|
||||||
values = {
|
|
||||||
["TOPLEFT"] = "TOPLEFT",
|
|
||||||
["TOPRIGHT"] = "TOPRIGHT"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, "raid40"),
|
rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, "raid40"),
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "raid40"),
|
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "raid40"),
|
||||||
readycheckIcon = GetOptionsTable_ReadyCheckIcon(UF.CreateAndUpdateHeaderGroup, "raid40"),
|
|
||||||
resurrectIcon = GetOptionsTable_ResurrectIcon(UF.CreateAndUpdateHeaderGroup, "raid40"),
|
|
||||||
GPSArrow = GetOptionsTable_GPS("raid40")
|
GPSArrow = GetOptionsTable_GPS("raid40")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6155,415 +5910,17 @@ E.Options.args.unitframe.args.raidpet = {
|
|||||||
name = FONT_SIZE,
|
name = FONT_SIZE,
|
||||||
min = 7, max = 22, step = 1
|
min = 7, max = 22, step = 1
|
||||||
},
|
},
|
||||||
configureButton = {
|
--[[configureButton = {
|
||||||
order = 5,
|
order = 5,
|
||||||
type = "execute",
|
type = "execute",
|
||||||
name = L["Configure Auras"],
|
name = L["Configure Auras"],
|
||||||
func = function() E:SetToFilterConfig("Buff Indicator") end
|
func = function() E:SetToFilterConfig("Buff Indicator") end
|
||||||
}
|
}--]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
E.Options.args.unitframe.args.tank = {
|
|
||||||
order = 1500,
|
|
||||||
type = "group",
|
|
||||||
name = L["Tank Frames"],
|
|
||||||
childGroups = "tab",
|
|
||||||
get = function(info) return E.db.unitframe.units.tank[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.tank[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("tank") end,
|
|
||||||
disabled = function() return not E.UnitFrames end,
|
|
||||||
args = {
|
|
||||||
resetSettings = {
|
|
||||||
order = 1,
|
|
||||||
type = "execute",
|
|
||||||
name = L["Restore Defaults"],
|
|
||||||
func = function(info) E:StaticPopup_Show("RESET_UF_UNIT", L["Tank Frames"], nil, {unit="tank"}) end
|
|
||||||
},
|
|
||||||
generalGroup = {
|
|
||||||
order = 2,
|
|
||||||
type = "group",
|
|
||||||
name = L["General"],
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["General"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
width = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Width"],
|
|
||||||
min = 50, max = 1000, step = 1
|
|
||||||
},
|
|
||||||
height = {
|
|
||||||
order = 4,
|
|
||||||
type = "range",
|
|
||||||
name = L["Height"],
|
|
||||||
min = 10, max = 500, step = 1
|
|
||||||
},
|
|
||||||
disableDebuffHighlight = {
|
|
||||||
order = 5,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Disable Debuff Highlight"],
|
|
||||||
desc = L["Forces Debuff Highlight to be disabled for these frames"],
|
|
||||||
disabled = function() return E.db.unitframe.debuffHighlighting == "NONE" end
|
|
||||||
},
|
|
||||||
orientation = {
|
|
||||||
order = 6,
|
|
||||||
type = "select",
|
|
||||||
name = L["Frame Orientation"],
|
|
||||||
desc = L["Set the orientation of the UnitFrame."],
|
|
||||||
values = orientationValues
|
|
||||||
},
|
|
||||||
colorOverride = {
|
|
||||||
order = 8,
|
|
||||||
type = "select",
|
|
||||||
name = L["Class Color Override"],
|
|
||||||
desc = L["Override the default class color setting."],
|
|
||||||
values = colorOverrideValues
|
|
||||||
},
|
|
||||||
disableMouseoverGlow = {
|
|
||||||
order = 9,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Block Mouseover Glow"],
|
|
||||||
desc = L["Forces Mouseover Glow to be disabled for these frames"]
|
|
||||||
},
|
|
||||||
disableTargetGlow = {
|
|
||||||
order = 10,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Block Target Glow"],
|
|
||||||
desc = L["Forces Target Glow to be disabled for these frames"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
targetsGroup = {
|
|
||||||
order = 3,
|
|
||||||
type = "group",
|
|
||||||
name = L["Tank Target"],
|
|
||||||
get = function(info) return E.db.unitframe.units.tank.targetsGroup[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.tank.targetsGroup[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("tank") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["Tank Target"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
width = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Width"],
|
|
||||||
min = 10, max = 500, step = 1
|
|
||||||
},
|
|
||||||
height = {
|
|
||||||
order = 4,
|
|
||||||
type = "range",
|
|
||||||
name = L["Height"],
|
|
||||||
min = 10, max = 500, step = 1
|
|
||||||
},
|
|
||||||
anchorPoint = {
|
|
||||||
order = 5,
|
|
||||||
type = "select",
|
|
||||||
name = L["Anchor Point"],
|
|
||||||
desc = L["What point to anchor to the frame you set to attach to."],
|
|
||||||
values = petAnchors
|
|
||||||
},
|
|
||||||
xOffset = {
|
|
||||||
order = 6,
|
|
||||||
type = "range",
|
|
||||||
name = L["xOffset"],
|
|
||||||
desc = L["An X offset (in pixels) to be used when anchoring new frames."],
|
|
||||||
min = -500, max = 500, step = 1
|
|
||||||
},
|
|
||||||
yOffset = {
|
|
||||||
order = 7,
|
|
||||||
type = "range",
|
|
||||||
name = L["yOffset"],
|
|
||||||
desc = L["An Y offset (in pixels) to be used when anchoring new frames."],
|
|
||||||
min = -500, max = 500, step = 1
|
|
||||||
},
|
|
||||||
colorOverride = {
|
|
||||||
order = 8,
|
|
||||||
type = "select",
|
|
||||||
name = L["Class Color Override"],
|
|
||||||
desc = L["Override the default class color setting."],
|
|
||||||
values = colorOverrideValues
|
|
||||||
},
|
|
||||||
name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, "tank")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, "tank"),
|
|
||||||
buffs = GetOptionsTable_Auras(true, "buffs", true, UF.CreateAndUpdateHeaderGroup, "tank"),
|
|
||||||
debuffs = GetOptionsTable_Auras(true, "debuffs", true, UF.CreateAndUpdateHeaderGroup, "tank"),
|
|
||||||
rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, "tank"),
|
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "tank"),
|
|
||||||
buffIndicator = {
|
|
||||||
order = 800,
|
|
||||||
type = "group",
|
|
||||||
name = L["Buff Indicator"],
|
|
||||||
get = function(info) return E.db.unitframe.units.tank.buffIndicator[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.tank.buffIndicator[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("tank") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["Buff Indicator"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Size"],
|
|
||||||
desc = L["Size of the indicator icon."],
|
|
||||||
min = 4, max = 50, step = 1
|
|
||||||
},
|
|
||||||
fontSize = {
|
|
||||||
order = 4,
|
|
||||||
type = "range",
|
|
||||||
name = FONT_SIZE,
|
|
||||||
min = 7, max = 22, step = 1
|
|
||||||
},
|
|
||||||
profileSpecific = {
|
|
||||||
order = 5,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Profile Specific"],
|
|
||||||
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
|
||||||
},
|
|
||||||
configureButton = {
|
|
||||||
order = 6,
|
|
||||||
type = "execute",
|
|
||||||
name = L["Configure Auras"],
|
|
||||||
func = function()
|
|
||||||
if E.db.unitframe.units.tank.buffIndicator.profileSpecific then
|
|
||||||
E:SetToFilterConfig("Buff Indicator (Profile)")
|
|
||||||
else
|
|
||||||
E:SetToFilterConfig("Buff Indicator")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
E.Options.args.unitframe.args.tank.args.name.args.attachTextTo.values = {["Health"] = HEALTH, ["Frame"] = L["Frame"]}
|
|
||||||
E.Options.args.unitframe.args.tank.args.targetsGroup.args.name.args.attachTextTo.values = {["Health"] = HEALTH, ["Frame"] = L["Frame"]}
|
|
||||||
E.Options.args.unitframe.args.tank.args.targetsGroup.args.name.get = function(info) return E.db.unitframe.units.tank.targetsGroup.name[ info[getn(info)] ] end
|
|
||||||
E.Options.args.unitframe.args.tank.args.targetsGroup.args.name.set = function(info, value) E.db.unitframe.units.tank.targetsGroup.name[ info[getn(info)] ] = value UF.CreateAndUpdateHeaderGroup(UF, "tank") end
|
|
||||||
|
|
||||||
E.Options.args.unitframe.args.assist = {
|
|
||||||
order = 1600,
|
|
||||||
type = "group",
|
|
||||||
name = L["Assist Frames"],
|
|
||||||
childGroups = "tab",
|
|
||||||
get = function(info) return E.db.unitframe.units.assist[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.assist[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("assist") end,
|
|
||||||
disabled = function() return not E.UnitFrames end,
|
|
||||||
args = {
|
|
||||||
resetSettings = {
|
|
||||||
order = 1,
|
|
||||||
type = "execute",
|
|
||||||
name = L["Restore Defaults"],
|
|
||||||
func = function(info) E:StaticPopup_Show("RESET_UF_UNIT", L["Assist Frames"], nil, {unit="assist"}) end
|
|
||||||
},
|
|
||||||
generalGroup = {
|
|
||||||
order = 2,
|
|
||||||
type = "group",
|
|
||||||
name = L["General"],
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["General"],
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
width = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Width"],
|
|
||||||
min = 50, max = 1000, step = 1
|
|
||||||
},
|
|
||||||
height = {
|
|
||||||
order = 4,
|
|
||||||
type = "range",
|
|
||||||
name = L["Height"],
|
|
||||||
min = 10, max = 500, step = 1
|
|
||||||
},
|
|
||||||
disableDebuffHighlight = {
|
|
||||||
order = 5,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Disable Debuff Highlight"],
|
|
||||||
desc = L["Forces Debuff Highlight to be disabled for these frames"],
|
|
||||||
disabled = function() return E.db.unitframe.debuffHighlighting == "NONE" end
|
|
||||||
},
|
|
||||||
orientation = {
|
|
||||||
order = 6,
|
|
||||||
type = "select",
|
|
||||||
name = L["Frame Orientation"],
|
|
||||||
desc = L["Set the orientation of the UnitFrame."],
|
|
||||||
values = orientationValues
|
|
||||||
},
|
|
||||||
colorOverride = {
|
|
||||||
order = 8,
|
|
||||||
type = "select",
|
|
||||||
name = L["Class Color Override"],
|
|
||||||
desc = L["Override the default class color setting."],
|
|
||||||
values = colorOverrideValues
|
|
||||||
},
|
|
||||||
disableMouseoverGlow = {
|
|
||||||
order = 9,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Block Mouseover Glow"],
|
|
||||||
desc = L["Forces Mouseover Glow to be disabled for these frames"]
|
|
||||||
},
|
|
||||||
disableTargetGlow = {
|
|
||||||
order = 10,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Block Target Glow"],
|
|
||||||
desc = L["Forces Target Glow to be disabled for these frames"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
targetsGroup = {
|
|
||||||
order = 3,
|
|
||||||
type = "group",
|
|
||||||
name = L["Assist Target"],
|
|
||||||
get = function(info) return E.db.unitframe.units.assist.targetsGroup[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.assist.targetsGroup[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("assist") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["Assist Target"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
width = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Width"],
|
|
||||||
min = 10, max = 500, step = 1
|
|
||||||
},
|
|
||||||
height = {
|
|
||||||
order = 4,
|
|
||||||
type = "range",
|
|
||||||
name = L["Height"],
|
|
||||||
min = 10, max = 500, step = 1
|
|
||||||
},
|
|
||||||
anchorPoint = {
|
|
||||||
order = 5,
|
|
||||||
type = "select",
|
|
||||||
name = L["Anchor Point"],
|
|
||||||
desc = L["What point to anchor to the frame you set to attach to."],
|
|
||||||
values = petAnchors
|
|
||||||
},
|
|
||||||
xOffset = {
|
|
||||||
order = 6,
|
|
||||||
type = "range",
|
|
||||||
name = L["xOffset"],
|
|
||||||
desc = L["An X offset (in pixels) to be used when anchoring new frames."],
|
|
||||||
min = -500, max = 500, step = 1
|
|
||||||
},
|
|
||||||
yOffset = {
|
|
||||||
order = 7,
|
|
||||||
type = "range",
|
|
||||||
name = L["yOffset"],
|
|
||||||
desc = L["An Y offset (in pixels) to be used when anchoring new frames."],
|
|
||||||
min = -500, max = 500, step = 1
|
|
||||||
},
|
|
||||||
colorOverride = {
|
|
||||||
order = 8,
|
|
||||||
type = "select",
|
|
||||||
name = L["Class Color Override"],
|
|
||||||
desc = L["Override the default class color setting."],
|
|
||||||
values = colorOverrideValues
|
|
||||||
},
|
|
||||||
name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, "assist")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
name = GetOptionsTable_Name(UF.CreateAndUpdateHeaderGroup, "assist"),
|
|
||||||
buffs = GetOptionsTable_Auras(true, "buffs", true, UF.CreateAndUpdateHeaderGroup, "assist"),
|
|
||||||
debuffs = GetOptionsTable_Auras(true, "debuffs", true, UF.CreateAndUpdateHeaderGroup, "assist"),
|
|
||||||
rdebuffs = GetOptionsTable_RaidDebuff(UF.CreateAndUpdateHeaderGroup, "assist"),
|
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateHeaderGroup, "assist"),
|
|
||||||
buffIndicator = {
|
|
||||||
order = 800,
|
|
||||||
type = "group",
|
|
||||||
name = L["Buff Indicator"],
|
|
||||||
get = function(info) return E.db.unitframe.units.assist.buffIndicator[ info[getn(info)] ] end,
|
|
||||||
set = function(info, value) E.db.unitframe.units.assist.buffIndicator[ info[getn(info)] ] = value UF:CreateAndUpdateHeaderGroup("assist") end,
|
|
||||||
args = {
|
|
||||||
header = {
|
|
||||||
order = 1,
|
|
||||||
type = "header",
|
|
||||||
name = L["Buff Indicator"]
|
|
||||||
},
|
|
||||||
enable = {
|
|
||||||
order = 2,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Enable"]
|
|
||||||
},
|
|
||||||
size = {
|
|
||||||
order = 3,
|
|
||||||
type = "range",
|
|
||||||
name = L["Size"],
|
|
||||||
desc = L["Size of the indicator icon."],
|
|
||||||
min = 4, max = 50, step = 1
|
|
||||||
},
|
|
||||||
fontSize = {
|
|
||||||
order = 4,
|
|
||||||
type = "range",
|
|
||||||
name = FONT_SIZE,
|
|
||||||
min = 7, max = 22, step = 1
|
|
||||||
},
|
|
||||||
profileSpecific = {
|
|
||||||
order = 5,
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Profile Specific"],
|
|
||||||
desc = L["Use the profile specific filter 'Buff Indicator (Profile)' instead of the global filter 'Buff Indicator'."]
|
|
||||||
},
|
|
||||||
configureButton = {
|
|
||||||
order = 6,
|
|
||||||
type = "execute",
|
|
||||||
name = L["Configure Auras"],
|
|
||||||
func = function()
|
|
||||||
if E.db.unitframe.units.assist.buffIndicator.profileSpecific then
|
|
||||||
E:SetToFilterConfig("Buff Indicator (Profile)")
|
|
||||||
else
|
|
||||||
E:SetToFilterConfig("Buff Indicator")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
E.Options.args.unitframe.args.assist.args.name.args.attachTextTo.values = {["Health"] = HEALTH, ["Frame"] = L["Frame"]}
|
|
||||||
E.Options.args.unitframe.args.assist.args.targetsGroup.args.name.args.attachTextTo.values = {["Health"] = HEALTH, ["Frame"] = L["Frame"]}
|
|
||||||
E.Options.args.unitframe.args.assist.args.targetsGroup.args.name.get = function(info) return E.db.unitframe.units.assist.targetsGroup.name[ info[getn(info)] ] end
|
|
||||||
E.Options.args.unitframe.args.assist.args.targetsGroup.args.name.set = function(info, value) E.db.unitframe.units.assist.targetsGroup.name[ info[getn(info)] ] = value UF.CreateAndUpdateHeaderGroup(UF, "assist") end
|
|
||||||
|
|
||||||
--MORE COLORING STUFF YAY
|
--MORE COLORING STUFF YAY
|
||||||
E.Options.args.unitframe.args.generalOptionsGroup.args.allColorsGroup.args.classResourceGroup = {
|
E.Options.args.unitframe.args.generalOptionsGroup.args.allColorsGroup.args.classResourceGroup = {
|
||||||
order = -10,
|
order = -10,
|
||||||
|
|||||||
Reference in New Issue
Block a user