diff --git a/Aura.lua b/Aura.lua index 01b0324..d521df6 100644 --- a/Aura.lua +++ b/Aura.lua @@ -1,323 +1,471 @@ -local Srendarr = _G['Srendarr'] -local LMP = LibStub('LibMediaProvider-1.0') -local L = Srendarr:GetLocale() +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = Srendarr:GetLocale() +local LMP = LibStub('LibMediaProvider-1.0') +local Aura = {} -local Aura = {} +-- CONSTS -- +local DEBUG_ABILITYID = Srendarr.DEBUG_ABILITYID --- CONSTANTS -- -local ICON_SIZE = Srendarr.ICON_SIZE -local BAR_HEIGHT = Srendarr.BAR_HEIGHT -local AURA_FADE_TIME = Srendarr.AURA_FADE_TIME +local AURA_TYPE_TIMED = Srendarr.AURA_TYPE_TIMED +local AURA_TYPE_TOGGLED = Srendarr.AURA_TYPE_TOGGLED +local AURA_TYPE_PASSIVE = Srendarr.AURA_TYPE_PASSIVE + +local AURA_HEIGHT = Srendarr.AURA_HEIGHT + +local AURA_STYLE_FULL = Srendarr.AURA_STYLE_FULL +local AURA_STYLE_ICON = Srendarr.AURA_STYLE_ICON +local AURA_STYLE_MINI = Srendarr.AURA_STYLE_MINI + +local AURA_TIMERLOC_HIDDEN = Srendarr.AURA_TIMERLOC_HIDDEN +local AURA_TIMERLOC_OVER = Srendarr.AURA_TIMERLOC_OVER +local AURA_TIMERLOC_ABOVE = Srendarr.AURA_TIMERLOC_ABOVE +local AURA_TIMERLOC_BELOW = Srendarr.AURA_TIMERLOC_BELOW -- UPVALUES -- -local WM = WINDOW_MANAGER -local GetGameTimeMilliseconds = GetGameTimeMilliseconds -local strformat = string.format -local math_floor = math.floor -local tremove = table.remove -local tinsert = table.insert -local zo_strformat = zo_strformat - -local tSec = L.Time_Seconds -local tMin = L.Time_Minutes -local tHour = L.Time_Hours -local tToggle = L.Time_Toggle -local tPassive = L.Time_Passive -local tCast = L.Time_Cast -local currentTime, colours, remFrame, remName - -local function AddControl(parent, cType, level) - local c = WM:CreateControl(nil, parent, cType) - c:SetDrawLayer(DL_CONTROLS) - c:SetDrawLevel(level) - return c, c +local WM = WINDOW_MANAGER +local TEXT_ALIGN_TOP = TEXT_ALIGN_TOP +local TEXT_ALIGN_BOTTOM = TEXT_ALIGN_BOTTOM +local TEXT_ALIGN_CENTER = TEXT_ALIGN_CENTER +local TEXT_ALIGN_LEFT = TEXT_ALIGN_LEFT +local TEXT_ALIGN_RIGHT = TEXT_ALIGN_LEFT +local GetGameTimeMillis = GetGameTimeMilliseconds +local strformat = string.format +local math_floor = math.floor +local tremove = table.remove +local tinsert = table.insert +local zo_strformat = zo_strformat +local AddControl = Srendarr.AddControl + +local tTenths = L.Time_Tenths +local tSec = L.Time_Seconds +local tMin = L.Time_Minutes +local tHour = L.Time_Hours +local tDay = L.Time_Days +local tToggle = L.Time_Toggle +local tPassive = L.Time_Passive + +local auraLookup = Srendarr.auraLookup +local auraID = 1 -- incremental counter to give each aura object a unique identifier +local activeTimedAuras = {} -- all active auras with timers, referenced by their auraID +local currentTime, colours + + +-- ------------------------ +-- TIME FORMAT FUNCTION +-- ------------------------ +local function FormatTime(remaining) + if (remaining < 2) then -- 10ths of seconds + return strformat(tTenths, remaining) + elseif (remaining < 60) then -- seconds + return strformat(tSec, remaining) + elseif (remaining < 3600) then -- minutes + return strformat(tMin, math_floor(remaining / 60)) + elseif (remaining > 172800) then -- days (2+, revert to hours when between 24-48hrs) + return strformat(tDay, math_floor(remaining / 86400)) + else -- hours + return strformat(tHour, math_floor(remaining / 3600)) + end end -local function BuildAura(frame) - local aura, ctrl - - aura, ctrl = AddControl(frame, CT_TEXTURE, 2) - ctrl:SetDimensions(ICON_SIZE, ICON_SIZE) - ctrl:SetTexture([[/esoui/art/actionbar/abilityframe64_up.dds]]) - -- ICON - aura.icon, ctrl = AddControl(aura, CT_TEXTURE, 1) - ctrl:SetDimensions(ICON_SIZE, ICON_SIZE) - ctrl:SetAnchor(CENTER) - -- LABELS - aura.name, ctrl = AddControl(aura, CT_LABEL, 3) - ctrl:SetVerticalAlignment(1) - aura.timer, ctrl = AddControl(aura, CT_LABEL, 3) - ctrl:SetVerticalAlignment(1) - ctrl:SetHorizontalAlignment(1) - -- BAR - aura.bar, ctrl = AddControl(aura, CT_STATUSBAR, 2) - ctrl:SetHeight(BAR_HEIGHT) - ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_genericfill.dds]]) - ctrl:SetTextureCoords(0, 1, 0, 0.625) - ctrl:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge.dds]], 8, 32) - ctrl:SetLeadingEdgeTextureCoords(0, 1, 0, 0.625) - ctrl:EnableLeadingEdge(true) - ctrl:SetMinMax(0, 1) - ctrl:SetHandler('OnValueChanged', function(bar, value) bar.gloss:SetValue(value) end) -- change gloss value as main bar changes - -- BAR GLOSS - aura.bar.gloss, ctrl = AddControl(aura.bar, CT_STATUSBAR, 3) - ctrl:SetHeight(BAR_HEIGHT) - ctrl:SetAnchor(TOPLEFT) - ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_genericfill_gloss.dds]]) - ctrl:SetTextureCoords(0, 1, 0, 0.625) - ctrl:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge_gloss.dds]], 8, 32) - ctrl:SetLeadingEdgeTextureCoords(0, 1, 0, 0.625) - ctrl:EnableLeadingEdge(true) - ctrl:SetMinMax(0, 1) - -- BAR FRAME - aura.barBorderL, ctrl = AddControl(aura.bar, CT_TEXTURE, 4) - ctrl:SetDimensions(10, BAR_HEIGHT) - ctrl:SetAnchor(TOPLEFT) - ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_frame.dds]]) - aura.barBorderR, ctrl = AddControl(aura.bar, CT_TEXTURE, 4) - ctrl:SetDimensions(10, BAR_HEIGHT) - ctrl:SetAnchor(TOPRIGHT) - ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_frame.dds]]) - aura.barBorderM, ctrl = AddControl(aura.bar, CT_TEXTURE, 4) - ctrl:SetHeight(BAR_HEIGHT) - ctrl:SetAnchor(TOPLEFT, aura.bar, TOPLEFT, 10, 0) - ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_frame.dds]]) - ctrl:SetTextureCoords(0.019500000402331, 0.58980000019073, 0, 0.625) - -- BAR BACKDROP - aura.barBackdropEnd, ctrl = AddControl(aura.bar, CT_TEXTURE, 1) - ctrl:SetDimensions(10, BAR_HEIGHT) - ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge.dds]]) - ctrl:SetColor(0,0,0,0.4) - aura.barBackdrop, ctrl = AddControl(aura.bar, CT_TEXTURE, 1) - ctrl:SetHeight(BAR_HEIGHT) - ctrl:SetTexture('') - ctrl:SetColor(0,0,0,0.4) - - aura.k_frame = frame - - aura['Configure'] = Aura.Configure - aura['Ghost'] = Aura.Ghost - aura['Release'] = Aura.Release - - aura:Configure() - - return aura + +-- ------------------------ +-- TIMER UPDATE HANDLER +do ------------------------ + local RATE = Srendarr.AURA_UPDATE_RATE + + local strformat = string.format + local math_max = math.max + local GetFormattedTime = FormatTime + + local timedAuras = activeTimedAuras + local auraFadeTime = -2 -- need a base value before being set by config + local nextUpdate = 0 + local timeRemaining + + local function OnUpdate(self, updateTime) + if (updateTime >= nextUpdate) then + for _, aura in pairs(timedAuras) do + timeRemaining = aura.finish - updateTime + + if (timeRemaining <= auraFadeTime) then -- expired and finished fading, done + aura:Release() + elseif (timeRemaining <= 0) then -- expired, but not done fading yet + if (not aura.isFading) then + aura:SetExpired() -- set expired if we should be but aren't yet + end + + aura:SetAlpha(math_max(0, 1 - (timeRemaining / auraFadeTime))) + else -- normal countdown + aura.bar:SetValue(1 - ((updateTime - aura.start) / (aura.finish - aura.start))) + aura.timer:SetText(GetFormattedTime(timeRemaining)) + end + end + + nextUpdate = updateTime + RATE + end + end + + Srendarr:SetHandler('OnUpdate', OnUpdate) + + function Srendarr:ConfigureAuraFadeTime() + auraFadeTime = self.db.auraFadeTime * -1 + end end -local function FormatTime(remaining) - if (remaining < 60) then -- seconds - return strformat(tSec, remaining) - elseif (remaining < 3600) then -- minutes - return strformat(tMin, math_floor(remaining / 60)) - else -- hours - return strformat(tHour, math_floor(remaining / 3600)) - end + +-- ------------------------ +-- AURA +-- ------------------------ +function Aura:Create(displayParent) + local aura, ctrl + + aura, ctrl = AddControl(displayParent, CT_TEXTURE, 2) + ctrl:SetDimensions(AURA_HEIGHT, AURA_HEIGHT) + -- ICON + aura.icon, ctrl = AddControl(aura, CT_TEXTURE, 1) + ctrl:SetDimensions(AURA_HEIGHT - 4, AURA_HEIGHT - 4) + ctrl:SetAnchor(CENTER) + -- ICON BACKGROUND + aura.iconBG, ctrl = AddControl(aura.icon, CT_TEXTURE, 0) + ctrl:SetDimensions(AURA_HEIGHT - 4, AURA_HEIGHT - 4) + ctrl:SetAnchor(CENTER) + ctrl:SetTexture([[/esoui/art/actionbar/abilityinset.dds]]) + -- TOGGLED HIGHLIGHT + aura.highlight, ctrl = AddControl(aura, CT_TEXTURE, 3) + ctrl:SetDimensions(AURA_HEIGHT -2, AURA_HEIGHT -2) + ctrl:SetAnchor(CENTER) + ctrl:SetTexture([[/esoui/art/actionbar/actionslot_toggledon.dds]]) + ctrl:SetHidden(true) + -- LABELS + aura.name, ctrl = AddControl(aura, CT_LABEL, 4) + ctrl:SetVerticalAlignment(TEXT_ALIGN_BOTTOM) + ctrl:SetInheritScale(false) + aura.timer, ctrl = AddControl(aura, CT_LABEL, 4) + ctrl:SetHorizontalAlignment(TEXT_ALIGN_CENTER) + ctrl:SetInheritScale(false) + -- BAR + aura.bar, ctrl = AddControl(aura, CT_STATUSBAR, 2) + ctrl:SetHeight(16) + ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_genericfill.dds]]) + ctrl:SetTextureCoords(0, 1, 0, 0.625) + ctrl:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge.dds]], 8, 32) + ctrl:SetLeadingEdgeTextureCoords(0, 1, 0, 0.625) + ctrl:EnableLeadingEdge(true) + ctrl:SetMinMax(0, 1) + ctrl:SetHandler('OnValueChanged', function(bar, value) bar.gloss:SetValue(value) end) -- change gloss value as main bar changes + -- BAR GLOSS + aura.bar.gloss, ctrl = AddControl(aura.bar, CT_STATUSBAR, 3) + ctrl:SetHeight(16) + ctrl:SetAnchor(TOPLEFT) + ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_genericfill_gloss.dds]]) + ctrl:SetTextureCoords(0, 1, 0, 0.625) + ctrl:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge_gloss.dds]], 8, 32) + ctrl:SetLeadingEdgeTextureCoords(0, 1, 0, 0.625) + ctrl:EnableLeadingEdge(true) + ctrl:SetMinMax(0, 1) + -- BAR FRAME + aura.barBorderL, ctrl = AddControl(aura.bar, CT_TEXTURE, 4) + ctrl:SetDimensions(10, 16) + ctrl:SetAnchor(TOPLEFT) + ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_frame.dds]]) + aura.barBorderR, ctrl = AddControl(aura.bar, CT_TEXTURE, 4) + ctrl:SetDimensions(10, 16) + ctrl:SetAnchor(TOPRIGHT) + ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_frame.dds]]) + aura.barBorderM, ctrl = AddControl(aura.bar, CT_TEXTURE, 4) + ctrl:SetHeight(16) + ctrl:SetAnchor(TOPLEFT, aura.bar, TOPLEFT, 10, 0) + ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_frame.dds]]) + ctrl:SetTextureCoords(0.019500000402331, 0.58980000019073, 0, 0.625) + -- BAR BACKDROP + aura.barBackdropEnd, ctrl = AddControl(aura.bar, CT_TEXTURE, 1) + ctrl:SetDimensions(10, 16) + ctrl:SetTexture([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge.dds]]) + ctrl:SetColor(0,0,0,0.4) + aura.barBackdrop, ctrl = AddControl(aura.bar, CT_TEXTURE, 1) + ctrl:SetHeight(16) + ctrl:SetTexture('') + ctrl:SetColor(0,0,0,0.4) + + aura.displayParent = displayParent + aura.auraID = auraID + auraID = auraID + 1 + + aura.highlightToggled = false -- will both be set by the Configure function + aura.barColours = {} + + -- aura exec + aura['Initialize'] = Aura.Initialize + aura['Update'] = Aura.Update + aura['SetExpired'] = Aura.SetExpired + aura['Release'] = Aura.Release + -- configuration + aura['Configure'] = Aura.Configure + aura['UpdateVisuals'] = Aura.UpdateVisuals + + return aura end -local function OnMouseEnter(control) - local abilityIndex - if control.abilityId then - local abilityId = control.abilityId - for index = 1, GetNumAbilities() do - if GetAbilityIdByIndex(index) == abilityId then - abilityIndex = index - break - end - end - if abilityIndex then - InitializeTooltip(InformationTooltip, control, BOTTOMLEFT, 0, -2, TOPLEFT) - InformationTooltip:SetAbility(abilityIndex) - end - end - if not abilityIndex then - if control.buffId then - local unitTag = control:GetParent().k_id == 4 and 'reticleover' or 'player' - InitializeTooltip(InformationTooltip, control, BOTTOMLEFT, 0, -2, TOPLEFT) - InformationTooltip:SetBuff(control.buffId, unitTag) - elseif control.tooltipText then - InitializeTooltip(InformationTooltip, control, BOTTOMLEFT, 0, -2, TOPLEFT) - SetTooltipText(InformationTooltip, control.tooltipText) - end - end + +-- ------------------------ +-- AURA EXECUTION +-- ------------------------ +function Aura:Initialize(auraGroup, auraType, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + self.auraGroup = auraGroup + self.auraType = auraType + self.auraName = auraName + self.unitTag = unitTag or 'notag' -- ensure something is set here + self.start = start + self.finish = finish + self.effectType = effectType + self.abilityType = abilityType + self.abilityID = abilityID + self.isFading = false -- make sure to note aura is enabled again + + auraLookup[unitTag][abilityID] = self -- add self to the aura lookup reference + + if (DEBUG_ABILITYID) then + if (self.auraStyle == AURA_STYLE_ICON) then + self.name:SetText(abilityID) + else + self.name:SetText(zo_strformat(SI_ABILITY_TOOLTIP_NAME, auraName) .. ' [' .. abilityID .. ']') + end + else + self.name:SetText(zo_strformat(SI_ABILITY_TOOLTIP_NAME, auraName)) + end + + self.icon:SetTexture(icon) + self.icon:SetDesaturation(0) + self.highlight:SetHidden(true) + self:SetAlpha(1) + + if (auraType == AURA_TYPE_TIMED) then + currentTime = GetGameTimeMillis() / 1000 + + self.timer:SetText(FormatTime(finish - currentTime)) + self.bar:SetValue(1 - ((currentTime - start) / (finish - start))) + + activeTimedAuras[self.auraID] = self -- is a timed aura, add to timer tracking table (used in OnUpdate) + elseif (auraType == AURA_TYPE_TOGGLED) then + self.timer:SetText('') + self.bar:SetValue(0.99) + self.highlight:SetHidden(not self.highlightToggled) + else -- AURA_TYPE_PASSIVE + self.timer:SetText('') + self.bar:SetValue(0.99) + end + + colours = self.barColours[auraType] + self.bar:SetGradientColors(colours.r1, colours.g1, colours.b1, 1, colours.r2, colours.g2, colours.b2, 1) + + self:SetHidden(false) end -local function OnMouseExit(control) - ClearTooltip(InformationTooltip) +function Aura:Update(start, finish) + if (self.start == start and self.finish == finish) then return end -- if they are the same nothing changed (repeat event firings probably), do nothing + + currentTime = GetGameTimeMillis() / 1000 + self.start = start + self.finish = finish + + self.timer:SetText(FormatTime(finish - currentTime)) + self.bar:SetValue(1 - ((currentTime - start) / (finish - start))) + + if (self.isFading) then -- aura (most likely) had expired in game but was still active internally due to fadeout + self.isFading = false + self:SetAlpha(1) + self.icon:SetDesaturation(0) + end + + self.displayParent:UpdateDisplay() -- time has changed, update parent display as ordering may have been altered end -function Aura:New(frame, aType, tType, name, icon, start, finish, isShield, abilityType, buffId, abilityId) - local aura = tremove(frame.k_auraPool, 1) -- grab from inactive pool - - if (not aura) then -- no inactive Aura, create one - aura = BuildAura(frame) - end - - -- initialize for display - aura.k_name = name - aura.k_type = aType - aura.k_timerType = tType - aura.k_isGhost = false - aura.k_start = start - aura.k_finish = finish - aura.k_isShield = isShield - aura.k_abilityType = abilityType - -- tooltip text if showing - aura.tooltipText = zo_strformat(SI_ABILITY_TOOLTIP_NAME, name) - aura.buffId = buffId - aura.abilityId = abilityId - - aura.name:SetText(aura.tooltipText) - aura.icon:SetTexture(icon) - - if (aType < 3) then -- timed (short) or timed (long) - currentTime = GetGameTimeMilliseconds() / 1000 - if (start >= finish) then return end -- abort if 0 (or less) duration - - if (start > currentTime) then -- casting (starts later) - aura.timer:SetText(tCast) - aura.bar:SetValue(0.99) - else - aura.timer:SetText(FormatTime(finish - currentTime)) - aura.bar:SetValue(1 - ((currentTime - start) / (finish - start))) - end - - colours = frame.k_db.barColours.timed - elseif (aType == 3) then -- toggle - aura.timer:SetText((frame.k_db.timerShowTP) and tToggle or '') - aura.bar:SetValue(0.99) - colours = frame.k_db.barColours.toggle - else -- passive - aura.timer:SetText((frame.k_db.timerShowTP) and tPassive or '') - aura.bar:SetValue(0.99) - colours = frame.k_db.barColours.passive - end - - aura.bar:SetGradientColors(colours.r1, colours.g1, colours.b1, 1, colours.r2, colours.g2, colours.b2, 1) - aura:SetHidden(false) - - frame.k_auraActive[name] = aura - - return aura +function Aura:SetExpired() + if (not self.isFading) then -- if not already expired and fading, start + self.finish = GetGameTimeMillis() / 1000 -- times up, make sure our internal finish time agrees + self.icon:SetDesaturation(1) + + self.isFading = true -- note that its time to start fading + end end -function Aura:Ghost() - if (self.k_isGhost) then return end -- already ghosting +function Aura:Release(flagBurst) + self:SetHidden(true) + + activeTimedAuras[self.auraID] = nil -- whether timed aura or not, this removes self from tracking table - self.k_isGhost = true - self.k_finish = (GetGameTimeMilliseconds() / 1000) - self.icon:SetDesaturation(1) + auraLookup[self.unitTag][self.abilityID] = nil -- remove self from the aura lookup reference + + self.displayParent:OnAuraReleased(flagBurst, self) end -function Aura:Release() - self:SetHidden(true) - -- return to default appearance - self:SetAlpha(1) - self.icon:SetDesaturation(0) - self.k_isGhost = false - -- remove from auralists and add to inactive pool - remFrame, remName = self.k_frame, self.k_name - remFrame.k_auraActive[remName] = nil - tinsert(remFrame.k_auraPool, self) + +-- ------------------------ +-- CONFIGURATION +-- ------------------------ +function Aura:Configure(settings) + self.auraStyle = settings.style -- internal ref for currently active style + + -- configure local references for things that can change from ability to ability on the same aura object + self.highlightToggled = settings.highlightToggled + self.barColours[AURA_TYPE_TIMED] = settings.barColours[AURA_TYPE_TIMED] + self.barColours[AURA_TYPE_TOGGLED] = settings.barColours[AURA_TYPE_TOGGLED] + self.barColours[AURA_TYPE_PASSIVE] = settings.barColours[AURA_TYPE_PASSIVE] + + self.name:SetFont(strformat('%s|%d|%s', LMP:Fetch('font', settings.nameFont), settings.nameSize, settings.nameStyle)) + self.name:SetColor(settings.nameColour[1], settings.nameColour[2], settings.nameColour[3], settings.nameColour[4]) + + self.timer:SetFont(strformat('%s|%d|%s', LMP:Fetch('font', settings.timerFont), settings.timerSize, settings.timerStyle)) + self.timer:SetColor(settings.timerColour[1], settings.timerColour[2], settings.timerColour[3], settings.timerColour[4]) + self.timer:SetVerticalAlignment(TEXT_ALIGN_BOTTOM) + + if (settings.style == AURA_STYLE_FULL) then -- full style, must be growing up or down + -- configure icon + self:SetTexture([[/esoui/art/actionbar/abilityframe64_up.dds]]) + self.icon:SetHidden(false) + self.highlight:SetAlpha(1) -- allow toggle highlight to be seen again if set (is a hack, but it works without a lot of checking) + -- configure timer + self.timer:ClearAnchors() + self.timer:SetAnchor(BOTTOM, self, BOTTOM, 0, -1) -- in full style, the timer is either over or hidden + self.timer:SetHidden(settings.timerLocation == AURA_TIMERLOC_HIDDEN) + + -- configure bar display + self.bar:SetDimensions(settings.barWidth, 16) + self.bar:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge.dds]], 8, 32) + self.bar.gloss:SetDimensions(settings.barWidth, 16) + self.bar.gloss:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge_gloss.dds]], 8, 32) + self.bar.gloss:SetHidden(not settings.barGloss) + self.barBorderL:SetHeight(16) + self.barBorderR:SetHeight(16) + self.barBorderM:SetDimensions(settings.barWidth - 20, 16) + self.barBackdrop:ClearAnchors() + self.barBackdrop:SetDimensions(settings.barWidth - 10, 16) + self.barBackdropEnd:ClearAnchors() + self.barBackdropEnd:SetHeight(16) + + self.name:ClearAnchors() + self.name:SetHidden(false) + self.bar:ClearAnchors() + self.bar:SetHidden(false) + + if (settings.barReverse) then + self.barBackdrop:SetAnchor(TOPRIGHT, self.bar, TOPRIGHT, 0, 0) + self.barBackdropEnd:SetAnchor(TOPLEFT, self.bar, TOPLEFT, 0, 0) + self.bar:SetBarAlignment(BAR_ALIGNMENT_REVERSE) + self.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_REVERSE) + self.barBorderL:SetTextureCoords(0.6133000254631, 0.59380000829697, 0, 0.625) + self.barBorderR:SetTextureCoords(0.019500000402331, 0, 0, 0.625) + self.barBackdropEnd:SetTextureCoords(1, 0, 0, 0.625) + + self.name:SetAnchor(BOTTOMRIGHT, self.bar, TOPRIGHT, -2, -1) + self.name:SetHorizontalAlignment(TEXT_ALIGN_RIGHT) + self.bar:SetAnchor(BOTTOMRIGHT, self, BOTTOMLEFT, -3, 0) + else + self.barBackdrop:SetAnchor(TOPLEFT, self.bar, TOPLEFT, 0, 0) + self.barBackdropEnd:SetAnchor(TOPRIGHT, self.bar, TOPRIGHT, 0, 0) + self.bar:SetBarAlignment(BAR_ALIGNMENT_NORMAL) + self.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_NORMAL) + self.barBorderL:SetTextureCoords(0, 0.019500000402331, 0, 0.625) + self.barBorderR:SetTextureCoords(0.59380000829697, 0.6133000254631, 0, 0.625) + self.barBackdropEnd:SetTextureCoords(0, 1, 0, 0.625) + + self.name:SetAnchor(BOTTOMLEFT, self.bar, TOPLEFT, 2, -1) + self.name:SetHorizontalAlignment(TEXT_ALIGN_LEFT) + self.bar:SetAnchor(BOTTOMLEFT, self, BOTTOMRIGHT, 3, 0) + end + elseif (settings.style == AURA_STYLE_ICON) then -- icon only style, hide unused elements + -- configure icon + self:SetTexture([[/esoui/art/actionbar/abilityframe64_up.dds]]) + self.icon:SetHidden(false) + self.highlight:SetAlpha(1) -- allow toggle highlight to be seen again if set (is a hack, but it works without a lot of checking) + -- configure timer + self.timer:ClearAnchors() + + if (settings.timerLocation == AURA_TIMERLOC_ABOVE) then + self.timer:SetAnchor(BOTTOM, self, TOP, 0, 0) + elseif (settings.timerLocation == AURA_TIMERLOC_BELOW) then + self.timer:SetAnchor(TOP, self, BOTTOM, 0, -1) + self.timer:SetVerticalAlignment(TEXT_ALIGN_TOP) + else -- settings.timerLocation == AURA_TIMERLOC_OVER (or hidden, makes no difference) + self.timer:SetAnchor(BOTTOM, self, BOTTOM, 0, -1) + end + + self.timer:SetHidden(settings.timerLocation == AURA_TIMERLOC_HIDDEN) + + if (DEBUG_ABILITYID) then -- repurpose name display for abilityID display + self.name:SetFont(strformat('%s|13|soft-shadow-thin', LMP:Fetch('font', 'Univers 57'))) + self.name:SetHorizontalAlignment(TEXT_ALIGN_CENTER) + self.name:ClearAnchors() + self.name:SetAnchor(TOP, self, TOP, 0, 1) + self.name:SetHidden(false) + else + self.name:SetHidden(true) + end + + self.bar:SetHidden(true) + else -- style == AURA_STYLE_MINI + -- configure icon + self:SetTexture(0, 0, 0, 0) -- make icon inivisble (cannot set alpha as it is the base of the aura object) + self.icon:SetHidden(true) -- hide the icon for this ability + self.highlight:SetAlpha(0) -- disable toggle highlight (is a hack, but it works without a lot of checking) + -- configure timer + self.timer:SetHidden(true) -- no timer text in this style + + -- configure bar display + self.bar:SetDimensions(settings.barWidth, 9) + self.bar:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge.dds]], 8, 18) + self.bar.gloss:SetDimensions(settings.barWidth, 9) + self.bar.gloss:SetLeadingEdge([[/esoui/art/miscellaneous/progressbar_genericfill_leadingedge_gloss.dds]], 8, 18) + self.bar.gloss:SetHidden(not settings.barGloss) + self.barBorderL:SetHeight(9) + self.barBorderR:SetHeight(9) + self.barBorderM:SetDimensions(settings.barWidth - 20, 9) + self.barBackdrop:ClearAnchors() + self.barBackdrop:SetDimensions(settings.barWidth - 10, 9) + self.barBackdropEnd:ClearAnchors() + self.barBackdropEnd:SetHeight(9) + + self.name:ClearAnchors() + self.name:SetHidden(false) + self.bar:ClearAnchors() + self.bar:SetHidden(false) + + if (settings.barReverse) then + self.barBackdrop:SetAnchor(TOPRIGHT, self.bar, TOPRIGHT, 0, 0) + self.barBackdropEnd:SetAnchor(TOPLEFT, self.bar, TOPLEFT, 0, 0) + self.bar:SetBarAlignment(BAR_ALIGNMENT_REVERSE) + self.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_REVERSE) + self.barBorderL:SetTextureCoords(0.6133000254631, 0.59380000829697, 0, 0.625) + self.barBorderR:SetTextureCoords(0.019500000402331, 0, 0, 0.625) + self.barBackdropEnd:SetTextureCoords(1, 0, 0, 0.625) + + self.name:SetAnchor(BOTTOMRIGHT, self.bar, TOPRIGHT, -2, -1) + self.name:SetHorizontalAlignment(TEXT_ALIGN_RIGHT) + self.bar:SetAnchor(BOTTOMRIGHT, self, BOTTOMRIGHT, 0, -5) + else + self.barBackdrop:SetAnchor(TOPLEFT, self.bar, TOPLEFT, 0, 0) + self.barBackdropEnd:SetAnchor(TOPRIGHT, self.bar, TOPRIGHT, 0, 0) + self.bar:SetBarAlignment(BAR_ALIGNMENT_NORMAL) + self.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_NORMAL) + self.barBorderL:SetTextureCoords(0, 0.019500000402331, 0, 0.625) + self.barBorderR:SetTextureCoords(0.59380000829697, 0.6133000254631, 0, 0.625) + self.barBackdropEnd:SetTextureCoords(0, 1, 0, 0.625) + + self.name:SetAnchor(BOTTOMLEFT, self.bar, TOPLEFT, 2, -1) + self.name:SetHorizontalAlignment(TEXT_ALIGN_LEFT) + self.bar:SetAnchor(BOTTOMLEFT, self, BOTTOMLEFT, 0, -5) + end + end end -function Aura:Configure() - local db = self.k_frame.k_db - - self.name:SetFont(strformat('%s|%d|%s', LMP:Fetch('font', db.nameFont), db.nameSize, db.nameOutline)) - self.name:SetHeight(db.nameSize) - self.name:SetColor(db.nameColour.r, db.nameColour.g, db.nameColour.b) - self.timer:SetFont(strformat('%s|%d|%s', LMP:Fetch('font', db.timerFont), db.timerSize, db.timerOutline)) - self.timer:SetHeight(db.timerSize) - self.timer:SetColor(db.timerColour.r, db.timerColour.g, db.timerColour.b) - - -- tooltip control - if (db.tooltips) then - self:SetMouseEnabled(true) - - if (not self:GetHandler('OnMouseEnter')) then -- no mouse watchers, add - self:SetHandler('OnMouseEnter', OnMouseEnter) - self:SetHandler('OnMouseExit', OnMouseExit) - end - else - self:SetMouseEnabled(false) - - if (self:GetHandler('OnMouseEnter')) then -- mouse watchers, remove - self:SetHandler('OnMouseEnter', nil) - self:SetHandler('OnMouseExit', nil) - end - end - - if (db.auraGrowth == 'LEFT' or db.auraGrowth == 'RIGHT' or db.auraGrowth == 'LEFTCENTER' or db.auraGrowth == 'RIGHTCENTER') then -- horizontal aura growth - if (db.timerShowHorz == 'HIDE') then - self.timer:SetHidden(true) - else - self.timer:ClearAnchors() - - if (db.timerShowHorz == 'ABOVE') then - self.timer:SetAnchor(BOTTOM, self, TOP, 0, -5) - elseif (db.timerShowHorz == 'BELOW') then - self.timer:SetAnchor(TOP, self, BOTTOM, 0, 1) - elseif (db.timerShowHorz == 'OVER') then - self.timer:SetAnchor(BOTTOM, self, BOTTOM, 0, -4) - end - - self.timer:SetHidden(false) - end - - self.name:SetHidden(true) - self.bar:SetHidden(true) - else -- vertical aura growth - local point = (db.auraIconOnRight) and RIGHT or LEFT - local pointInv = (db.auraIconOnRight) and LEFT or RIGHT - local align = (db.auraIconOnRight) and 2 or 0 - local xMulti = (db.auraIconOnRight) and -1 or 1 - - if (db.timerShowVert == 'HIDE') then - self.timer:SetHidden(true) - else - self.timer:ClearAnchors() - self.timer:SetAnchor(BOTTOM, self, BOTTOM, 0, -4) - self.timer:SetHidden(false) - end - - -- configure bar display - self.bar:SetWidth(db.barWidth) - self.bar.gloss:SetWidth(db.barWidth) - self.bar.gloss:SetHidden(not db.barGloss) - self.barBorderM:SetWidth(db.barWidth - 20) - self.barBackdrop:ClearAnchors() - self.barBackdrop:SetAnchor(point + TOP, self.bar, point + TOP, 0, 0) - self.barBackdrop:SetWidth(db.barWidth - 10) - self.barBackdropEnd:ClearAnchors() - self.barBackdropEnd:SetAnchor(pointInv + TOP, self.bar, pointInv + TOP, 0, 0) - - if (db.auraIconOnRight) then - self.bar:SetBarAlignment(BAR_ALIGNMENT_REVERSE) - self.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_REVERSE) - self.barBorderL:SetTextureCoords(0.6133000254631, 0.59380000829697, 0, 0.625) - self.barBorderR:SetTextureCoords(0.019500000402331, 0, 0, 0.625) - self.barBackdropEnd:SetTextureCoords(1, 0, 0, 0.625) - else - self.bar:SetBarAlignment(BAR_ALIGNMENT_NORMAL) - self.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_NORMAL) - self.barBorderL:SetTextureCoords(0, 0.019500000402331, 0, 0.625) - self.barBorderR:SetTextureCoords(0.59380000829697, 0.6133000254631, 0, 0.625) - self.barBackdropEnd:SetTextureCoords(0, 1, 0, 0.625) - end - - -- anchor (or hide) 'side' elements - if (db.showNameBar) then - self.name:ClearAnchors() - self.name:SetAnchor(point + TOP, self, pointInv + TOP, xMulti * 4, 0) - self.name:SetHidden(false) - self.bar:ClearAnchors() - self.bar:SetAnchor(point + BOTTOM, self, pointInv + BOTTOM, xMulti * 3, 0) - self.bar:SetHidden(false) - else - self.name:SetHidden(true) - self.bar:SetHidden(true) - end - end +function Aura:UpdateVisuals() -- updates visuals on active auras, only called by settings changes + if (self.auraType and self.auraType == AURA_TYPE_TOGGLED) then + self.highlight:SetHidden(not self.highlightToggled) -- update toggle highlighting + end + + colours = self.barColours[self.auraType] + self.bar:SetGradientColors(colours.r1, colours.g1, colours.b1, 1, colours.r2, colours.g2, colours.b2, 1) end -Srendarr.Aura = Aura \ No newline at end of file + +Srendarr.Aura = Aura diff --git a/AuraAnchor.lua b/AuraAnchor.lua deleted file mode 100644 index 1e25507..0000000 --- a/AuraAnchor.lua +++ /dev/null @@ -1,236 +0,0 @@ -local Srendarr = _G['Srendarr'] -local L = Srendarr:GetLocale() - -local ICON_SIZE = Srendarr.ICON_SIZE -local math_abs = math.abs -local math_rad = math.rad - -local AuraAnchor = {} - -local function GetEdgeRelativePosition(self) - local left, top = self :GetLeft(), self :GetTop() - local right, bottom = self :GetRight(), self :GetBottom() - local rootW, rootH = GuiRoot:GetWidth(), GuiRoot:GetHeight() - local point = 0 - local x, y - - if (left < (rootW - right) and left < math_abs((left + right) / 2 - rootW / 2)) then - x, point = left, 2 -- 'LEFT' - elseif ((rootW - right) < math_abs((left + right) / 2 - rootW / 2)) then - x, point = right - rootW, 8 -- 'RIGHT' - else - x, point = (left + right) / 2 - rootW / 2, 0 - end - - if (bottom < (rootH - top) and bottom < math_abs((bottom + top) / 2 - rootH / 2)) then - y, point = top, point + 1 -- 'TOP|TOPLEFT|TOPRIGHT' - elseif ((rootH - top) < math_abs((bottom + top) / 2 - rootH / 2)) then - y, point = bottom - rootH, point + 4 -- 'BOTTOM|BOTTOMLEFT|BOTTOMRIGHT' - else - y = (bottom + top) / 2 - rootH / 2 - end - - point = (point == 0) and 128 or point -- 'CENTER' - - return point, x, y -end - -local function AddControl(parent, cType, level) - local c = WINDOW_MANAGER:CreateControl(nil, parent, cType) - c:SetDrawLayer(DL_OVERLAY) - c:SetDrawLevel(level) - return c, c -end - -local function BuildDragOverlay(self) - local ctrl - - local drag = AddControl(self, CT_TEXTURE, 3) - drag:SetDimensions(ICON_SIZE, ICON_SIZE) - drag:SetAnchor(CENTER) - drag:SetTexture([[/esoui/art/actionbar/abilityself64_up.dds]]) -- border (and root) - -- OVERLAY ICON - drag.icon, ctrl = AddControl(drag, CT_TEXTURE, 2) - ctrl:SetDimensions(ICON_SIZE, ICON_SIZE) - ctrl:SetAnchor(CENTER) - ctrl:SetTexture[[/esoui/art/icons/ability_restorationstaff_001.dds]] - drag.flash, ctrl = AddControl(drag, CT_TEXTURE, 4) - ctrl:SetDimensions(ICON_SIZE, ICON_SIZE) - ctrl:SetAnchor(CENTER) - ctrl:SetTexture([[/esoui/art/actionbar/actionslot_toggledon.dds]]) - ctrl:SetColor(1, 0.82, 0) - -- LABEL - drag.label, ctrl = AddControl(drag, CT_LABEL, 4) - ctrl:SetFont('ZoFontWinH5') - ctrl:SetHeight(20) - ctrl:SetVerticalAlignment(1) - ctrl:SetHorizontalAlignment(1) - ctrl:SetColor(0.64, 0.52, 0, 1) - ctrl:SetText( - (self.k_id == 1) and L.DragLabel_BuffShort or - (self.k_id == 2) and L.DragLabel_BuffLong or - (self.k_id == 3) and L.DragLabel_Debuff or - (self.k_id == 4) and L.DragLabel_Target or - (self.k_id == 5) and L.DragLabel_Target_Debuff - ) - -- GROWTH ARROW - drag.growth, ctrl = AddControl(drag, CT_TEXTURE, 4) - drag.growth:SetDimensions(32, 32) - drag.growth:SetTexture([[/esoui/art/ava/ava_keepstatus_icon_timetoupgrade.dds]]) - -- EXTRA GROWTH ARROW - drag.growthExtra, ctrl = AddControl(drag, CT_TEXTURE, 4) - drag.growthExtra:SetDimensions(32, 32) - drag.growthExtra:SetTexture([[/esoui/art/ava/ava_keepstatus_icon_timetoupgrade.dds]]) - -- ANIMATION - drag.timeline = ANIMATION_MANAGER:CreateTimeline() - drag.timeline:SetPlaybackType(ANIMATION_PLAYBACK_LOOP, -1) - local anim - anim = drag.timeline:InsertAnimation(ANIMATION_SCALE, drag.growth, 0) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetScaleValues(1, 1.25) - anim = drag.timeline:InsertAnimation(ANIMATION_SCALE, drag.growth, 750) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetScaleValues(1.25, 1) - anim = drag.timeline:InsertAnimation(ANIMATION_SCALE, drag.growthExtra, 0) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetScaleValues(1, 1.25) - anim = drag.timeline:InsertAnimation(ANIMATION_SCALE, drag.growthExtra, 750) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetScaleValues(1.25, 1) - anim = drag.timeline:InsertAnimation(ANIMATION_COLOR, drag.label, 0) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetColorValues(0.64, 0.52, 0, 1, 1, 0.82, 0, 1) - anim = drag.timeline:InsertAnimation(ANIMATION_COLOR, drag.label, 750) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetColorValues(1, 0.82, 0, 1, 0.64, 0.52, 0, 1) - anim = drag.timeline:InsertAnimation(ANIMATION_ALPHA, drag.flash, 0) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetAlphaValues(0.4, 1) - anim = drag.timeline:InsertAnimation(ANIMATION_ALPHA, drag.flash, 750) - anim:SetDuration(750) - anim:SetEasingFunction(ZO_LinearEase) - anim:SetAlphaValues(1, 0.4) - - self.drag = drag -end - -local function ConfigureDragOverlay(self) - local drag = self.drag - - if (not drag) then return end - - local db = Srendarr.db.frames[self.k_id] - - drag.growth:ClearAnchors() - drag.growthExtra:ClearAnchors() - drag.label:ClearAnchors() - - if (self.k_id == 1) then - if (Srendarr.db.combineBuff) then - drag.label:SetText(L.DragLabel_BuffAll) - else - drag.label:SetText(L.DragLabel_BuffShort) - end - end - - if (db.auraGrowth == 'LEFT' or db.auraGrowth == 'LEFTCENTER') then - drag.label:SetAnchor(RIGHT, drag, LEFT, -4, 0) - drag.growth:SetAnchor(RIGHT, drag.label, LEFT, -2, 0) - drag.growth:SetTextureRotation(math_rad(90)) - elseif (db.auraGrowth == 'RIGHT' or db.auraGrowth == 'RIGHTCENTER') then - drag.label:SetAnchor(LEFT, drag, RIGHT, 4, 0) - drag.growth:SetAnchor(LEFT, drag.label, RIGHT, 4, 0) - drag.growth:SetTextureRotation(math_rad(270)) - elseif (db.auraGrowth == 'UP') then - drag.label:SetAnchor(BOTTOM, drag, TOP, 0, -4) - drag.growth:SetAnchor(BOTTOM, drag.label, TOP, 0, -2) - drag.growth:SetTextureRotation(0) - else -- down - drag.label:SetAnchor(TOP, drag, BOTTOM, 0, 4) - drag.growth:SetAnchor(TOP, drag.label, BOTTOM, 0, 2) - drag.growth:SetTextureRotation(math_rad(180)) - end - - if (db.auraGrowth == 'LEFTCENTER') then - drag.growthExtra:SetHidden(false) - drag.growthExtra:SetAnchor(LEFT, drag, RIGHT, 4, 0) - drag.growthExtra:SetTextureRotation(math_rad(270)) - elseif (db.auraGrowth == 'RIGHTCENTER') then - drag.growthExtra:SetHidden(false) - drag.growthExtra:SetAnchor(RIGHT, drag, LEFT, -4, 0) - drag.growthExtra:SetTextureRotation(math_rad(90)) - else - drag.growthExtra:SetHidden(true) - end -end - -local function EnableDrag(self) - if ((self.k_id == 2 and Srendarr.db.combineBuff) or (self.k_id == 4 and not Srendarr.db.showTargetAuras) or (self.k_id == 5 and not Srendarr.db.showTargetAurasDebuff)) then return end -- no overlay if not being used - - if (not self.drag) then - BuildDragOverlay(self) - end - - self:SetMouseEnabled(true) - self:SetMovable(true) - self:ConfigureDragOverlay() - self.drag:SetHidden(false) - self.drag.timeline:PlayFromStart() - - Srendarr.auraFrames[self.k_id]:SetAurasNonInteractive() -end - -local function DisableDrag(self) - self:SetMouseEnabled(false) - self:SetMovable(false) - - if (self.drag) then - self.drag:SetHidden(true) - self.drag.timeline:Stop() - self.drag.growth:SetScale(1) - self.drag.label:SetColor(0.64, 0.52, 0, 1) - self.drag.flash:SetAlpha(0.4) - end - - Srendarr.auraFrames[self.k_id]:ConfigureAllAuras() -end - -function AuraAnchor:New(id, point, x, y, scale) - local frame = CreateControl(nil, GuiRoot, CT_TOPLEVELCONTROL) - frame:SetKeyboardEnabled(false) - frame:SetMouseEnabled(false) - frame:SetMovable(false) - frame:SetClampedToScreen(true) - frame:SetDimensions(ICON_SIZE, ICON_SIZE) - frame:ClearAnchors() - frame:SetAnchor(point, GuiRoot, point, x, y) - frame:SetScale(scale) - - frame.k_id = id - - frame:SetHandler('OnReceiveDrag', function(af) - af:StartMoving() - end) - frame:SetHandler('OnMouseUp', function(af) - af:StopMovingOrResizing() - local point, x, y = GetEdgeRelativePosition(af) - Srendarr.db.frames[af.k_id].anchor.point = point - Srendarr.db.frames[af.k_id].anchor.x = x - Srendarr.db.frames[af.k_id].anchor.y = y - end) - - frame['EnableDrag'] = EnableDrag - frame['DisableDrag'] = DisableDrag - frame['ConfigureDragOverlay'] = ConfigureDragOverlay - - return frame -end - -Srendarr.AuraAnchor = AuraAnchor \ No newline at end of file diff --git a/AuraControl.lua b/AuraControl.lua new file mode 100644 index 0000000..6831ca4 --- /dev/null +++ b/AuraControl.lua @@ -0,0 +1,383 @@ +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = Srendarr:GetLocale() + +-- CONSTS -- +local ABILITY_TYPE_CHANGEAPPEARANCE = ABILITY_TYPE_CHANGEAPPEARANCE +local ABILITY_TYPE_REGISTERTRIGGER = ABILITY_TYPE_REGISTERTRIGGER +local BUFF_EFFECT_TYPE_DEBUFF = BUFF_EFFECT_TYPE_DEBUFF + +local GROUP_PLAYER_SHORT = Srendarr.GROUP_PLAYER_SHORT +local GROUP_PLAYER_LONG = Srendarr.GROUP_PLAYER_LONG +local GROUP_PLAYER_TOGGLED = Srendarr.GROUP_PLAYER_TOGGLED +local GROUP_PLAYER_PASSIVE = Srendarr.GROUP_PLAYER_PASSIVE +local GROUP_PLAYER_DEBUFF = Srendarr.GROUP_PLAYER_DEBUFF +local GROUP_PLAYER_GROUND = Srendarr.GROUP_PLAYER_GROUND +local GROUP_PLAYER_MAJOR = Srendarr.GROUP_PLAYER_MAJOR +local GROUP_PLAYER_MINOR = Srendarr.GROUP_PLAYER_MINOR +local GROUP_TARGET_BUFF = Srendarr.GROUP_TARGET_BUFF +local GROUP_TARGET_DEBUFF = Srendarr.GROUP_TARGET_DEBUFF +local GROUP_PROMINENT = Srendarr.GROUP_PROMINENT + +local AURA_TYPE_TIMED = Srendarr.AURA_TYPE_TIMED +local AURA_TYPE_TOGGLED = Srendarr.AURA_TYPE_TOGGLED +local AURA_TYPE_PASSIVE = Srendarr.AURA_TYPE_PASSIVE + +-- UPVALUES -- +local GetGameTimeMillis = GetGameTimeMilliseconds +local IsToggledAura = Srendarr.IsToggledAura +local IsMajorEffect = Srendarr.IsMajorEffect -- technically only used for major|minor buffs on the player, major|minor debuffs +local IsMinorEffect = Srendarr.IsMinorEffect -- are filtered to the debuff grouping before being checked for + +local auraLookup = Srendarr.auraLookup +local filteredAuras = Srendarr.filteredAuras +local prominentAuras = {} +local displayFrameRef = {} +local shortBuffThreshold, filterDisguisesOnPlayer, filterDisguisesOnTarget + +local displayFrameFake = { + ['AddAuraToDisplay'] = function() + -- do nothing : used to make the AuraHandler code more manageable, redirects unwanted auras to nil + end, +} + +-- ------------------------ +-- AURA HANDLER +-- ------------------------ +local function AuraHandler(flagBurst, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + -- d('AuraHandler ' .. auraName .. ' [' .. abilityID ..'] (' .. unitTag .. '), effectType: ' .. effectType .. ', abilityType: ' .. abilityType .. string.format(', %.3f | %.3f (%.3f)', start, finish, (finish - start))) + + if (start ~= finish and (finish - start) < 2.25) then return end -- abort showing any timed auras with a duration of < 2.25s + + if (filteredAuras[unitTag][abilityID]) then return end -- abort immediately if this is an ability we've filtered + + if (auraLookup[unitTag][abilityID]) then -- aura exists, update its data (assume would not exist unless passed filters earlier) + auraLookup[unitTag][abilityID]:Update(start, finish) + return + end + + if (prominentAuras[abilityID] and unitTag ~= 'reticleover') then -- special case, this is a prominent aura on player or gtaoe + displayFrameRef[GROUP_PROMINENT]:AddAuraToDisplay(flagBurst, GROUP_PROMINENT, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + return + end + + if (unitTag == 'reticleover') then -- new aura on target + if (effectType == BUFF_EFFECT_TYPE_DEBUFF) then + -- debuff on target, check for it being a passive (not sure they can be, but just to be sure as things break with a 'timed' passive) + displayFrameRef[GROUP_TARGET_DEBUFF]:AddAuraToDisplay(flagBurst, GROUP_TARGET_DEBUFF, (start == finish) and AURA_TYPE_PASSIVE or AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + else + -- buff on target, sort as passive, toggle or timed and add + if (filterDisguisesOnTarget and abilityType == ABILITY_TYPE_CHANGEAPPEARANCE) then return end -- is a disguise and they are filtered + + if (start == finish) then -- toggled or passive + displayFrameRef[GROUP_TARGET_BUFF]:AddAuraToDisplay(flagBurst, GROUP_TARGET_BUFF, (IsToggledAura(abilityID)) and AURA_TYPE_TOGGLED or AURA_TYPE_PASSIVE, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + else -- timed buff + displayFrameRef[GROUP_TARGET_BUFF]:AddAuraToDisplay(flagBurst, GROUP_TARGET_BUFF, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + end + end + elseif (unitTag == 'player') then -- new aura on player + if (effectType == BUFF_EFFECT_TYPE_DEBUFF) then + -- debuff on player, check for it being a passive (not sure they can be, but just to be sure as things break with a 'timed' passive) + displayFrameRef[GROUP_PLAYER_DEBUFF]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_DEBUFF, (start == finish) and AURA_TYPE_PASSIVE or AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + else + -- buff on player, sort as passive, toggled or timed and add + if (filterDisguisesOnPlayer and abilityType == ABILITY_TYPE_CHANGEAPPEARANCE) then return end -- is a disguise and they are filtered + + if (start == finish) then -- toggled or passive + if (IsToggledAura(abilityID)) then -- toggled + displayFrameRef[GROUP_PLAYER_TOGGLED]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_TOGGLED, AURA_TYPE_TOGGLED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + else -- passive + displayFrameRef[GROUP_PLAYER_PASSIVE]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_PASSIVE, AURA_TYPE_PASSIVE, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + end + else -- timed buff + if (IsMajorEffect(abilityID)) then -- major buff on player + displayFrameRef[GROUP_PLAYER_MAJOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MAJOR, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + elseif (IsMinorEffect(abilityID)) then -- minor buff on player + displayFrameRef[GROUP_PLAYER_MINOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MINOR, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + elseif ((finish - start) > shortBuffThreshold) then -- is considered a long duration buff + displayFrameRef[GROUP_PLAYER_LONG]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_LONG, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + else + displayFrameRef[GROUP_PLAYER_SHORT]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_SHORT, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + end + end + end + else -- unitTag == 'groundaoe' -- new ground aoe cast by player (assume always timed) + displayFrameRef[GROUP_PLAYER_GROUND]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_GROUND, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + end +end + +function Srendarr:ConfigureAuraHandler() + for group, frameNum in pairs(self.db.auraGroups) do + -- if a group is set to hidden, auras will be sent to a fake frame that does nothing (simplifies things) + displayFrameRef[group] = (frameNum > 0) and self.displayFrames[frameNum] or displayFrameFake + end + + shortBuffThreshold = self.db.shortBuffThreshold + filterDisguisesOnPlayer = self.db.filtersPlayer.disguise + filterDisguisesOnTarget = self.db.filtersTarget.disguise + + for id in pairs(prominentAuras) do + prominentAuras[id] = nil -- clean out prominent auras list + end + + for _, abilityIDs in pairs(self.db.prominentWhitelist) do + for id in pairs(abilityIDs) do + prominentAuras[id] = true -- populate promience list from saved database + end + end +end + + +-- ------------------------ +-- EVENT: EVENT_PLAYER_ACTIVATED, EVENT_PLAYER_ALIVE +do ------------------------ + local GetNumBuffs = GetNumBuffs + local GetUnitBuffInfo = GetUnitBuffInfo + local NUM_DISPLAY_FRAMES = Srendarr.NUM_DISPLAY_FRAMES + + local auraLookup = Srendarr.auraLookup + local numAuras, auraName, start, finish, stack, icon, effectType, abilityType, abilityID + + Srendarr.OnPlayerActivatedAlive = function() + for _, auras in pairs(auraLookup) do -- iterate all aura lookups + for _, aura in pairs(auras) do -- iterate all auras for each lookup + aura:Release(true) + end + end + + numAuras = GetNumBuffs('player') + + if (numAuras > 0) then -- player has auras, scan and send to handle + for i = 1, numAuras do + auraName, start, finish, _, _, icon, _, effectType, abilityType, _, abilityID = GetUnitBuffInfo('player', i) + + AuraHandler(true, auraName, 'player', start, finish, icon, effectType, abilityType, abilityID) + end + end + + for x = 1, NUM_DISPLAY_FRAMES do + Srendarr.displayFrames[x]:UpdateDisplay() -- update the display for all frames + end + end +end + +-- ------------------------ +-- EVENT: EVENT_PLAYER_DEAD +do ------------------------ + local NUM_DISPLAY_FRAMES = Srendarr.NUM_DISPLAY_FRAMES + + local auraLookup = Srendarr.auraLookup + + Srendarr.OnPlayerDead = function() + for _, auras in pairs(auraLookup) do -- iterate all aura lookups + for _, aura in pairs(auras) do -- iterate all auras for each lookup + aura:Release(true) + end + end + + for x = 1, NUM_DISPLAY_FRAMES do + Srendarr.displayFrames[x]:UpdateDisplay() -- update the display for all frames + end + end +end + +-- ------------------------ +-- EVENT: EVENT_PLAYER_COMBAT_STATE +do ----------------------- + local NUM_DISPLAY_FRAMES = Srendarr.NUM_DISPLAY_FRAMES + + local displayFramesScene = Srendarr.displayFramesScene + + OnCombatState = function(e, inCombat) + if (inCombat) then + if (Srendarr.db.combatDisplayOnly) then + for x = 1, NUM_DISPLAY_FRAMES do + displayFramesScene[x]:SetHiddenForReason('combatstate', false) + end + end + else + if (Srendarr.db.combatDisplayOnly) then + for x = 1, NUM_DISPLAY_FRAMES do + displayFramesScene[x]:SetHiddenForReason('combatstate', true) + end + end + end + end + + function Srendarr:ConfigureOnCombatState() + if (self.db.combatDisplayOnly) then + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_COMBAT_STATE, OnCombatState) + + OnCombatState(nil, IsUnitInCombat('player')) -- force an update + else + EVENT_MANAGER:UnregisterForEvent(self.name, EVENT_PLAYER_COMBAT_STATE) + + if (self.displayFramesScene[1]:IsHiddenForReason('combatstate')) then -- if currently hidden due to setting, show + for x = 1, NUM_DISPLAY_FRAMES do + self.displayFramesScene[x]:SetHiddenForReason('combatstate', false) + end + end + end + end + + Srendarr.OnCombatState = OnCombatState +end + +-- ------------------------ +-- EVENT: EVENT_EFFECT_CHANGED +do ------------------------ + local EFFECT_RESULT_FADED = EFFECT_RESULT_FADED + local ABILITY_TYPE_AREAEFFECT = ABILITY_TYPE_AREAEFFECT +-- local ABILITY_TYPE_REGISTERTRIGGER = ABILITY_TYPE_REGISTERTRIGGER + local AURA_TYPE_TIMED = Srendarr.AURA_TYPE_TIMED + local GROUP_PLAYER_GROUND = Srendarr.GROUP_PLAYER_GROUND + + local GetAbilityDescription = GetAbilityDescription + local crystalFragmentsPassive = Srendarr.crystalFragmentsPassive -- special case for tracking fragments proc + + local auraLookup = Srendarr.auraLookup + local fadedAura + + Srendarr.OnEffectChanged = function(e, change, slot, auraName, unitTag, start, finish, stack, icon, buffType, effectType, abilityType, statusType, unitName, unitID, abilityID) + -- check the aura is on either the player, the target or is a ground aoe -- the description check filters a lot of extra auras attached to many ground effects + unitTag = (unitTag == 'player' or unitTag == 'reticleover') and unitTag or (abilityType == ABILITY_TYPE_AREAEFFECT and GetAbilityDescription(abilityID) ~= '') and 'groundaoe' or nil + + if (not unitTag) then return end -- don't care about this unit and isn't a ground aoe, abort + + if (change == EFFECT_RESULT_FADED) then -- aura has faded + fadedAura = auraLookup[unitTag][abilityID] + + if (fadedAura) then -- aura exists, tell it to expire if timed, or release otherwise + if (fadedAura.auraType == AURA_TYPE_TIMED) then + if (fadedAura.abilityType == ABILITY_TYPE_AREAEFFECT) then return end -- gtaoes expire internally (repeated casting, only one timer) + + fadedAura:SetExpired() + else + fadedAura:Release() + end + end + +-- if (abilityType == ABILITY_TYPE_REGISTERTRIGGER and + if (auraName == crystalFragmentsPassive) then -- special case for tracking fragments proc + Srendarr:OnCrystalFragmentsProc(false) + end + else -- aura has been gained or changed, dispatch to handler + AuraHandler(false, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + +-- if (abilityType == ABILITY_TYPE_REGISTERTRIGGER and + if (auraName == crystalFragmentsPassive) then -- special case for tracking fragments proc + Srendarr:OnCrystalFragmentsProc(true) + end + end + end +end + +-- ------------------------ +-- EVENT: EVENT_RETICLE_TARGET_CHANGED +do ------------------------ + local GetNumBuffs = GetNumBuffs + local GetUnitBuffInfo = GetUnitBuffInfo + local DoesUnitExist = DoesUnitExist + + local auraLookupReticle = Srendarr.auraLookup['reticleover'] -- local ref for speed, this functions expensive + local targetDisplayFrame1 = false -- local refs to frames displaying target auras (if any) + local targetDisplayFrame2 = false -- local refs to frames displaying target auras (if any) + local numAuras, auraName, start, finish, stack, icon, effectType, abilityType, abilityID + + local function OnTargetChanged() + for _, aura in pairs(auraLookupReticle) do + aura:Release(true) -- old auras cleaned out + end + + if (DoesUnitExist('reticleover')) then -- have a target, scan for auras + numAuras = GetNumBuffs('reticleover') + + if (numAuras > 0) then -- target has auras, scan and send to handler + for i = 1, numAuras do + auraName, start, finish, _, stack, icon, _, effectType, abilityType, _, abilityID = GetUnitBuffInfo('reticleover', i) + + AuraHandler(true, auraName, 'reticleover', start, finish, icon, effectType, abilityType, abilityID) + end + end + end + + -- no matter, update the display of the 1-2 frames displaying targets auras + if (targetDisplayFrame1) then targetDisplayFrame1:UpdateDisplay() end + if (targetDisplayFrame2) then targetDisplayFrame2:UpdateDisplay() end + end + + function Srendarr:ConfigureOnTargetChanged() + -- figure out which frames currently display target auras + local targetBuff = self.db.auraGroups[Srendarr.GROUP_TARGET_BUFF] + local targetDebuff = self.db.auraGroups[Srendarr.GROUP_TARGET_DEBUFF] + + targetDisplayFrame1 = (targetBuff ~= 0) and self.displayFrames[targetBuff] or false + targetDisplayFrame2 = (targetDebuff ~= 0) and self.displayFrames[targetDebuff] or false + + if (targetDisplayFrame1 or targetDisplayFrame2) then -- event configured and needed, start tracking + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_RETICLE_TARGET_CHANGED, OnTargetChanged) + else -- not needed (not displaying any target auras) + EVENT_MANAGER:UnregisterForEvent(self.name, EVENT_RETICLE_TARGET_CHANGED) + end + end + + Srendarr.OnTargetChanged = OnTargetChanged +end + +-- ------------------------ +-- EVENT: EVENT_ACTION_SLOT_ABILITY_USED +do ------------------------ + local ABILITY_TYPE_NONE = ABILITY_TYPE_NONE -- no fakes have any specifc ability type + local BUFF_EFFECT_TYPE_BUFF = BUFF_EFFECT_TYPE_BUFF -- all fakes are buffs or gtaoe + + local GetGameTimeMillis = GetGameTimeMilliseconds + local GetLatency = GetLatency + + local slotData = Srendarr.slotData + local fakeAuras = Srendarr.fakeAuras + local slotAbilityName, currentTime + + Srendarr.OnActionSlotAbilityUsed = function(e, slotID) + if (slotID < 3 or slotID > 8) then return end -- abort if not a main ability (or ultimate) + + slotAbilityName = slotData[slotID].abilityName + + if (not fakeAuras[slotAbilityName]) then return end -- no fake aura needed for this ability (majority case) + + currentTime = GetGameTimeMillis() / 1000 + + AuraHandler( + false, + slotAbilityName, + fakeAuras[slotAbilityName].unitTag, + currentTime, + currentTime + fakeAuras[slotAbilityName].duration + (GetLatency() / 1000), -- + cooldown? GetSlotCooldownInfo(slotID) + slotData[slotID].abilityIcon, + BUFF_EFFECT_TYPE_BUFF, + ABILITY_TYPE_NONE, + fakeAuras[slotAbilityName].abilityID + ) + end + + function Srendarr:ConfigureOnActionSlotAbilityUsed() + if (self.db.auraFakeEnabled) then + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_ACTION_SLOT_ABILITY_USED, Srendarr.OnActionSlotAbilityUsed) + else + EVENT_MANAGER:UnregisterForEvent(self.name, EVENT_ACTION_SLOT_ABILITY_USED) + end + end +end + + +function Srendarr:InitializeAuraControl() + -- setup event handlers + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_ACTIVATED, Srendarr.OnPlayerActivatedAlive) -- same action for both events + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_ALIVE, Srendarr.OnPlayerActivatedAlive) -- same action for both events + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_DEAD, Srendarr.OnPlayerDead) + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_EFFECT_CHANGED, Srendarr.OnEffectChanged) + + self:ConfigureOnCombatState() -- EVENT_PLAYER_COMBAT_STATE + self:ConfigureOnTargetChanged() -- EVENT_RETICLE_TARGET_CHANGED + self:ConfigureOnActionSlotAbilityUsed() -- EVENT_ACTION_SLOT_ABILITY_USED + + self:ConfigureAuraHandler() +end diff --git a/AuraData.lua b/AuraData.lua index 9b549a8..6f48e59 100644 --- a/AuraData.lua +++ b/AuraData.lua @@ -1,1085 +1,1024 @@ -local Srendarr = _G['Srendarr'] -local L = Srendarr:GetLocale() - -local data = { - -- --------------------------------------------------- - -- WEAPONS ------------------------------------------- - -- --------------------------------------------------- - - -- TWO HANDED ---------------------------------------- - [L.Aura_Cleave] = {0, 10, 0 }, - [L.Aura_Brawler] = {8, 10, 0, 3 }, -- damage shield, disabled corrections - [L.Aura_Carve] = {0, 10, 0 }, - [L.Aura_Stampede] = {0, 3.5, 0 }, - [L.Aura_Uppercut] = {0, 3.5, 0.8 }, - [L.Aura_Dizzying_Swing] = {0, 7.5, 0.8 }, - [L.Aura_Wrecking_Blow] = {0, 3.5, 0.8 }, --- [L.Aura_Momentum] = {30, 0, 0 }, -- Tracked by the game --- [L.Aura_Forward_Momentum] = {33, 0, 0 }, -- Tracked by the game --- [L.Aura_Rally] = {33, 0, 0 }, -- Tracked by the game - - -- ONE_HANDED_AND_SHIELD ----------------------------- - [L.Aura_Puncture] = {0, 15, 0 }, - [L.Aura_Pierce_Armor] = {0, 15, 0 }, - [L.Aura_Ransack] = {0, 15, 0 }, - [L.Aura_Low_Slash] = {0, 9, 0 }, - [L.Aura_Crippling_Slash] = {0, 12, 0 }, - [L.Aura_Deep_Slash] = {0, 12, 0 }, - [L.Aura_Shield_Charge] = {0, 2, 0 }, - [L.Aura_Invasion] = {0, 2, 0 }, - [L.Aura_Shielded_Assault] = {6, 2, 0, 3 }, -- damage shield - [L.Aura_Power_Bash] = {0, 17, 0 }, - [L.Aura_Power_Slam] = {0, 17, 0 }, - [L.Aura_Reverberating_Bash] = {0, 17, 0 }, - - -- DUAL_WEILD ---------------------------------------- - [L.Aura_Twin_Slashes] = {0, 9, 0 }, - [L.Aura_Blood_Craze] = {9, 9, 0 }, - [L.Aura_Rending_Slashes] = {0, 9, 0 }, --- [L.Aura_Rapid_Strikes] = {6, 0, 1.3 }, - [L.Aura_Whirling_Blades] = {10, 0, 0 }, - [L.Aura_Blade_Cloak] = {15, 0, 0 }, - [L.Aura_Quick_Cloak] = {15, 0, 0 }, - [L.Aura_Deadly_Cloak] = {15, 0, 0 }, - [L.Aura_Hidden_Blade] = {0, 6, 0 }, - [L.Aura_Flying_Blade] = {0, 6, 0 }, - [L.Aura_Shrouded_Daggers] = {0, 6, 0 }, - - -- BOW ----------------------------------------------- - [L.Aura_Poison_Arrow] = {0, 10, 0 }, - [L.Aura_Poison_Injection] = {0, 10, 0 }, - [L.Aura_Venom_Arrow] = {0, 10, 0 }, - [L.Aura_Volley] = {0, 5, 1.5 }, --fictive cast time for the arrows to reach the ground and begin to inflict damage - [L.Aura_Scorched_Earth] = {0, 11, 1.5 }, -- " - [L.Aura_Arrow_Barrage] = {0, 5, 1.5 }, -- " - [L.Aura_Scatter_Shot] = {0, 5, 0 }, - [L.Aura_Draining_Shot] = {0, 6, 0 }, - [L.Aura_Magnum_Shot] = {0, 5, 0 }, - [L.Aura_Arrow_Spray] = {0, 5, 0 }, - [L.Aura_Acid_Spray] = {0, 5, 0 }, - [L.Aura_Bombard] = {0, 6.5, 0 }, - [L.Aura_Snipe] = {0, 0, 1.05}, - [L.Aura_Focused_Aim] = {0, 10, 1.05}, - [L.Aura_Lethal_Arrow] = {0, 10, 1.05}, - - -- DESTRUCTION_STAFF --------------------------------- - [L.Aura_Destructive_Touch] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Shock_Touch] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Frost_Touch] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Flame_Touch] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Destructive_Clench] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Flame_Clench] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Shock_Clench] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Frost_Clench] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Destructive_Reach] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Shock_Reach] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Flame_Reach] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Frost_Reach] = {0, 8, 0 }, -- added by silentgecko - [L.Aura_Wall_of_Elements] = {0, 6, 0 }, - [L.Aura_Wall_of_Fire] = {0, 6, 0 }, - [L.Aura_Wall_of_Frost] = {0, 6, 0 }, - [L.Aura_Wall_of_Storms] = {0, 6, 0 }, - [L.Aura_Wall_of_Cinders] = {0, 6, 0 }, - [L.Aura_Unstable_Wall_of_Elements] = {0, 6, 0 }, - [L.Aura_Unstable_Wall_of_Fire] = {0, 6, 0 }, - [L.Aura_Unstable_Wall_of_Frost] = {0, 6, 0 }, - [L.Aura_Unstable_Wall_of_Storms] = {0, 6, 0 }, - [L.Aura_Unstable_Wall_of_Cinders] = {0, 6, 0 }, - [L.Aura_Elemental_Blockade] = {0, 8, 0 }, - [L.Aura_Blockade_of_Fire] = {0, 8, 0 }, - [L.Aura_Blockade_of_Frost] = {0, 8, 0 }, - [L.Aura_Blockade_of_Storms] = {0, 8, 0 }, - [L.Aura_Blockade_of_Cinders] = {0, 8, 0 }, - [L.Aura_Weakness_To_Elements] = {0, 21, 0 }, - [L.Aura_Elemental_Drain] = {0, 21, 0 }, - [L.Aura_Elemental_Susceptibility] = {0, 24, 0 }, - [L.Aura_Greater_Distribution] = {0, 18, 0, 18}, - [L.Aura_Elemental_Ring] = {0, 10, 0 }, - [L.Aura_Fire_Ring] = {0, 10, 0 }, - [L.Aura_Frost_Ring] = {0, 10, 0 }, - [L.Aura_Shock_Ring] = {0, 10, 0 }, - [L.Aura_Pulsar] = {0, 33, 0 }, - [L.Aura_Fiery_Pulsar] = {0, 33, 0 }, - [L.Aura_Icy_Pulsar] = {0, 33, 0 }, - [L.Aura_Electric_Pulsar] = {0, 33, 0 }, - - -- RESTORATION_STAFF --------------------------------- - [L.Aura_Grand_Healing] = {3, 0, 0 }, - [L.Aura_Healing_Springs] = {3, 0, 0 }, - [L.Aura_Illustrious_Healing] = {4, 0, 0 }, - [L.Aura_Regeneration] = {20, 0, 0 }, - [L.Aura_Mutagen] = {20, 0, 0 }, - [L.Aura_Rapid_Regeneration] = {16.5, 0, 0 }, - [L.Aura_Blessing_Of_Protection] = {8, 0, 0 }, - [L.Aura_Blessing_Of_Restoration]= {15, 0, 0 }, - [L.Aura_Combat_Prayer] = {8, 0, 0 }, - [L.Aura_Steadfast_Ward] = {6, 0, 0 }, -- damage shield - [L.Aura_Healing_Ward] = {6, 0, 0 }, -- damage shield - [L.Aura_Ward_Ally] = {6, 0, 0 }, -- damage shield - [L.Aura_Force_Siphon] = {0, 20, 1.5 }, - [L.Aura_Quick_Siphon] = {0, 20, 0 }, - [L.Aura_Siphon_Spirit] = {0, 20, 1.5 }, - - -- --------------------------------------------------- - -- ARMOUR -------------------------------------------- - -- --------------------------------------------------- - - -- LIGHT_ARMOUR -------------------------------------- - [L.Aura_Annulment] = {20, 0, 0 }, -- damage shield - [L.Aura_Dampen_Magic] = {20, 0, 0 }, -- damage shield - [L.Aura_Harness_Magicka] = {20, 0, 0 }, -- damage shield - - -- MEDIUM_ARMOUR ------------------------------------- - [L.Aura_Evasion] = {20, 0, 0 }, - [L.Aura_Elude] = {23, 0, 0 }, - [L.Aura_Shuffle] = {23, 0, 0 }, - - -- HEAVY_ARMOUR -------------------------------------- - [L.Aura_Immovable] = {8, 0, 0 }, - [L.Aura_Immovable_Brute] = {8, 0, 0 }, - [L.Aura_Unstoppable] = {8.8, 0, 0 }, - - -- --------------------------------------------------- - -- GUILDS -------------------------------------------- - -- --------------------------------------------------- - - -- FIGHTERS_GUILD ------------------------------------ - [L.Aura_Expert_Hunter] = {10, 0, 0 }, -- need special case to track the ever extending nature - [L.Aura_Evil_Hunter] = {13, 0, 0 }, -- need special case to track the ever extending nature - [L.Aura_Camouflaged_Hunter] = {13, 0, 0 }, -- need special case to track the ever extending nature - [L.Aura_Circle_of_Protection] = {20, 0, 0 }, - [L.Aura_Turn_Undead] = {20, 0, 0 }, - [L.Aura_Ring_of_Preservation] = {20, 0, 0 }, - [L.Aura_Beast_Trap] = {0, 24, 0 }, -- added Beast Trap - [L.Aura_Rearming_Trap] = {0, 24, 0 }, -- added Beast Trap Morph - [L.Aura_LightweightBeast_Trap] = {0, 24, 0 }, -- added Beast Trap Morph - - -- MAGES_GUILD --------------------------------------- - [L.Aura_Meteor] = {0, 12, 0 }, - [L.Aura_Ice_Comet] = {0, 12, 0 }, - [L.Aura_Shooting_Star] = {0, 12, 0 }, - [L.Aura_Entropy] = {20, 14.4, 0, 2 }, --corrections for debuff, buff (major sorcery) is always 20s - [L.Aura_Degeneration] = {20, 14.4, 0, 2 }, - [L.Aura_Structured_Entropy] = {20, 14.4, 0, 2 }, - [L.Aura_Equilibrium] = {0, 4, 0 }, - [L.Aura_Spell_Symmetry] = {5, 4, 0 }, - [L.Aura_Balance] = {24, 4, 0 }, - - -- UNDAUNTED ----------------------------------------- - [L.Aura_Inner_Fire] = {0, 15, 0 }, - [L.Aura_Inner_Rage] = {0, 15, 0 }, - [L.Aura_Inner_Beast] = {0, 15, 0 }, - [L.Aura_Bone_Shield] = {6, 0, 0 }, - [L.Aura_Bone_Surge] = {6, 0, 0 }, - [L.Aura_Spiked_Bone_Shield] = {6, 0, 0 }, - - -- --------------------------------------------------- - -- WORLD --------------------------------------------- - -- --------------------------------------------------- - - -- SOUL_MAGIC ---------------------------------------- - [L.Aura_Soul_Strike] = {0, 2.85, 0 }, - [L.Aura_Shatter_Soul] = {0, 2.85, 0 }, - [L.Aura_Soul_Assault] = {0, 3.85, 0 }, - [L.Aura_Soul_Trap] = {0, 10, 0 }, - [L.Aura_Consuming_Trap] = {0, 10, 0 }, - [L.Aura_Soul_Splitting_Trap] = {0, 10, 0 }, - - -- WEREWOLF ------------------------------------------ - [L.Aura_Hircines_Rage] = {17, 0, 0 }, - [L.Aura_Hircines_Fortitude] = {8, 0, 0 }, - [L.Aura_Roar] = {0, 3.5, 1 }, - [L.Aura_Ferocious_Roar] = {0, 4.25, 1 }, - [L.Aura_Rousing_Roar] = {4, 3.5, 1, 3 }, - [L.Aura_Piercing_Howl] = {0, 3, 0 }, - [L.Aura_Howl_of_Despair] = {0, 3, 0 }, - [L.Aura_Howl_of_Agony] = {0, 3, 0 }, - [L.Aura_Infectious_Claws] = {0, 10, 0 }, - [L.Aura_Claws_of_Anguish] = {0, 10, 0 }, - [L.Aura_Claws_of_Life] = {0, 10, 0 }, - - -- VAMPIRE ------------------------------------------- - [L.Aura_Bat_Swarm] = {0, 5, 0 }, - [L.Aura_Clouding_Swarm] = {0, 5, 0 }, - [L.Aura_Devouring_Swarm] = {0, 5, 0 }, - [L.Aura_Drain_Essence] = {3, 3, 0 }, - [L.Aura_Invigorating_Drain] = {3, 3, 0 }, - [L.Aura_Midnight_Drain] = {3, 3, 0 }, - [L.Aura_Mist_Form] = {3, 0, 0 }, - [L.Aura_Elusive_Mist] = {4, 0, 0 }, - [L.Aura_Poison_Mist] = {4, 0, 0 }, - - -- --------------------------------------------------- - -- ALLIANCE_WAR -------------------------------------- - -- --------------------------------------------------- - - -- ASSAULT ------------------------------------------- - [L.Aura_War_Horn] = {27, 0, 0 }, -- max rank is tracked by game --- [L.Aura_Aggressive_Horn] = {30, 0, 0 }, -- Tracked by the game --- [L.Aura_Sturdy_Horn] = {30, 0, 0 }, -- Tracked by the game - [L.Aura_Rapid_Maneuver] = {20, 0, 0 }, -- can end early on making an attack - [L.Aura_Charging_Maneuver] = {20, 0, 0 }, -- can end early on making an attack - [L.Aura_Retreating_Maneuver] = {20, 0, 0 }, -- can end early on making an attack - [L.Aura_Caltrops] = {0, 27, 1 }, -- fake cast time for ground targeted skill - [L.Aura_Anti_Cavalry_Caltrops] = {0, 35, 1 }, -- fake cast time for ground targeted skill - [L.Aura_Razor_Caltrops] = {0, 30, 1 }, -- fake cast time for ground targeted skill - [L.Aura_Magicka_Detonation] = {0, 4, 1.8 }, - [L.Aura_Inevitable_Detonation] = {0, 4, 2 }, - [L.Aura_Proximity_Detonation] = {0, 4, 1.8 }, - [L.Aura_Vigor] = {5, 0, 0 }, - [L.Aura_Echoing_Vigor] = {5, 0, 0 }, - [L.Aura_Resolving_Vigor] = {5, 0, 0 }, - - -- SUPPORT ------------------------------------------- --- [L.Aura_Barrier] = {30, 0, 0 }, -- damage shield | Tracked by the game --- [L.Aura_Replenishing_Barrier] = {30, 0, 0 }, -- damage shield | Tracked by the game --- [L.Aura_Reviving_Barrier] = {30, 0, 0 }, -- damage shield | Tracked by the game - [L.Aura_Siege_Shield] = {17, 0, 0 }, -- damage shield - [L.Aura_Propelling_Shield] = {20, 0, 0 }, -- damage shield - [L.Aura_Siege_Weapon_Shield] = {20, 0, 0 }, -- damage shield - [L.Aura_Purge] = {3, 0, 0 }, - [L.Aura_Cleanse] = {6, 0, 0 }, - [L.Aura_Efficient_Purge] = {6, 0, 0 }, - - -- --------------------------------------------------- - -- CLASS:_DRAGONKNIGHT ------------------------------- - -- --------------------------------------------------- - - -- ARDENT_FLAME -------------------------------------- - [L.Aura_Dragonknight_Standard] = {17, 17, 0 }, - [L.Aura_Shifting_Standard] = {17, 17, 0 }, - [L.Aura_Standard_of_Might] = {17, 17, 0 }, - [L.Aura_Searing_Strike] = {0, 10.5, 0 }, - [L.Aura_Unstable_Flame] = {0, 10.5, 0 }, - [L.Aura_Burning_Embers] = {0, 10.5, 0 }, - [L.Aura_Fiery_Breath] = {0, 10, 0 }, - [L.Aura_Burning_Breath] = {0, 10, 0 }, - [L.Aura_Engulfing_Flames] = {0, 10, 0 }, - [L.Aura_Power_Lash] = {0, 2, 0 }, - - -- DRACONIC_POWER ------------------------------------ - [L.Aura_Ferocious_Leap] = {6, 0, 0 }, - [L.Aura_Spiked_Armor] = {20, 0, 0 }, - [L.Aura_Volatile_Armor] = {20, 0, 0 }, - [L.Aura_Hardened_Armor] = {20, 0, 0 }, - [L.Aura_Dark_Talons] = {0, 4, 0 }, - [L.Aura_Burning_Talons] = {0, 4, 0 }, - [L.Aura_Choking_Talons] = {0, 4, 0 }, - [L.Aura_Dragon_Blood] = {23, 0, 0 }, - [L.Aura_Green_Dragon_Blood] = {23, 0, 0 }, - [L.Aura_Coagulating_Blood] = {23, 0, 0 }, - [L.Aura_Reflective_Scale] = {4, 0, 0 }, - [L.Aura_Reflective_Plate] = {4, 0, 0 }, - [L.Aura_Dragon_Fire_Scale] = {4, 0, 0 }, - - -- EARTHEN_HEART ------------------------------------- - [L.Aura_Magma_Armor] = {10.8, 0, 0 }, - [L.Aura_Magma_Shell] = {10.8, 0, 0 }, - [L.Aura_Corrosive_Armor] = {10.8, 0, 0 }, - [L.Aura_Stonefist] = {0, 3.6, 0 }, - [L.Aura_Obsidian_Shard] = {0, 3.6, 0 }, - [L.Aura_Stone_Giant] = {21.6, 3.6, 0, 2 }, - [L.Aura_Molten_Weapons] = {9.6, 0, 0 }, - [L.Aura_Igneous_Weapons] = {9.6, 0, 0 }, - [L.Aura_Molten_Armaments] = {9.6, 0, 0 }, - [L.Aura_Obsidian_Shield] = {24, 0, 0 }, -- damage shield - [L.Aura_Fragmented_Shield] = {24, 0, 0 }, -- damage shield - [L.Aura_Igneous_Shield] = {24, 0, 0 }, -- damage shield - [L.Aura_Petrify] = {0, 24, 0 }, - [L.Aura_Fossilize] = {0, 24, 0 }, - [L.Aura_Shattering_Rocks] = {0, 24, 0 }, - [L.Aura_Ash_Cloud] = {0, 18, 0 }, - [L.Aura_Cinder_Storm] = {0, 18, 0 }, - [L.Aura_Eruption] = {0, 18, 0 }, - - -- --------------------------------------------------- - -- CLASS:_SORCERER ----------------------------------- - -- --------------------------------------------------- - - -- DAEDRIC_SUMMONING --------------------------------- - [L.Aura_Summon_Storm_Atronach] = {0, 18, 0 }, - [L.Aura_Greater_Storm_Atronach] = {0, 28, 0 }, - [L.Aura_Summon_Charged_Atronach]= {0, 18, 0 }, - [L.Aura_Daedric_Curse] = {0, 6, 0 }, - [L.Aura_Daedric_Prey] = {0, 6, 0 }, - [L.Aura_Velocious_Curse] = {0, 3.5, 0 }, - [L.Aura_Conjured_Ward] = {20, 0, 0 }, -- damage shield - [L.Aura_Empowered_Ward] = {20, 0, 0 }, -- damage shield - [L.Aura_Hardened_Ward] = {20, 0, 0 }, -- damage shield - - -- DARK_MAGIC ---------------------------------------- - [L.Aura_Negate_Magic] = {0, 11.4, 0 }, - [L.Aura_Absorption_Field] = {0, 11.4, 0 }, - [L.Aura_Suppression_Field] = {0, 11.4, 0 }, - [L.Aura_Crystal_Shard] = {0, 2.4, 1 }, - [L.Aura_Crystal_Blast] = {0, 2.4, 1 }, - [L.Aura_Crystal_Fragments] = {0, 2.4, 1 }, - [L.Aura_Encase] = {0, 5.4, 0 }, - [L.Aura_Restraining_Prison] = {0, 5.4, 0 }, - [L.Aura_Shattering_Prison] = {0, 5.4, 0 }, - [L.Aura_Rune_Prison] = {0, 19.9, 0 }, - [L.Aura_Rune_Cage] = {0, 19.9, 0 }, - [L.Aura_Weakening_Prison] = {0, 19.9, 0 }, - [L.Aura_Dark_Exchange] = {4, 0, 0 }, - [L.Aura_Dark_Conversion] = {4, 0, 0 }, - [L.Aura_Dark_Deal] = {4, 0, 0 }, - - -- STORM_CALLING ------------------------------------- - [L.Aura_Mages_Fury] = {0, 4, 0 }, - [L.Aura_Endless_Fury] = {0, 4, 0 }, - [L.Aura_Mages_Wrath] = {0, 4, 0 }, - [L.Aura_Lightning_Form] = {15, 0, 0 }, - [L.Aura_Boundless_Storm] = {15, 0, 0 }, - [L.Aura_Thundering_Presence] = {23, 0, 0 }, - [L.Aura_Lightning_Splash] = {0, 6, 0 }, - [L.Aura_Liquid_Lightning] = {0, 10, 0 }, - [L.Aura_Lightning_Flood] = {0, 6, 0 }, - [L.Aura_Surge] = {20, 0, 0 }, - [L.Aura_Critical_Surge] = {20, 0, 0 }, - [L.Aura_Power_Surge] = {40, 0, 0 }, - [L.Aura_Bolt_Escape] = {0, 2, 0, 3 }, - [L.Aura_Ball_of_Lightning] = {6.5, 2, 0, 3 }, - [L.Aura_Streak] = {0, 2, 0, 3 }, - - -- --------------------------------------------------- - -- CLASS:_NIGHTBLADE --------------------------------- - -- --------------------------------------------------- - - -- ASSASSINATION ------------------------------------- - [L.Aura_Teleport_Strike] = {0, 1.5, 0.8 }, - [L.Aura_Ambush] = {0, 1.5, 0.8 }, - [L.Aura_Lotus_Fan] = {0, 6, 0.8 }, - [L.Aura_Blur] = {26, 0, 0 }, - [L.Aura_Double_Take] = {26, 0, 0 }, - [L.Aura_Mirage] = {26, 0, 0 }, - [L.Aura_Mark_Target] = {0, 60, 0 }, - [L.Aura_Piercing_Mark] = {0, 60, 0 }, - [L.Aura_Reapers_Mark] = {0, 60, 0 }, - [L.Aura_Grim_Focus] = {20, 0, 0 }, - [L.Aura_Relentless_Focus] = {20, 0, 0 }, - [L.Aura_Merciless_Resolve] = {20, 0, 0 }, - [L.Aura_Death_Stroke] = {0, 6, 0 }, - [L.Aura_Incapacitating_Strike] = {0, 6, 0 }, - [L.Aura_Soul_Harvest] = {0, 6, 0 }, - - -- SHADOW -------------------------------------------- - [L.Aura_Consuming_Darkness] = {0, 17.2, 0 }, - [L.Aura_Bolstering_Darkness] = {0, 17.2, 0 }, - [L.Aura_Veil_of_Blades] = {17.2, 17.2, 0 }, - [L.Aura_Shadow_Cloak] = {2.9, 0, 0 }, - [L.Aura_Shadowy_Disguise] = {2.9, 0, 0 }, - [L.Aura_Dark_Cloak] = {2.9, 0, 0 }, - [L.Aura_Veiled_Strike] = {0, 4.6, 0 }, - [L.Aura_Concealed_Weapon] = {0, 4.6, 0 }, - [L.Aura_Surprise_Attack] = {0, 17.2, 0 }, - [L.Aura_Path_of_Darkness] = {11.5, 11.5, 0 }, -- added Path of Darkness to Debuff Bar - [L.Aura_Refreshing_Path] = {11.5, 11.5, 0 }, -- added Refreshing Path to Debuff Bar - [L.Aura_Twisting_Path] = {11.5, 11.5, 0 }, -- added Twisting Path to Debuff Bar - [L.Aura_Aspect_of_Terror] = {0, 4.6, 0 }, - [L.Aura_Mass_Hysteria] = {0, 4.6, 0 }, - [L.Aura_Summon_Shade] = {23, 0, 0 }, - [L.Aura_Dark_Shades] = {23, 0, 0 }, - [L.Aura_Shadow_Image] = {23, 0, 0 }, - - -- SIPHONING ----------------------------------------- - [L.Aura_Soul_Shred] = {0, 3, 0 }, - [L.Aura_Soul_Siphon] = {4, 0, 0 }, - [L.Aura_Soul_Tether] = {8, 4.5, 0, 1 }, - [L.Aura_Strife] = {10, 0, 0 }, - [L.Aura_Funnel_Health] = {10, 0, 0 }, - [L.Aura_Swallow_Soul] = {10, 0, 0 }, - [L.Aura_Agony] = {0, 30, 1.2 }, -- can end early when target takes a damage - [L.Aura_Malefic_Wreath] = {0, 30, 1.2 }, -- dtto - [L.Aura_Prolonged_Suffering] = {0, 30, 1.2 }, -- dtto - [L.Aura_Cripple] = {8, 8, 0 }, - [L.Aura_Crippling_Grasp] = {8, 8, 0 }, - [L.Aura_Debilitate] = {8, 8, 0 }, - [L.Aura_Drain_Power] = {20, 0, 0 }, - [L.Aura_Power_Extraction] = {20, 0, 0 }, - [L.Aura_Sap_Essence] = {20, 0, 0 }, - - -- --------------------------------------------------- - -- CLASS:_TEMPLAR ------------------------------------ - -- --------------------------------------------------- - - -- AEDRIC_SPEAR -------------------------------------- - [L.Aura_Radial_Sweep] = {0, 6, 0 }, - [L.Aura_Empowering_Sweep] = {8, 6, 0, 3 }, - [L.Aura_Crescent_Sweep] = {0, 6, 0 }, - [L.Aura_Biting_Jabs] = {8, 0, 0 }, - [L.Aura_Binding_Javelin] = {0, 3.5, 0.5 }, -- Timer edited for more accuracy by Lumber - [L.Aura_Focused_Charge] = {0, 3, 0 }, -- Debuff occur only if target casting - [L.Aura_Explosive_Charge] = {0, 3, 0 }, -- Debuff occur only if target casting - [L.Aura_Toppling_Charge] = {0, 2.4, 0 }, -- Timer edited for more accuracy by Lumber (debuff lasts 5 sec if target casting) - [L.Aura_Spear_Shards] = {0, 6, 1.5 }, -- can end early if synergy is used by an other player - [L.Aura_Luminous_Shards] = {0, 6, 1.5 }, -- can end early if synergy is used by an other player - [L.Aura_Blazing_Spear] = {0, 6, 1.5 }, -- can end early if synergy is used by an other player - [L.Aura_Sun_Shield] = {6, 0, 0 }, -- damage shield - [L.Aura_Radiant_Ward] = {6, 0, 0 }, -- damage shield - [L.Aura_Blazing_Shield] = {6, 0, 0 }, -- damage shield - - -- DAWNS_WRATH --------------------------------------- - [L.Aura_Nova] = {0, 9.6, 0 }, - [L.Aura_Solar_Prison] = {0, 9.6, 0 }, - [L.Aura_Solar_Disturbance] = {0, 9.6, 0 }, - [L.Aura_Sun_Fire] = {6, 6, 0 }, - [L.Aura_Vampires_Bane] = {8.4, 8.4, 0, }, - [L.Aura_Reflective_Light] = {6, 6, 0 }, - [L.Aura_Dark_Flare] = {0, 7.2, 1.1 }, - [L.Aura_Backlash] = {0, 6, 0 }, - [L.Aura_Purifying_Light] = {7.2, 6, 0, 2 }, - [L.Aura_Power_of_the_Light] = {0, 6, 0 }, - [L.Aura_Eclipse] = {0, 6, 0 }, - [L.Aura_Total_Dark] = {0, 6, 0 }, - [L.Aura_Unstable_Core] = {0, 6, 0 }, - [L.Aura_Radiant_Destruction] = {0, 3.6, 0 }, - [L.Aura_Radiant_Glory] = {0, 3.6, 0 }, - [L.Aura_Radiant_Oppresion] = {0, 3.6, 0 }, - - -- RESTORING_LIGHT ----------------------------------- - [L.Aura_Rite_Of_Passage] = {4, 0, 0 }, - [L.Aura_Remembrance] = {4, 0, 0 }, - [L.Aura_Practiced_Incantation] = {6, 0, 0 }, - [L.Aura_Honor_The_Dead] = {8, 0, 0 }, -- buff occur only if target is under 50% health - [L.Aura_Lingering_Ritual] = {8, 0, 2 }, - [L.Aura_Restoring_Aura] = {18, 0, 0 }, - [L.Aura_Radiant_Aura] = {18, 0, 0 }, - [L.Aura_Cleansing_Ritual] = {12, 0, 0 }, - [L.Aura_Extended_Ritual] = {22, 0, 0 }, - [L.Aura_Purifying_Ritual] = {12, 0, 0 }, - [L.Aura_Rune_Focus] = {15, 0, 0 }, - [L.Aura_Channeled_Focus] = {15, 0, 0 }, - [L.Aura_Restoring_Focus] = {15, 0, 0 }, - - --triggered effects - [L.Trigger_Crystal_Fragments_Passive] = {8, 0, 0, 3 }, +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = Srendarr:GetLocale() + +-- UPVALUES -- +local GetAbilityName = GetAbilityName + +-- Major & Minor Effect Identifiers +local EFFECT_BERSERK = 1 +local EFFECT_BREACH = 2 +local EFFECT_BRUTALITY = 3 +local EFFECT_DEFILE = 4 +local EFFECT_ENDURANCE = 5 +local EFFECT_EROSION = 6 +local EFFECT_EVASION = 7 +local EFFECT_EXPEDITION = 8 +local EFFECT_FORCE = 9 +local EFFECT_FORTITUDE = 10 +local EFFECT_FRACTURE = 11 +local EFFECT_HEROISM = 12 +local EFFECT_INTELLECT = 13 +local EFFECT_MAIM = 14 +local EFFECT_MANGLE = 15 +local EFFECT_MENDING = 16 +local EFFECT_PROPHECY = 17 +local EFFECT_PROTECTION = 18 +local EFFECT_RESOLVE = 19 +local EFFECT_SAVAGERY = 20 +local EFFECT_SORCERY = 21 +local EFFECT_SPELL_SHATTER = 22 +local EFFECT_VITALITY = 23 +local EFFECT_WARD = 24 +local EFFECT_WOUND = 25 + +local minorEffects, majorEffects -- populated at the end of file due to how large they are (legibility reasons) + +local fakeAuras = { -- used to spawn fake auras to handle mismatch of information provided by the API to what user's want|need + [GetAbilityName(23634)] = {unitTag = 'groundaoe', duration = 18, abilityID = 200000}, -- Summon Storm Atronach + [GetAbilityName(23492)] = {unitTag = 'groundaoe', duration = 28, abilityID = 200001}, -- Greater Storm Atronach + [GetAbilityName(23495)] = {unitTag = 'groundaoe', duration = 18, abilityID = 200002}, -- Summon Charged Atronach + [GetAbilityName(33376)] = {unitTag = 'groundaoe', duration = 30, abilityID = 200003}, -- Caltrops + [GetAbilityName(40242)] = {unitTag = 'groundaoe', duration = 30, abilityID = 200004}, -- Razor Caltrops + [GetAbilityName(40255)] = {unitTag = 'groundaoe', duration = 35, abilityID = 200005}, -- Anti-Cavalry Caltrops } -local potionDurations = { - [1] = { --standard potions from loot or from vendor. Potions can be any level, so duration is just estimated. - [L.Potion_Sip] = 4, --lvl 1-5 3.3 + (1+5) / 2 * 0.257 = 4.071 - [L.Potion_Tincture] = 5.3, --lvl 6-10 - [L.Potion_Serum] = 6.6, --lvl 11-15 - [L.Potion_Dram] = 7.8, --lvl 16-20 - [L.Potion_Effusion] = 9.1, --lvl 21-35 - [L.Potion_Potion] = 10.4, --lvl 26-30 - [L.Potion_Draught] = 11.7, --lvl 31-35 - [L.Potion_Solution] = 13, --lvl 36-40 - [L.Potion_Philter] = 14.3, --lvl 41-45 - [L.Potion_Elixir] = 16.7, --lvl 46-51 3.3 + (46+51) / 2 * 0.257 = 15.7645 - [L.Potion_Panacea] = 18.2, --VR 5 - [L.Potion_Distillate] = 20.3, --VR 10 - [L.Potion_Essence] = 22.1, --VR 15 - }, - [2] = { --crafted 2 ingredients potions with long buff - [L.Potion_Sip] = 10.5, --lvl 3 9 + 4 * 0.375 = 10.425 (9 + itemLevel * 0.375) - [L.Potion_Tincture] = 13.1, --lvl 10 9 + 11 * 0.375 = 13.125 - [L.Potion_Dram] = 16.8, --lvl 20 9 + 21 * 0.375 = 16.875 - [L.Potion_Draught] = 20.6, --lvl 30 9 + 31 * 0.375 = 20.625 - [L.Potion_Solution] = 24.3, --lvl 40 9 + 41 * 0.375 = 24.375 - [L.Potion_Elixir] = 28.8, --VR 1 9 + 53 * 0.375 = 28.875 - [L.Potion_Panacea] = 31, --VR 5 9 + 59 * 0.375 = 31.125 - [L.Potion_Distillate] = 34, --VR 10 - [L.Potion_Essence] = 37, --VR 15 - }, - [3] = { --crafted 3 ingredients potions with long buff (+4 sec) - [L.Potion_Sip] = 14.5, --lvl 3 - [L.Potion_Tincture] = 17.1, --lvl 10 - [L.Potion_Dram] = 20.8, --lvl 20 - [L.Potion_Draught] = 24.6, --lvl 30 - [L.Potion_Solution] = 28.3, --lvl 40 - [L.Potion_Elixir] = 32.8, --VR 1 - [L.Potion_Panacea] = 35, --VR 5 - [L.Potion_Distillate] = 38, --VR 10 - [L.Potion_Essence] = 42, --VR 15 - }, - [4] = { --crafted 2 ingredients potions with short buff - [L.Potion_Sip] = 4.5, --lvl 3 4 + 4 * 0.129 = 4.516 - [L.Potion_Tincture] = 5.4, --lvl 10 4 + 11 * 0.129 = 5.419 - [L.Potion_Dram] = 6.7, --lvl 20 4 + 21 * 0.129 = 6.709 - [L.Potion_Draught] = 8, --lvl 30 4 + 31 * 0.129 = 7.999 - [L.Potion_Solution] = 9.3, --lvl 40 4 + 41 * 0.129 = 9.289 - [L.Potion_Elixir] = 10.8, --VR 1 4 + 53 * 0.129 = 10.837 - [L.Potion_Panacea] = 11.6, --VR 5 4 + 59 * 0.129 = 11.611 - [L.Potion_Distillate] = 12.4, --VR 10 - [L.Potion_Essence] = 13.2, --VR 15 - }, - [5] = { --crafted 3 ingredients potions with short buff (+2 sec) - [L.Potion_Sip] = 6.5, --lvl 3 - [L.Potion_Tincture] = 7.4, --lvl 10 - [L.Potion_Dram] = 8.7, --lvl 20 - [L.Potion_Draught] = 10, --lvl 30 - [L.Potion_Solution] = 11.3, --lvl 40 - [L.Potion_Elixir] = 12.8, --VR 1 - [L.Potion_Panacea] = 13.6, --VR 5 - [L.Potion_Distillate] = 14.4, --VR 10 - [L.Potion_Essence] = 15.2, --VR 15 - }, +local procAbilityNames = { -- using names rather than IDs to ease matching multiple IDs to multiple different IDs + [GetAbilityName(46324)] = false, -- Crystal Fragments -- special case, controlled by the actual aura + [GetAbilityName(61907)] = true, -- Assassin's Will + [GetAbilityName(23903)] = true, -- Power Lash + [GetAbilityName(62549)] = true, -- Deadly Throw } -local potionEffects = { --buff, debuff, potionType - --drop & vendor potions - [17302] = {true, false, 1}, --health - [17322] = {true, false, 1}, --magicka - [17328] = {true, false, 1}, --stamina - --crafted potions (positive effects) - [45221] = {true, false, 2}, --Health - [45223] = {true, false, 2}, --Magicka - [45225] = {true, false, 2}, --Stamina - [45227] = {true, false, 2}, --Spell Power - [45228] = {true, false, 2}, --Weapon Power - [45233] = {true, false, 2}, --Spell Protection - [45234] = {true, false, 2}, --Armor - [45235] = {true, false, 2}, --Speed - [45236] = {true, false, 2}, --Detection - [45237] = {true, false, 4}, --Invisiblity - [45239] = {true, false, 4}, --Immovability - [45241] = {true, false, 2}, --Weapon Crit - [45382] = {true, false, 3}, --Health (longer duration) - [45385] = {true, false, 3}, --Magicka (longer duration) - [45388] = {true, false, 3}, --Stamina (longer duration) - [45460] = {true, false, 5}, --Invisiblity (longer duration) - [45463] = {true, false, 5}, --Immovability (longer duration) - [45466] = {true, false, 3}, --Weapon Crit (longer duration) - [47193] = {true, false, 2}, --Spell Crit - [47195] = {true, false, 3}, --Spell Crit (longer duration) - --crafted potions (negative effects) - [46111] = {false, true, 2}, --Ravage Health - [46193] = {false, true, 2}, --Ravage Magicka - [46199] = {false, true, 2}, --Ravage Stamina - [46202] = {false, true, 2}, --Ravage Spell Power - [46204] = {false, true, 2}, --Ravage Weapon Power - [46206] = {false, true, 2}, --Ravage Spell Protection - [46210] = {false, true, 2}, --Slow - [46215] = {false, true, 3}, --Ravage Health (longer duration) - [46237] = {false, true, 3}, --Ravage Magicka (longer duration) - [46240] = {false, true, 3}, --Ravage Stamina (longer duration) - [46244] = {false, true, 2}, --Ravage Spell Power (longer duration) - [46246] = {false, true, 3}, --Ravage Weapon Power (longer duration) - [47203] = {false, true, 2}, --Ravage Weapon Critical - [47204] = {false, true, 2}, --Ravage Spell Critical - [47213] = {false, true, 2}, --Stun +Srendarr.crystalFragments = GetAbilityName(46324) -- special case for merging frags procs +Srendarr.crystalFragmentsPassive = GetAbilityName(46327) -- with the general proc system + +local toggledAuras = { -- there is a seperate abilityID for every rank of a skill + [23316] = true, -- Volatile Familiar + [30664] = true, -- Volatile Familiar + [30669] = true, -- Volatile Familiar + [30674] = true, -- Volatile Familiar + [23304] = true, -- Unstable Familiar + [30631] = true, -- Unstable Familiar + [30636] = true, -- Unstable Familiar + [30641] = true, -- Unstable Familiar + [23319] = true, -- Unstable Clannfear + [30647] = true, -- Unstable Clannfear + [30652] = true, -- Unstable Clannfear + [30657] = true, -- Unstable Clannfear + [24613] = true, -- Summon Winged Twilight + [30581] = true, -- Summon Winged Twilight + [30584] = true, -- Summon Winged Twilight + [30587] = true, -- Summon Winged Twilight + [24639] = true, -- Summon Twilight Matriarch + [30618] = true, -- Summon Twilight Matriarch + [30622] = true, -- Summon Twilight Matriarch + [30626] = true, -- Summon Twilight Matriarch + [24636] = true, -- Summon Twilight Tormentor + [30592] = true, -- Summon Twilight Tormentor + [30595] = true, -- Summon Twilight Tormentor + [30598] = true, -- Summon Twilight Tormentor + [61529] = true, -- Stalwart Guard + [63341] = true, -- Stalwart Guard + [63346] = true, -- Stalwart Guard + [63351] = true, -- Stalwart Guard +-- [32881] = true, -- Sea of Flames +-- [34088] = true, -- Sea of Flames +-- [34094] = true, -- Sea of Flames +-- [34100] = true, -- Sea of Flames +-- [40483] = true, -- Radiant Magelight +-- [42443] = true, -- Radiant Magelight +-- [42449] = true, -- Radiant Magelight +-- [42455] = true, -- Radiant Magelight + [61536] = true, -- Mystic Guard + [63323] = true, -- Mystic Guard + [63329] = true, -- Mystic Guard + [63335] = true, -- Mystic Guard +-- [30920] = true, -- Magelight +-- [42410] = true, -- Magelight +-- [42414] = true, -- Magelight +-- [42418] = true, -- Magelight + [36908] = true, -- Leeching Strikes + [37989] = true, -- Leeching Strikes + [38002] = true, -- Leeching Strikes + [38015] = true, -- Leeching Strikes +-- [40478] = true, -- Inner Light +-- [42422] = true, -- Inner Light +-- [42426] = true, -- Inner Light +-- [42430] = true, -- Inner Light +-- [28967] = true, -- Inferno +-- [34051] = true, -- Inferno +-- [34056] = true, -- Inferno +-- [34061] = true, -- Inferno + [61511] = true, -- Guard + [63308] = true, -- Guard + [63313] = true, -- Guard + [63318] = true, -- Guard +-- [32853] = true, -- Flames of Oblivion +-- [34066] = true, -- Flames of Oblivion +-- [34073] = true, -- Flames of Oblivion +-- [34080] = true, -- Flames of Oblivion + [24158] = true, -- Bound Armor + [30410] = true, -- Bound Armor + [30414] = true, -- Bound Armor + [30418] = true, -- Bound Armor + [24165] = true, -- Bound Armaments + [30422] = true, -- Bound Armaments + [30427] = true, -- Bound Armaments + [30432] = true, -- Bound Armaments + [24163] = true, -- Bound Aegis + [30437] = true, -- Bound Aegis + [30441] = true, -- Bound Aegis + [30445] = true, -- Bound Aegis + [116007] = true, -- Sample Aura (FAKE) + [116008] = true, -- Sample Aura (FAKE) } -local toggledEffects = { - [L.Toggled_Inferno] = true, - [L.Toggled_Flames_Of_Oblivion] = true, - [L.Toggled_Sea_Of_Flames] = true, - [L.Toggled_Unstable_Familiar] = true, - [L.Toggled_Unstable_Clannfear] = true, - [L.Toggled_Volatile_Familiar] = true, - [L.Toggled_Summon_Winged_Twilight] = true, - [L.Toggled_Summon_Restoring_Twilight] = true, - [L.Toggled_Summon_Twilight_Matriarch] = true, - [L.Toggled_Bound_Armor] = true, - [L.Toggled_Bound_Armaments] = true, - [L.Toggled_Bound_Aegis] = true, - [L.Toggled_Siphoning_Strikes] = true, - [L.Toggled_Leeching_Strikes] = true, - [L.Toggled_Siphoning_Attacks] = true, - [L.Toggled_Magelight] = true, - [L.Toggled_Inner_Light] = true, - [L.Toggled_Radiant_Magelight] = true, -} - -local damageShields = { - [L.DamageShield_Shielded_Assault] = true, - [L.DamageShield_Brawler] = true, - [L.DamageShield_Steadfast_Ward] = true, - [L.DamageShield_Ward_Ally] = true, - [L.DamageShield_Healing_Ward] = true, - [L.DamageShield_Annulment] = true, - [L.DamageShield_Dampen_Magic] = true, - [L.DamageShield_Harness_Magicka] = true, - [L.DamageShield_Barrier] = true, - [L.DamageShield_Replenishing_Barrier] = true, - [L.DamageShield_Reviving_Barrier] = true, --- [L.DamageShield_Hardened_Armor] = true, - [L.DamageShield_Obsidian_Shield] = true, - [L.DamageShield_Fragmented_Shield] = true, - [L.DamageShield_Igneous_Shield] = true, - [L.DamageShield_Conjured_Ward] = true, - [L.DamageShield_Empowered_Ward] = true, - [L.DamageShield_Hardened_Ward] = true, - [L.DamageShield_Sun_Shield] = true, - [L.DamageShield_Radiant_Ward] = true, - [L.DamageShield_Blazing_Shield] = true, -} - -local vampLycanEffects = { - [L.VampLycan_Fed_on_ally] = true, - [L.VampLycan_Bit_an_ally] = true, - [L.VampLycan_Dark_Stalker] = true, - [L.VampLycan_Supernatural_Recovery] = true, - [L.VampLycan_Stage_1_Vampirism] = true, - [L.VampLycan_Stage_2_Vampirism] = true, - [L.VampLycan_Stage_3_Vampirism] = true, - [L.VampLycan_Stage_4_Vampirism] = true, - [L.VampLycan_Vampirism] = true, - [L.VampLycan_Lycanthropy] = true, - [L.VampLycan_Call_of_the_Pack] = true, - [L.VampLycan_Sanies_Lupinus] = true, -} -local ignoredEffects = { - --alchemy - [L.Passive_MedicinalUse] = true, - --champion points - [L.Passive_SpellShield] = true, - [L.Passive_Nourishing] = true, - --night blade - [L.Passive_SoulSiphoner] = true, - --light armor - [L.Passive_Concentration] = true, - --ESO Plus - [L.Passive_ESO_Plus_Member] = true, +-- ------------------------ +-- MAIN FILTER TABLES +-- ------------------------ +local filterAlwaysIgnored = { + [29667] = true, -- Concentration (Light Armour) + [40359] = true, -- Fed On Ally (Vampire) + [45569] = true, -- Medicinal Use (Alchemy) + [62760] = true, -- Spell Shield (Champion Point Ability) + [63601] = true, -- ESO Plus Member + [64160] = true, -- Crystal Fragments Passive (Not Timed) + [36603] = true, -- Soul Siphoner Passive I + [45155] = true, -- Soul Siphoner Passive II + [57472] = true, -- Rapid Maneuver (Extra Aura) + [57475] = true, -- Rapid Maneuver (Extra Aura) + [57474] = true, -- Rapid Maneuver (Extra Aura) + [57476] = true, -- Rapid Maneuver (Extra Aura) + [57480] = true, -- Rapid Maneuver (Extra Aura) + [57481] = true, -- Rapid Maneuver (Extra Aura) + [64945] = true, -- Guard Regen (Guarded Extra) + [64946] = true, -- Guard Regen (Guarded Extra) + [46672] = true, -- Propelling Shield (Extra Aura) + [42197] = true, -- Spinal Surge (Extra Aura) + [42198] = true, -- Spinal Surge (Extra Aura) + [62587] = true, -- Focused Aim (2s Refreshing Aura) + [42589] = true, -- Flawless Dawnbreaker (2s aura on Weaponswap) } -local isProc = { - [L.Trigger_Assassins_Will] = true, - [L.Trigger_Power_Lash] = true, - [L.Trigger_Deadly_Throw] = true, +local filterAuraGroups = { + ['block'] = { + [14890] = true, -- Brace (Generic) + }, + ['cyrodiil'] = { +-- [11341] = true, -- Enemy Keep Bonus I + [15058] = true, -- Offensive Scroll Bonus I + [15060] = true, -- Defensive Scroll Bonus I + [16348] = true, -- Offensive Scroll Bonus II + [16350] = true, -- Defensive Scroll Bonus II + [39671] = true, -- Emperorship Alliance Bonus + }, + ['disguise'] = { + -- intentionally empty table just so setup can iterate through filters more simply + }, + ['mundusBoon'] = { + [13940] = true, -- Boon: The Warrior + [13943] = true, -- Boon: The Mage + [13974] = true, -- Boon: The Serpent + [13975] = true, -- Boon: The Thief + [13976] = true, -- Boon: The Lady + [13977] = true, -- Boon: The Steed + [13978] = true, -- Boon: The Lord + [13979] = true, -- Boon: The Apprentice + [13980] = true, -- Boon: The Ritual + [13981] = true, -- Boon: The Lover + [13982] = true, -- Boon: The Atronach + [13984] = true, -- Boon: The Shadow + [13985] = true, -- Boon: The Tower + }, + ['soulSummons'] = { + [39269] = true, -- Soul Summons (Rank 1) + [45590] = true, -- Soul Summons (Rank 2) + }, + ['vampLycan'] = { + [35658] = true, -- Lycanthropy + [35771] = true, -- Stage 1 Vampirism (trivia: has a duration even though others don't) + [35773] = true, -- Stage 2 Vampirism + [35780] = true, -- Stage 3 Vampirism + [35786] = true, -- Stage 4 Vampirism + [35792] = true, -- Stage 4 Vampirism + [39472] = true, -- Vampirism + [40521] = true, -- Sanies Lupinus + }, + ['vampLycanBite'] = { + [40525] = true, -- Bit an ally + [40539] = true, -- Fed on ally + }, } -local hasProc = { - [L.Aura_Crystal_Fragments] = L.Trigger_Crystal_Fragments_Passive, +local filteredAuras = { -- used to hold the abilityIDs of filtered auras + ['player'] = {}, + ['reticleover'] = {}, + ['groundaoe'] = {} } -local isMagesGuild = { - [L.Aura_Meteor] = true, - [L.Aura_Ice_Comet] = true, - [L.Aura_Shooting_Star] = true, - [L.Toggled_Magelight] = true, - [L.Toggled_Inner_Light] = true, - [L.Toggled_Radiant_Magelight] = true, - [L.MagesGuild_Fire_Rune] = true, - [L.MagesGuild_Volcanic_Rune] = true, - [L.MagesGuild_Scalding_Rune] = true, - [L.Aura_Entropy] = true, - [L.Aura_Degeneration] = true, - [L.Aura_Structured_Entropy] = true, - [L.Aura_Equilibrium] = true, - [L.Aura_Spell_Symmetry] = true, - [L.Aura_Balance] = true, -} +for id in pairs(filterAlwaysIgnored) do -- populate initial ignored auras to filters + filteredAuras['player'][id] = true + filteredAuras['reticleover'][id] = true + filteredAuras['groundaoe'][id] = true +end -- run once on init of addon -local isArdentFlame = { - [L.Aura_Dragonknight_Standard] = true, - [L.Aura_Shifting_Standard] = true, - [L.Aura_Standard_of_Might] = true, - [L.Aura_Fiery_Grip] = true, - [L.Aura_Extended_Chains] = true, - [L.Aura_Empowering_Chains] = true, - [L.Aura_Searing_Strike] = true, - [L.Aura_Unstable_Flame] = true, - [L.Aura_Burning_Embers] = true, - [L.Aura_Fiery_Breath] = true, - [L.Aura_Burning_Breath] = true, - [L.Aura_Engulfing_Flames] = true, - [L.Aura_Lava_Whip ] = true, - [L.Aura_Molten_Whip] = true, - [L.Aura_Flame_Lash] = true, - [L.Aura_Power_Lash] = true, - [L.Toggled_Inferno] = true, - [L.Toggled_Flames_Of_Oblivion] = true, - [L.Toggled_Sea_Of_Flames] = true, -} +Srendarr.fakeAuras = fakeAuras -- set external reference +Srendarr.filteredAuras = filteredAuras -- set external reference +Srendarr.procAbilityNames = procAbilityNames -- set external reference -local isEarthenHeart = { - [L.Aura_Magma_Armor] = true, - [L.Aura_Magma_Shell] = true, - [L.Aura_Corrosive_Armor] = true, - [L.Aura_Stonefist] = true, - [L.Aura_Obsidian_Shard] = true, - [L.Aura_Stone_Giant] = true, - [L.Aura_Molten_Weapons] = true, - [L.Aura_Igneous_Weapons] = true, - [L.Aura_Molten_Armaments] = true, - [L.Aura_Obsidian_Shield] = true, - [L.Aura_Fragmented_Shield] = true, - [L.Aura_Igneous_Shield] = true, - [L.Aura_Petrify] = true, - [L.Aura_Fossilize] = true, - [L.Aura_Shattering_Rocks] = true, - [L.Aura_Ash_Cloud] = true, - [L.Aura_Cinder_Storm] = true, - [L.Aura_Eruption] = true, -} - -local isDarkMagic = { - [L.Aura_Negate_Magic] = true, - [L.Aura_Absorption_Field] = true, - [L.Aura_Suppression_Field] = true, - [L.Aura_Crystal_Shard] = true, - [L.Aura_Crystal_Blast] = true, - [L.Aura_Crystal_Fragments] = true, - [L.Aura_Encase] = true, - [L.Aura_Restraining_Prison] = true, - [L.Aura_Shattering_Prison] = true, - [L.Aura_Rune_Prison] = true, - [L.Aura_Rune_Cage] = true, - [L.Aura_Weakening_Prison] = true, - [L.Aura_Dark_Exchange] = true, - [L.Aura_Dark_Conversion] = true, - [L.Aura_Dark_Deal] = true, - [L.Aura_Daedric_Mines] = true, - [L.Aura_Daedric_Minefield] = true, - [L.Aura_Daedric_Tomb] = true, -} -local isShadow = { - [L.Aura_Consuming_Darkness] = true, - [L.Aura_Bolstering_Darkness] = true, - [L.Aura_Veil_of_Blades] = true, - [L.Aura_Shadow_Cloak] = true, - [L.Aura_Shadowy_Disguise] = true, - [L.Aura_Dark_Cloak] = true, - [L.Aura_Veiled_Strike] = true, - [L.Aura_Concealed_Weapon] = true, - [L.Aura_Surprise_Attack] = true, - [L.Aura_Path_of_Darkness] = true, - [L.Aura_Refreshing_Path] = true, - [L.Aura_Twisting_Path] = true, - [L.Aura_Aspect_of_Terror] = true, - [L.Aura_Mass_Hysteria] = true, - [L.Aura_Manifestation_of_Terror] = true, - [L.Aura_Summon_Shade] = true, - [L.Aura_Dark_Shades] = true, - [L.Aura_Shadow_Image] = true, -} - -local isDawnsWrath = { - [L.Aura_Nova] = true, - [L.Aura_Solar_Prison] = true, - [L.Aura_Solar_Disturbance] = true, - [L.Aura_Sun_Fire] = true, - [L.Aura_Vampires_Bane] = true, - [L.Aura_Reflective_Light] = true, - [L.Aura_Solar_Flare] = true, - [L.Aura_Dark_Flare] = true, - [L.Aura_Solar_Barrage] = true, - [L.Aura_Backlash] = true, - [L.Aura_Purifying_Light] = true, - [L.Aura_Power_of_the_Light] = true, - [L.Aura_Eclipse] = true, - [L.Aura_Total_Dark] = true, - [L.Aura_Unstable_Core] = true, - [L.Aura_Radiant_Destruction] = true, - [L.Aura_Radiant_Glory] = true, - [L.Aura_Radiant_Oppresion] = true, -} - -function Srendarr:GetAuraData(ability) - local data = data[ability] - if (data) then - return (data[1] > 0) and data[1] or false, (data[2] > 0) and data[2] or false, data[3], data[4] - end - return false, false, 0 +-- ------------------------ +-- AURA DATA FUNCTIONS +-- ------------------------ +function Srendarr.IsToggledAura(abilityID) + return toggledAuras[abilityID] and true or false end -function Srendarr:IsDamageShield(ability) - return damageShields[ability] or false +function Srendarr.IsMajorEffect(abilityID) + return majorEffects[abilityID] and true or false end -function Srendarr:IsToggled(ability) - return toggledEffects[ability] or false +function Srendarr.IsMinorEffect(abilityID) + return minorEffects[abilityID] and true or false end -function Srendarr:IsProc(ability) - return isProc[ability] or false +function Srendarr:PopulateFilteredAuras() + for _, filterUnitTag in pairs(filteredAuras) do + for id in pairs(filterUnitTag) do + if (not filterAlwaysIgnored[id]) then + filterUnitTag[id] = nil -- clean out existing filters unless always ignored + end + end + end + + -- populate player aura filters + for filterGroup, doFilter in pairs(self.db.filtersPlayer) do + if (filterAuraGroups[filterGroup] and doFilter) then -- filtering this group for player + for id in pairs(filterAuraGroups[filterGroup]) do + filteredAuras.player[id] = true + end + end + end + + -- populate target aura filters + for filterGroup, doFilter in pairs(self.db.filtersTarget) do + if (doFilter) then + if (filterGroup == 'majorEffects') then -- special case for majorEffects + for id in pairs(majorEffects) do + filteredAuras.reticleover[id] = true + end + elseif (filterGroup == 'minorEffects') then -- special case for minorEffects + for id in pairs(minorEffects) do + filteredAuras.reticleover[id] = true + end + elseif (filterAuraGroups[filterGroup]) then + for id in pairs(filterAuraGroups[filterGroup]) do + filteredAuras.reticleover[id] = true + end + end + end + end + + -- populate ground aoe filters + -- + + -- add blacklisted auras to all filter tables + for _, filterForUnitTag in pairs(filteredAuras) do + for _, abilityIDs in pairs(self.db.blacklist) do + for id in pairs(abilityIDs) do + filterForUnitTag[id] = true + end + end + end end -function Srendarr:HasProc(ability) - return hasProc[ability] or false -end - -do --passive skill effects - local GetUnitClassId = GetUnitClassId - local GetSkillAbilityId = GetSkillAbilityId - local GetSkillAbilityInfo = GetSkillAbilityInfo - local GetSkillAbilityUpgradeInfo = GetSkillAbilityUpgradeInfo - - local passiveSkillEffects = { - --Dragon Knight --- ["Warmth"] = { name = false, buff = false, debuff = false, texture= "", abilityId = 0 }, - ["Mountain's Blessing"] = { name = false, buff = false, debuff = false, texture= "", abilityId = 0 }, - --Sorcerer - ["Exploitation"] = { name = false, buff = false, debuff = false, texture= "", abilityId = 0 }, - --Nightblade --- ["Hemorrhage"] = { name = false, buff = false, debuff = false, texture= "", abilityId = 0 }, - ["Shadow Barrier"] = { name = false, buff = false, debuff = false, texture= "", abilityId = 0 }, - --Templar - ["Illuminate"] = { name = false, buff = false, debuff = false, texture= "", abilityId = 0 }, - --Mages Guild - ["Might of the Guild"] = { name = false, buff = false, debuff = false, texture= "", abilityId = 0 }, - } - - local function GetSkillData(skillType, skillLine, abilityIndex) - local name, texture, _, _, _, purchased = GetSkillAbilityInfo(skillType, skillLine, abilityIndex) - if purchased then - local upgradeLevel = GetSkillAbilityUpgradeInfo(skillType, skillLine, abilityIndex) - local abilityId = GetSkillAbilityId(skillType, skillLine, abilityIndex, false) - - return name, texture, upgradeLevel, abilityId - end - return false, "", 0, 0 - end - function Srendarr:GetDragonKnightEffect(ability) - if isEarthenHeart[ability] then - local data = passiveSkillEffects["Mountain's Blessing"] - return data.name, data.buff, data.debuff, data.texture, data.abilityId - end - return false, false, false, "", 0 - end - - function Srendarr:GetSorcererEffect(ability) - if isDarkMagic[ability] then - local data = passiveSkillEffects["Exploitation"] - return data.name, data.buff, data.debuff, data.texture, data.abilityId - end - return false, false, false, "", 0 - end - - function Srendarr:GetNightbladeEffect(ability) - if isShadow[ability] then - local data = passiveSkillEffects["Shadow Barrier"] - return data.name, data.buff, data.debuff, data.texture, data.abilityId - end - return false, false, false, "", 0 - end +-- ------------------------ +-- MINOR & MAJOR EFFECT DATA +-- ------------------------ +minorEffects = { + [3929] = EFFECT_PROTECTION, + [9611] = EFFECT_WOUND, + [28347] = EFFECT_PROTECTION, + [29308] = EFFECT_MAIM, + [31818] = EFFECT_RESOLVE, + [31899] = EFFECT_MAIM, + [32733] = EFFECT_VITALITY, + [32761] = EFFECT_WARD, + [33228] = EFFECT_MAIM, + [37027] = EFFECT_VITALITY, + [37031] = EFFECT_VITALITY, + [37032] = EFFECT_VITALITY, + [37033] = EFFECT_VITALITY, + [37247] = EFFECT_RESOLVE, + [37472] = EFFECT_MAIM, + [38068] = EFFECT_MAIM, + [38072] = EFFECT_MAIM, + [38076] = EFFECT_MAIM, + [38688] = EFFECT_FRACTURE, + [38746] = EFFECT_HEROISM, + [38817] = EFFECT_MAIM, + [39168] = EFFECT_MANGLE, + [39180] = EFFECT_MANGLE, + [39181] = EFFECT_MANGLE, + [40185] = EFFECT_PROTECTION, + [42197] = EFFECT_VITALITY, + [42984] = EFFECT_MANGLE, + [42986] = EFFECT_MANGLE, + [42991] = EFFECT_MANGLE, + [42993] = EFFECT_MANGLE, + [42998] = EFFECT_MANGLE, + [43000] = EFFECT_MANGLE, + [61768] = EFFECT_RESOLVE, + [61769] = EFFECT_RESOLVE, + [61770] = EFFECT_RESOLVE, + [61798] = EFFECT_BRUTALITY, + [61799] = EFFECT_BRUTALITY, + [61817] = EFFECT_RESOLVE, + [61818] = EFFECT_RESOLVE, + [61819] = EFFECT_RESOLVE, + [61822] = EFFECT_RESOLVE, + [61854] = EFFECT_MAIM, + [61855] = EFFECT_MAIM, + [61856] = EFFECT_MAIM, + [61862] = EFFECT_WARD, + [61863] = EFFECT_WARD, + [61864] = EFFECT_WARD, + [61882] = EFFECT_SAVAGERY, + [61892] = EFFECT_VITALITY, + [61894] = EFFECT_VITALITY, + [61896] = EFFECT_VITALITY, + [61898] = EFFECT_SAVAGERY, + [62056] = EFFECT_ENDURANCE, + [62102] = EFFECT_ENDURANCE, + [62106] = EFFECT_ENDURANCE, + [62110] = EFFECT_ENDURANCE, + [62245] = EFFECT_PROTECTION, + [62246] = EFFECT_PROTECTION, + [62247] = EFFECT_PROTECTION, + [62319] = EFFECT_PROPHECY, + [62320] = EFFECT_PROPHECY, + [62336] = EFFECT_HEROISM, + [62337] = EFFECT_HEROISM, + [62338] = EFFECT_HEROISM, + [62339] = EFFECT_MAIM, + [62340] = EFFECT_MAIM, + [62341] = EFFECT_MAIM, + [62475] = EFFECT_RESOLVE, + [62477] = EFFECT_RESOLVE, + [62481] = EFFECT_RESOLVE, + [62483] = EFFECT_RESOLVE, + [62492] = EFFECT_MAIM, + [62493] = EFFECT_MAIM, + [62494] = EFFECT_MAIM, + [62495] = EFFECT_MAIM, + [62500] = EFFECT_MAIM, + [62501] = EFFECT_MAIM, + [62503] = EFFECT_MAIM, + [62504] = EFFECT_MAIM, + [62505] = EFFECT_HEROISM, + [62507] = EFFECT_MAIM, + [62508] = EFFECT_HEROISM, + [62509] = EFFECT_MAIM, + [62510] = EFFECT_HEROISM, + [62511] = EFFECT_MAIM, + [62512] = EFFECT_HEROISM, + [62582] = EFFECT_FRACTURE, + [62585] = EFFECT_FRACTURE, + [62588] = EFFECT_FRACTURE, + [62619] = EFFECT_WARD, + [62620] = EFFECT_RESOLVE, + [62621] = EFFECT_WARD, + [62622] = EFFECT_RESOLVE, + [62623] = EFFECT_WARD, + [62624] = EFFECT_RESOLVE, + [62625] = EFFECT_WARD, + [62626] = EFFECT_RESOLVE, + [62627] = EFFECT_WARD, + [62628] = EFFECT_RESOLVE, + [62629] = EFFECT_WARD, + [62630] = EFFECT_RESOLVE, + [62631] = EFFECT_WARD, + [62632] = EFFECT_RESOLVE, + [62633] = EFFECT_WARD, + [62634] = EFFECT_RESOLVE, + [62635] = EFFECT_WARD, + [62636] = EFFECT_BERSERK, + [62637] = EFFECT_RESOLVE, + [62638] = EFFECT_WARD, + [62639] = EFFECT_BERSERK, + [62640] = EFFECT_RESOLVE, + [62641] = EFFECT_WARD, + [62642] = EFFECT_BERSERK, + [62643] = EFFECT_RESOLVE, + [62644] = EFFECT_WARD, + [62645] = EFFECT_BERSERK, + [62799] = EFFECT_SORCERY, + [62800] = EFFECT_SORCERY, + [63340] = EFFECT_VITALITY, + [63532] = EFFECT_RESOLVE, + [63558] = EFFECT_EXPEDITION, + [63561] = EFFECT_EXPEDITION, + [63562] = EFFECT_EXPEDITION, + [63563] = EFFECT_EXPEDITION, + [63571] = EFFECT_WARD, + [63599] = EFFECT_RESOLVE, + [63600] = EFFECT_WARD, + [63602] = EFFECT_RESOLVE, + [63603] = EFFECT_WARD, + [63606] = EFFECT_RESOLVE, + [63607] = EFFECT_WARD, + [64047] = EFFECT_BERSERK, + [64048] = EFFECT_BERSERK, + [64050] = EFFECT_BERSERK, + [64051] = EFFECT_BERSERK, + [64052] = EFFECT_BERSERK, + [64053] = EFFECT_BERSERK, + [64054] = EFFECT_BERSERK, + [64055] = EFFECT_BERSERK, + [64056] = EFFECT_BERSERK, + [64057] = EFFECT_BERSERK, + [64058] = EFFECT_BERSERK, + [64080] = EFFECT_VITALITY, + [64081] = EFFECT_VITALITY, + [64082] = EFFECT_VITALITY, + [64144] = EFFECT_FRACTURE, + [64145] = EFFECT_FRACTURE, + [64146] = EFFECT_FRACTURE, + [64147] = EFFECT_FRACTURE, + [64178] = EFFECT_BERSERK, + [64255] = EFFECT_FRACTURE, + [64256] = EFFECT_BREACH, + [64258] = EFFECT_SORCERY, + [64259] = EFFECT_BRUTALITY, + [64260] = EFFECT_SAVAGERY, + [64261] = EFFECT_PROPHECY, + [64954] = EFFECT_EROSION, + [64955] = EFFECT_EROSION, + [64956] = EFFECT_EROSION, + [64957] = EFFECT_EROSION, + [68359] = EFFECT_MAIM, + [68512] = EFFECT_WARD, + [68513] = EFFECT_WARD, + [68514] = EFFECT_WARD, + [68515] = EFFECT_WARD, + [68588] = EFFECT_BREACH, + [68589] = EFFECT_BREACH, + [68591] = EFFECT_BREACH, + [68592] = EFFECT_BREACH, + [68595] = EFFECT_FORCE, + [68596] = EFFECT_FORCE, + [68597] = EFFECT_FORCE, + [68598] = EFFECT_FORCE, + [68628] = EFFECT_FORCE, + [68629] = EFFECT_FORCE, + [68630] = EFFECT_FORCE, + [68631] = EFFECT_FORCE, + [68632] = EFFECT_FORCE, + [68636] = EFFECT_FORCE, + [68638] = EFFECT_FORCE, + [68640] = EFFECT_FORCE, + [76037] = EFFECT_BERSERK, + [76564] = EFFECT_FORCE, + [76724] = EFFECT_PROTECTION, + [76725] = EFFECT_PROTECTION, + [76726] = EFFECT_PROTECTION, + [76727] = EFFECT_PROTECTION, + [77056] = EFFECT_PROTECTION, + [77057] = EFFECT_PROTECTION, + [77058] = EFFECT_PROTECTION, + [77059] = EFFECT_PROTECTION, + [77418] = EFFECT_INTELLECT, + [77419] = EFFECT_INTELLECT, + [77420] = EFFECT_INTELLECT, + [77421] = EFFECT_INTELLECT, +} - function Srendarr:GetTemplarEffect(ability) - if isDawnsWrath[ability] then - local data = passiveSkillEffects["Illuminate"] - return data.name, data.buff, data.debuff, data.texture, data.abilityId - end - return false, false, false, "", 0 - end +majorEffects = { + [18868] = EFFECT_WARD, + [21927] = EFFECT_DEFILE, + [22236] = EFFECT_RESOLVE, + [23216] = EFFECT_EXPEDITION, + [23673] = EFFECT_BRUTALITY, + [24153] = EFFECT_DEFILE, + [24686] = EFFECT_DEFILE, + [24702] = EFFECT_DEFILE, + [24703] = EFFECT_DEFILE, + [26220] = EFFECT_ENDURANCE, + [26795] = EFFECT_SAVAGERY, + [26809] = EFFECT_ENDURANCE, + [26999] = EFFECT_ENDURANCE, + [27005] = EFFECT_ENDURANCE, + [27011] = EFFECT_ENDURANCE, + [27020] = EFFECT_ENDURANCE, + [27026] = EFFECT_ENDURANCE, + [27032] = EFFECT_ENDURANCE, + [27190] = EFFECT_SAVAGERY, + [27194] = EFFECT_SAVAGERY, + [27198] = EFFECT_SAVAGERY, + [28307] = EFFECT_FRACTURE, + [29011] = EFFECT_FORTITUDE, + [29230] = EFFECT_DEFLIE, + [31759] = EFFECT_MENDING, + [32748] = EFFECT_ENDURANCE, + [33210] = EFFECT_EXPEDITION, + [33317] = EFFECT_BRUTALITY, + [33328] = EFFECT_EXPEDITION, + [33363] = EFFECT_BREACH, + [33399] = EFFECT_DEFILE, + [34734] = EFFECT_FRACTURE, + [36050] = EFFECT_EXPEDITION, + [36228] = EFFECT_FRACTURE, + [36232] = EFFECT_FRACTURE, + [36236] = EFFECT_FRACTURE, + [36509] = EFFECT_DEFILE, + [36515] = EFFECT_DEFILE, + [36894] = EFFECT_BRUTALITY, + [36903] = EFFECT_BRUTALITY, + [36946] = EFFECT_EXPEDITION, + [36959] = EFFECT_EXPEDITION, + [36972] = EFFECT_BREACH, + [36973] = EFFECT_BERSERK, + [36980] = EFFECT_BREACH, + [37511] = EFFECT_DEFILE, + [37515] = EFFECT_DEFILE, + [37519] = EFFECT_DEFILE, + [37523] = EFFECT_DEFILE, + [37528] = EFFECT_DEFILE, + [37533] = EFFECT_DEFILE, + [37538] = EFFECT_DEFILE, + [37542] = EFFECT_DEFILE, + [37546] = EFFECT_DEFILE, + [37591] = EFFECT_BREACH, + [37599] = EFFECT_BREACH, + [37607] = EFFECT_BREACH, + [37618] = EFFECT_BREACH, + [37627] = EFFECT_BREACH, + [37636] = EFFECT_BREACH, + [37645] = EFFECT_BERSERK, + [37654] = EFFECT_BERSERK, + [37663] = EFFECT_BERSERK, + [37789] = EFFECT_EXPEDITION, + [37793] = EFFECT_EXPEDITION, + [37797] = EFFECT_EXPEDITION, + [37852] = EFFECT_EXPEDITION, + [37859] = EFFECT_EXPEDITION, + [37866] = EFFECT_EXPEDITION, + [37873] = EFFECT_EXPEDITION, + [37881] = EFFECT_EXPEDITION, + [37889] = EFFECT_EXPEDITION, + [37897] = EFFECT_EXPEDITION, + [37906] = EFFECT_EXPEDITION, + [37915] = EFFECT_EXPEDITION, + [37924] = EFFECT_BRUTALITY, + [37927] = EFFECT_BRUTALITY, + [37930] = EFFECT_BRUTALITY, + [37933] = EFFECT_BRUTALITY, + [37936] = EFFECT_BRUTALITY, + [37939] = EFFECT_BRUTALITY, + [37942] = EFFECT_BRUTALITY, + [37947] = EFFECT_BRUTALITY, + [37952] = EFFECT_BRUTALITY, + [38686] = EFFECT_DEFILE, + [38838] = EFFECT_DEFILE, + [40175] = EFFECT_FORTITUDE, + [40225] = EFFECT_FORCE, + [40443] = EFFECT_FORTITUDE, + [42285] = EFFECT_FORTITUDE, + [42288] = EFFECT_FORTITUDE, + [42291] = EFFECT_FORTITUDE, + [44820] = EFFECT_WARD, + [44821] = EFFECT_WARD, + [44822] = EFFECT_RESOLVE, + [44823] = EFFECT_WARD, + [44824] = EFFECT_RESOLVE, + [44825] = EFFECT_WARD, + [44826] = EFFECT_RESOLVE, + [44827] = EFFECT_WARD, + [44828] = EFFECT_RESOLVE, + [44829] = EFFECT_WARD, + [44830] = EFFECT_RESOLVE, + [44831] = EFFECT_WARD, + [44832] = EFFECT_RESOLVE, + [44833] = EFFECT_WARD, + [44834] = EFFECT_RESOLVE, + [44835] = EFFECT_WARD, + [44836] = EFFECT_RESOLVE, + [44838] = EFFECT_WARD, + [44839] = EFFECT_RESOLVE, + [44840] = EFFECT_WARD, + [44841] = EFFECT_RESOLVE, + [44842] = EFFECT_WARD, + [44843] = EFFECT_RESOLVE, + [44854] = EFFECT_PROTECTION, + [44857] = EFFECT_PROTECTION, + [44859] = EFFECT_PROTECTION, + [44860] = EFFECT_PROTECTION, + [44862] = EFFECT_PROTECTION, + [44863] = EFFECT_PROTECTION, + [44864] = EFFECT_PROTECTION, + [44865] = EFFECT_PROTECTION, + [44866] = EFFECT_PROTECTION, + [44867] = EFFECT_PROTECTION, + [44868] = EFFECT_PROTECTION, + [44869] = EFFECT_PROTECTION, + [44871] = EFFECT_PROTECTION, + [44872] = EFFECT_PROTECTION, + [44874] = EFFECT_PROTECTION, + [44876] = EFFECT_PROTECTION, + [45076] = EFFECT_WARD, + [48078] = EFFECT_BERSERK, + [48946] = EFFECT_FRACTURE, + [53881] = EFFECT_SPELL_SHATTER, + [55033] = EFFECT_MENDING, + [58869] = EFFECT_DEFILE, + [61670] = EFFECT_BRUTALITY, + [61758] = EFFECT_MENDING, + [61759] = EFFECT_MENDING, + [61760] = EFFECT_MENDING, + [61815] = EFFECT_RESOLVE, + [61816] = EFFECT_WARD, + [61820] = EFFECT_RESOLVE, + [61821] = EFFECT_WARD, + [61823] = EFFECT_RESOLVE, + [61824] = EFFECT_WARD, + [61825] = EFFECT_RESOLVE, + [61826] = EFFECT_WARD, + [61827] = EFFECT_RESOLVE, + [61828] = EFFECT_WARD, + [61829] = EFFECT_RESOLVE, + [61830] = EFFECT_WARD, + [61831] = EFFECT_RESOLVE, + [61832] = EFFECT_WARD, + [61833] = EFFECT_EXPEDITION, + [61834] = EFFECT_WARD, + [61835] = EFFECT_RESOLVE, + [61836] = EFFECT_RESOLVE, + [61837] = EFFECT_WARD, + [61838] = EFFECT_EXPEDITION, + [61839] = EFFECT_EXPEDITION, + [61840] = EFFECT_EXPEDITION, + [61841] = EFFECT_RESOLVE, + [61842] = EFFECT_WARD, + [61843] = EFFECT_WARD, + [61844] = EFFECT_RESOLVE, + [61845] = EFFECT_WARD, + [61846] = EFFECT_RESOLVE, + [61871] = EFFECT_FORTITUDE, + [61872] = EFFECT_FORTITUDE, + [61873] = EFFECT_FORTITUDE, + [61884] = EFFECT_FORTITUDE, + [61885] = EFFECT_FORTITUDE, + [61886] = EFFECT_ENDURANCE, + [61887] = EFFECT_FORTITUDE, + [61888] = EFFECT_ENDURANCE, + [61889] = EFFECT_ENDURANCE, + [61890] = EFFECT_FORTITUDE, + [61891] = EFFECT_FORTITUDE, + [61893] = EFFECT_FORTITUDE, + [61895] = EFFECT_FORTITUDE, + [61897] = EFFECT_FORTITUDE, + [61909] = EFFECT_FRACTURE, + [61910] = EFFECT_FRACTURE, + [61911] = EFFECT_FRACTURE, + [62057] = EFFECT_BRUTALITY, + [62058] = EFFECT_BRUTALITY, + [62059] = EFFECT_BRUTALITY, + [62060] = EFFECT_BRUTALITY, + [62062] = EFFECT_SORCERY, + [62063] = EFFECT_BRUTALITY, + [62064] = EFFECT_SORCERY, + [62065] = EFFECT_BRUTALITY, + [62066] = EFFECT_SORCERY, + [62067] = EFFECT_BRUTALITY, + [62068] = EFFECT_SORCERY, + [62147] = EFFECT_BRUTALITY, + [62150] = EFFECT_BRUTALITY, + [62153] = EFFECT_BRUTALITY, + [62156] = EFFECT_BRUTALITY, + [62159] = EFFECT_RESOLVE, + [62160] = EFFECT_WARD, + [62161] = EFFECT_RESOLVE, + [62162] = EFFECT_WARD, + [62163] = EFFECT_RESOLVE, + [62164] = EFFECT_WARD, + [62165] = EFFECT_RESOLVE, + [62166] = EFFECT_WARD, + [62167] = EFFECT_WARD, + [62168] = EFFECT_RESOLVE, + [62169] = EFFECT_RESOLVE, + [62170] = EFFECT_WARD, + [62171] = EFFECT_RESOLVE, + [62172] = EFFECT_WARD, + [62173] = EFFECT_RESOLVE, + [62174] = EFFECT_WARD, + [62175] = EFFECT_RESOLVE, + [62176] = EFFECT_WARD, + [62179] = EFFECT_RESOLVE, + [62180] = EFFECT_WARD, + [62181] = EFFECT_EXPEDITION, + [62184] = EFFECT_RESOLVE, + [62185] = EFFECT_WARD, + [62186] = EFFECT_EXPEDITION, + [62189] = EFFECT_RESOLVE, + [62190] = EFFECT_WARD, + [62191] = EFFECT_EXPEDITION, + [62195] = EFFECT_BERSERK, + [62240] = EFFECT_SORCERY, + [62241] = EFFECT_SORCERY, + [62242] = EFFECT_SORCERY, + [62243] = EFFECT_SORCERY, + [62249] = EFFECT_EXPEDITION, + [62250] = EFFECT_FORTITUDE, + [62251] = EFFECT_ENDURANCE, + [62252] = EFFECT_INTELLECT, + [62256] = EFFECT_EXPEDITION, + [62257] = EFFECT_FORTITUDE, + [62258] = EFFECT_ENDURANCE, + [62259] = EFFECT_INTELLECT, + [62263] = EFFECT_EXPEDITION, + [62264] = EFFECT_FORTITUDE, + [62265] = EFFECT_ENDURANCE, + [62266] = EFFECT_INTELLECT, + [62270] = EFFECT_EXPEDITION, + [62271] = EFFECT_FORTITUDE, + [62272] = EFFECT_ENDURANCE, + [62273] = EFFECT_INTELLECT, + [62344] = EFFECT_BRUTALITY, + [62347] = EFFECT_BRUTALITY, + [62350] = EFFECT_BRUTALITY, + [62387] = EFFECT_BRUTALITY, + [62392] = EFFECT_BRUTALITY, + [62396] = EFFECT_BRUTALITY, + [62400] = EFFECT_BRUTALITY, + [62415] = EFFECT_BRUTALITY, + [62425] = EFFECT_BRUTALITY, + [62441] = EFFECT_BRUTALITY, + [62448] = EFFECT_BRUTALITY, + [62470] = EFFECT_FRACTURE, + [62471] = EFFECT_FRACTURE, + [62473] = EFFECT_FRACTURE, + [62474] = EFFECT_FRACTURE, + [62476] = EFFECT_FRACTURE, + [62480] = EFFECT_FRACTURE, + [62482] = EFFECT_FRACTURE, + [62484] = EFFECT_FRACTURE, + [62485] = EFFECT_BREACH, + [62486] = EFFECT_BREACH, + [62487] = EFFECT_FRACTURE, + [62488] = EFFECT_FRACTURE, + [62489] = EFFECT_BREACH, + [62490] = EFFECT_FRACTURE, + [62491] = EFFECT_BREACH, + [62513] = EFFECT_DEFILE, + [62514] = EFFECT_DEFILE, + [62515] = EFFECT_DEFILE, + [62531] = EFFECT_EXPEDITION, + [62537] = EFFECT_EXPEDITION, + [62540] = EFFECT_EXPEDITION, + [62543] = EFFECT_EXPEDITION, + [62578] = EFFECT_DEFILE, + [62579] = EFFECT_DEFILE, + [62580] = EFFECT_DEFILE, + [62747] = EFFECT_PROPHECY, + [62748] = EFFECT_PROPHECY, + [62749] = EFFECT_PROPHECY, + [62750] = EFFECT_PROPHECY, + [62751] = EFFECT_PROPHECY, + [62752] = EFFECT_PROPHECY, + [62753] = EFFECT_PROPHECY, + [62754] = EFFECT_PROPHECY, + [62755] = EFFECT_PROPHECY, + [62756] = EFFECT_PROPHECY, + [62757] = EFFECT_PROPHECY, + [62758] = EFFECT_PROPHECY, + [62772] = EFFECT_SPELL_SHATTER, + [62773] = EFFECT_SPELL_SHATTER, + [62774] = EFFECT_SPELL_SHATTER, + [62775] = EFFECT_SPELL_SHATTER, + [62780] = EFFECT_SPELL_SHATTER, + [62783] = EFFECT_SPELL_SHATTER, + [62786] = EFFECT_SPELL_SHATTER, + [62787] = EFFECT_SPELL_SHATTER, + [62789] = EFFECT_SPELL_SHATTER, + [62792] = EFFECT_SPELL_SHATTER, + [62795] = EFFECT_SPELL_SHATTER, + [63015] = EFFECT_EVASION, + [63016] = EFFECT_EVASION, + [63017] = EFFECT_EVASION, + [63018] = EFFECT_EVASION, + [63019] = EFFECT_EVASION, + [63023] = EFFECT_EVASION, + [63026] = EFFECT_EVASION, + [63028] = EFFECT_EVASION, + [63030] = EFFECT_EVASION, + [63036] = EFFECT_EVASION, + [63040] = EFFECT_EVASION, + [63042] = EFFECT_EVASION, + [63084] = EFFECT_RESOLVE, + [63085] = EFFECT_WARD, + [63088] = EFFECT_RESOLVE, + [63089] = EFFECT_WARD, + [63091] = EFFECT_RESOLVE, + [63092] = EFFECT_WARD, + [63116] = EFFECT_RESOLVE, + [63117] = EFFECT_WARD, + [63119] = EFFECT_RESOLVE, + [63120] = EFFECT_WARD, + [63123] = EFFECT_RESOLVE, + [63124] = EFFECT_WARD, + [63127] = EFFECT_RESOLVE, + [63128] = EFFECT_WARD, + [63131] = EFFECT_RESOLVE, + [63132] = EFFECT_WARD, + [63134] = EFFECT_RESOLVE, + [63135] = EFFECT_WARD, + [63137] = EFFECT_RESOLVE, + [63138] = EFFECT_WARD, + [63140] = EFFECT_RESOLVE, + [63141] = EFFECT_WARD, + [63143] = EFFECT_RESOLVE, + [63144] = EFFECT_WARD, + [63148] = EFFECT_DEFILE, + [63223] = EFFECT_SORCERY, + [63224] = EFFECT_SORCERY, + [63225] = EFFECT_SORCERY, + [63226] = EFFECT_SORCERY, + [63227] = EFFECT_SORCERY, + [63228] = EFFECT_SORCERY, + [63229] = EFFECT_SORCERY, + [63230] = EFFECT_SORCERY, + [63231] = EFFECT_SORCERY, + [63232] = EFFECT_SORCERY, + [63233] = EFFECT_SORCERY, + [63234] = EFFECT_SORCERY, + [63533] = EFFECT_VITALITY, + [63534] = EFFECT_VITALITY, + [63535] = EFFECT_VITALITY, + [63536] = EFFECT_VITALITY, + [63909] = EFFECT_FRACTURE, + [63912] = EFFECT_FRACTURE, + [63913] = EFFECT_FRACTURE, + [63914] = EFFECT_FRACTURE, + [63915] = EFFECT_FRACTURE, + [63916] = EFFECT_FRACTURE, + [63917] = EFFECT_FRACTURE, + [63918] = EFFECT_FRACTURE, + [63919] = EFFECT_FRACTURE, + [63920] = EFFECT_FRACTURE, + [63921] = EFFECT_BREACH, + [63922] = EFFECT_FRACTURE, + [63923] = EFFECT_BREACH, + [63924] = EFFECT_FRACTURE, + [63925] = EFFECT_BREACH, + [63987] = EFFECT_EXPEDITION, + [63993] = EFFECT_EXPEDITION, + [63999] = EFFECT_EXPEDITION, + [64005] = EFFECT_EXPEDITION, + [64012] = EFFECT_EXPEDITION, + [64019] = EFFECT_EXPEDITION, + [64026] = EFFECT_EXPEDITION, + [64166] = EFFECT_PROTECTION, + [64251] = EFFECT_BREACH, + [64254] = EFFECT_FRACTURE, + [64562] = EFFECT_WARD, + [64952] = EFFECT_SAVAGERY, + [65133] = EFFECT_HEROISM, + [66075] = EFFECT_RESOLVE, + [66083] = EFFECT_RESOLVE, + [67708] = EFFECT_EXPEDITION, + [67714] = EFFECT_EXPEDITION, + [67715] = EFFECT_EXPEDITION, + [67716] = EFFECT_EXPEDITION, + [68163] = EFFECT_DEFILE, + [68164] = EFFECT_DEFILE, + [68165] = EFFECT_DEFILE, + [68793] = EFFECT_EXPEDITION, + [68795] = EFFECT_EXPEDITION, + [68797] = EFFECT_ENDURANCE, + [68799] = EFFECT_ENDURANCE, + [68800] = EFFECT_ENDURANCE, + [68801] = EFFECT_ENDURANCE, + [68804] = EFFECT_BRUTALITY, + [68805] = EFFECT_BRUTALITY, + [68806] = EFFECT_BRUTALITY, + [68807] = EFFECT_BRUTALITY, + [68814] = EFFECT_BRUTALITY, + [68815] = EFFECT_BRUTALITY, + [68816] = EFFECT_BRUTALITY, + [68817] = EFFECT_BRUTALITY, + [68843] = EFFECT_BRUTALITY, + [68845] = EFFECT_BRUTALITY, + [68852] = EFFECT_BRUTALITY, + [68859] = EFFECT_BRUTALITY, + [69685] = EFFECT_EVASION, + [72655] = EFFECT_EXPEDITION, + [72656] = EFFECT_EXPEDITION, + [72657] = EFFECT_EXPEDITION, + [72658] = EFFECT_EXPEDITION, + [76044] = EFFECT_EXPEDITION, + [76057] = EFFECT_PROPHECY, + [76498] = EFFECT_EXPEDITION, + [76499] = EFFECT_EXPEDITION, + [76500] = EFFECT_EXPEDITION, + [76501] = EFFECT_EXPEDITION, + [76502] = EFFECT_EXPEDITION, + [76503] = EFFECT_EXPEDITION, + [76504] = EFFECT_EXPEDITION, + [76505] = EFFECT_EXPEDITION, + [76506] = EFFECT_EXPEDITION, + [76507] = EFFECT_EXPEDITION, + [76509] = EFFECT_EXPEDITION, + [76510] = EFFECT_EXPEDITION, + [76518] = EFFECT_BRUTALITY, + [76519] = EFFECT_BRUTALITY, + [76520] = EFFECT_BRUTALITY, + [76521] = EFFECT_BRUTALITY, + [77031] = EFFECT_INTELLECT, + [77033] = EFFECT_INTELLECT, + [77034] = EFFECT_INTELLECT, + [77035] = EFFECT_INTELLECT, + [77082] = EFFECT_MENDING, + [77918] = EFFECT_MENDING, + [77922] = EFFECT_MENDING, +} - function Srendarr:GetClassPassiveSkillEffect(ability) - if self.classId == 1 then - return self:GetDragonKnightEffect(ability) - elseif self.classId == 2 then - return self:GetSorcererEffect(ability) - elseif self.classId == 3 then - return self:GetNightbladeEffect(ability) - elseif self.classId == 6 then - return self:GetTemplarEffect(ability) - end - return false, false, false, "", 0 - end - function Srendarr:GetMagesGuildEffect(ability) - if isMagesGuild[ability] then - local data = passiveSkillEffects["Might of the Guild"] - return data.name, data.buff, data.debuff, data.texture, data.abilityId - end - return false, false, false, "", 0 - end +-- ------------------------ +-- AURA DATA DEBUG & PATCH FUNCTIONS +-- Used after patches to assist in getting hold of changed abilityIDs (messy, only uncomment when needed to use) +-- ------------------------ - function Srendarr:SetupPassiveSkillEffects() - self.classId = self.classId or GetUnitClassId("player") +--[[ +function GetToggled() + -- returns all abilityIDs that match the names used as toggledAuras + -- used to grab ALL the nessecary abilityIDs for the table after a patch changes things + local data, names, saved = {}, {}, {} - --Dragon Knight - if self.classId == 1 then - --[[ - --Warmth - local name, texture, upgradeLevel, abilityId = GetSkillData(SKILL_TYPE_CLASS, 1, 8) - passiveSkillEffects["Warmth"].name = name - passiveSkillEffects["Warmth"].buff = false - passiveSkillEffects["Warmth"].debuff = 2 * upgradeLevel - passiveSkillEffects["Warmth"].texture = texture - passiveSkillEffects["Warmth"].abilityId = abilityId - --]] - --Mountain's Blessing - local name, texture, upgradeLevel, abilityId = GetSkillData(SKILL_TYPE_CLASS, 3, 9) - passiveSkillEffects["Mountain's Blessing"].name = name - passiveSkillEffects["Mountain's Blessing"].buff = 10 * upgradeLevel - passiveSkillEffects["Mountain's Blessing"].debuff = false - passiveSkillEffects["Mountain's Blessing"].texture = texture - passiveSkillEffects["Mountain's Blessing"].abilityId = abilityId + for k, v in pairs(toggledAuras) do + names[GetAbilityName(k)] = true + end - --Sorcerer - elseif self.classId == 2 then - --Exploitation - local name, texture, upgradeLevel, abilityId = GetSkillData(SKILL_TYPE_CLASS, 1, 10) - passiveSkillEffects["Exploitation"].name = name - passiveSkillEffects["Exploitation"].buff = 10 * upgradeLevel - passiveSkillEffects["Exploitation"].debuff = false - passiveSkillEffects["Exploitation"].texture = texture - passiveSkillEffects["Exploitation"].abilityId = abilityId + for x = 1, 100000 do + if (DoesAbilityExist(x) and names[GetAbilityName(x)] and GetAbilityDuration(x) == 0 and GetAbilityDescription(x) ~= '') then + table.insert(data, {(GetAbilityName(x)), x, GetAbilityDescription(x)}) + end + end - --Nightblade - elseif self.classId == 3 then - --[[ - --Hemorrhage - local name, texture, upgradeLevel, abilityId = GetSkillData(SKILL_TYPE_CLASS, 1, 10) - passiveSkillEffects["Hemorrhage"].name = name - passiveSkillEffects["Hemorrhage"].buff = 10 * upgradeLevel - passiveSkillEffects["Hemorrhage"].debuff = false - passiveSkillEffects["Hemorrhage"].texture = texture - passiveSkillEffects["Hemorrhage"].abilityId = abilityId - --]] - --Shadow Barrier - local name, texture, upgradeLevel, abilityId = GetSkillData(SKILL_TYPE_CLASS, 2, 8) - passiveSkillEffects["Shadow Barrier"].name = name - passiveSkillEffects["Shadow Barrier"].buff = (2 * upgradeLevel) * (1 + (self:GetNumArmorPieces(ARMORTYPE_HEAVY) * 0.25)) - passiveSkillEffects["Shadow Barrier"].debuff = false - passiveSkillEffects["Shadow Barrier"].texture = texture - passiveSkillEffects["Shadow Barrier"].abilityId = abilityId + table.sort(data, function(a, b) return a[1] > b[1] end) - --Templar - elseif self.classId == 6 then - --Illuminate - local name, texture, upgradeLevel, abilityId = GetSkillData(SKILL_TYPE_CLASS, 2, 9) - passiveSkillEffects["Illuminate"].name = name - passiveSkillEffects["Illuminate"].buff = 10 * upgradeLevel - passiveSkillEffects["Illuminate"].debuff = false - passiveSkillEffects["Illuminate"].texture = texture - passiveSkillEffects["Illuminate"].abilityId = abilityId - end + for k, v in ipairs(data) do + d(v[2] .. ' ' .. v[1] .. ' ' .. string.sub(v[3], 1, 30)) + table.insert(saved, v[2] .. '|' .. v[1]..'||' ..string.sub(v[3],1,30)) + end - --Mages Guild - local name, texture, upgradeLevel, abilityId = GetSkillData(SKILL_TYPE_GUILD, 2, 10) - passiveSkillEffects["Might of the Guild"].name = name - passiveSkillEffects["Might of the Guild"].buff = 5 - passiveSkillEffects["Might of the Guild"].debuff = false - passiveSkillEffects["Might of the Guild"].texture = texture - passiveSkillEffects["Might of the Guild"].abilityId = abilityId - end + --SrendarrDB.toggled = saved end -do --potions - local strfind = zo_plainstrfind - local strlower = zo_strlower - local GetCurrentQuickslot = GetCurrentQuickslot - - local medicinalUseCoefficient = 1 - - local medicinalUseCoefficients = { - [45569] = 1.1, - [45571] = 1.2, - [45573] = 1.3, - } - - function Srendarr:GetMedicinalUseCoefficient() - return medicinalUseCoefficient - end - - function Srendarr:SetMedicinalUseCoefficient(abilityId) - local newValue = medicinalUseCoefficients[abilityId] - if newValue ~= nil and newValue ~= medicinalUseCoefficient then - medicinalUseCoefficient = newValue - self.OnQuickSlotChanged(nil, GetCurrentQuickslot()) - end - end - - function Srendarr:GetPotionData(ability, abilityId) - local data = potionEffects[abilityId] - - if (data) then - local buff, debuff, potionType = unpack(data) - local duration = 0 +function GetMajorEffects() + local name + SrendarrDB.majorBuffs = {} - local potionDuration = potionDurations[potionType] + for id = 3000, 100000 do -- haven't seen any outside of these ids so compact search space a bit + if (DoesAbilityExist(id) and GetAbilityDuration(id) > 0) then + name = string.sub(GetAbilityName(id), 1, 6) - for potionStrength, value in pairs(potionDuration) do - if strfind(strlower(ability), strlower(potionStrength)) then - duration = value - break - end - end - - if duration > 0 then - return buff and duration or false, debuff and duration or false - end - end - - return false, false - end + if (name == 'Major ') then +-- table.insert(SrendarrDB.majorBuffs, string.format('[%d] = %s, ', id, GetAbilityName(id))) + table.insert(SrendarrDB.majorBuffs, string.format('%d|%s|%d|%s', id, GetAbilityName(id), GetAbilityDuration(id), GetAbilityIcon(id))) + end + end + end end -do - local ABILITY_TYPE_BLOCK = ABILITY_TYPE_BLOCK - local ABILITY_TYPE_CHANGEAPPEARANCE = ABILITY_TYPE_CHANGEAPPEARANCE - local ABILITY_TYPE_NONE = ABILITY_TYPE_NONE - local ABILITY_TYPE_BONUS = ABILITY_TYPE_BONUS - local strMundus = L.Passive_Mundus - local strHomeKeep = L.Passive_HomeKeepBonus - local strEnemyKeep = L.Passive_EnemyKeepBonus - local strScroll = L.Passive_ScrollBonus - local strEmperor = L.Passive_Emperorship - local strBattleSpirit = L.Passive_Battle_Spirit - local strBlessingOfWar = L.Passive_Blessing_of_War - local strSoulSummons = L.Passive_SoulSummons - local strfind = zo_plainstrfind - local effectIDs = {} - local db - - function Srendarr:IsWatchedTimed(ability) - if ((not db.showVampLycan and vampLycanEffects[ability]) or (not db.showSoulSummons and ability == strSoulSummons) or (not db.showCyrodiil and ability == strBlessingOfWar)) then - return false - end - return true - end - - function Srendarr:IsWatchedTimedTarget(ability) - if ((not db.showVampLycanTarget and vampLycanEffects[ability]) or (not db.showSoulSummonsTarget and ability == strSoulSummons) or (not db.showCyrodiil and ability == strBlessing)) then - return false - end - return true - end - - function Srendarr:IsWatchedPassive(ability, abilityType) - if (not db.showPassive) then return false end -- quick abort if not showing passives +function GetMinorEffects() + local name + SrendarrDB.minorBuffs = {} - -- vamp/ww - if (vampLycanEffects[ability]) then return db.showVampLycan end - -- blocking - if (abilityType == ABILITY_TYPE_BLOCK) then return false end - -- disguises - if (abilityType == ABILITY_TYPE_CHANGEAPPEARANCE) then return db.showDisguise end - --ignored effects - if (ignoredEffects[ability]) then return db.showAllEffects end - -- bonuses - if (abilityType == ABILITY_TYPE_BONUS) then - -- mundus boons - if (not db.showMundus and strfind(ability, strMundus)) then return false end - -- cyrodiil bonuses - if (not db.showCyrodiil) then - if (strfind(ability, strScroll) or strfind(ability, 'Keep Bonus') or strfind(ability, strHomeKeep) or strfind(ability, strEnemyKeep) or ability == strEmperor or ability == strBattleSpirit) then return false end - end - end + for id = 3000, 100000 do -- haven't seen any outside of these ids so compact search space a bit + if (DoesAbilityExist(id) and GetAbilityDuration(id) > 0) then + name = string.sub(GetAbilityName(id), 1, 6) - return true -- passive must be wanted - end - - function Srendarr:IsWatchedPassiveTarget(ability, abilityType) - if (not db.showPassiveTarget) then return false end -- quick abort if not showing passives + if (name == 'Minor ') then +-- table.insert(SrendarrDB.minorBuffs, string.format('[%d] = %s, ', id, GetAbilityName(id))) + table.insert(SrendarrDB.minorBuffs, string.format('%d|%s|%d|%s', id, GetAbilityName(id), GetAbilityDuration(id), GetAbilityIcon(id))) + end + end + end +end - -- vamp/ww - if (vampLycanEffects[ability]) then return db.showVampLycanTarget end - -- blocking - if (abilityType == ABILITY_TYPE_BLOCK) then return false end - -- disguises - if (abilityType == ABILITY_TYPE_CHANGEAPPEARANCE) then return db.showDisguiseTarget end - --ignored effects - if (ignoredEffects[ability]) then return db.showAllEffectsTarget end - -- bonuses - if (abilityType == ABILITY_TYPE_BONUS) then - -- mundus boons - if (not db.showMundusTarget and strfind(ability, strMundus)) then return false end - -- cyrodiil bonuses - if (not db.showCyrodiilTarget) then - if (strfind(ability, strScroll) or strfind(ability, 'Keep Bonus') or strfind(ability, strHomeKeep) or strfind(ability, strEnemyKeep) or ability == strEmperor or ability == strBattleSpirit) then return false end - end - end - return true -- passive must be wanted - end +function GetAurasByName(name) + for x = 1, 100000 do + if (DoesAbilityExist(x) and GetAbilityName(x) == name and GetAbilityDuration(x) > 0) then + d('['..x ..'] '..GetAbilityName(x) .. '-' .. GetAbilityDuration(x) .. '-' .. GetAbilityDescription(x)) + end + end +end - function Srendarr:InitializeAbilityCheck() - db = self.db -- just add a shortcut for a bit of speed - end -end \ No newline at end of file +function GetAuraInfo(idA, idB) + d(string.format('[%d] %s (%ds) - %s', idA, GetAbilityName(idA), GetAbilityDuration(idA), GetAbilityDescription(idA))) + d(string.format('[%d] %s (%ds) - %s', idB, GetAbilityName(idB), GetAbilityDuration(idB), GetAbilityDescription(idB))) +end +]] diff --git a/AuraFrame.lua b/AuraFrame.lua deleted file mode 100644 index 9563cfb..0000000 --- a/AuraFrame.lua +++ /dev/null @@ -1,206 +0,0 @@ -local Srendarr = _G['Srendarr'] - -local ICON_SIZE = Srendarr.ICON_SIZE -local UPDATE_THRESHOLD = Srendarr.UPDATE_THRESHOLD -local round = zo_round -local strfind = zo_plainstrfind -local tsort = table.sort -local tremove = table.remove -local tinsert = table.insert - -local Aura = Srendarr.Aura -local AuraFrame = {} - -local function SortByTime(a, b) - if (a.k_type < 3 and b.k_type < 3) then -- timed, sort by time - return a.k_finish > b.k_finish - elseif (a.k_type == b.k_type) then -- non-timed, same type, sort by name - return a.k_name > b.k_name - else -- non-timed, different types, sort by type - return a.k_type > b.k_type - end -end - -local function SortByName(a, b) - return a.k_name > b.k_name -end - -local function UpdateDisplayCentered(self) - tsort(self.k_auraSorted, self.k_sortFunc) - - self.k_offsetI = self.k_offsetX * ((#self.k_auraSorted - 1) / 2) - - for i, aura in pairs(self.k_auraSorted) do - aura:ClearAnchors() - aura:SetAnchor(CENTER, self, CENTER, self.k_offsetI, 0) - self.k_offsetI = self.k_offsetI - self.k_offsetX - end -end - -local function UpdateDisplayDirection(self) - tsort(self.k_auraSorted, self.k_sortFunc) - - for i, aura in ipairs(self.k_auraSorted) do - aura:ClearAnchors() - aura:SetAnchor(self.k_point, self, self.k_point, self.k_offsetX * (i - 1), self.k_offsetY * (i - 1)) - end -end - -local function ConfigureUpdateDisplay(self) - local db = self.k_db - - if (db.auraSort == 'NAME') then - self.k_sortFunc = SortByName - else - self.k_sortFunc = SortByTime - end - - if (db.auraGrowth == 'LEFTCENTER' or db.auraGrowth == 'RIGHTCENTER') then - self.k_offsetX = round((db.auraPadding + ICON_SIZE) * db.scale * ((db.auraGrowth == 'LEFTCENTER') and 1 or -1)) - self['UpdateDisplay'] = UpdateDisplayCentered - else - if (db.auraGrowth == 'UP') then - self.k_point, self.k_offsetX, self.k_offsetY = BOTTOM, 0, round(-1 * (db.auraPadding + ICON_SIZE) * db.scale) - elseif (db.auraGrowth == 'DOWN') then - self.k_point, self.k_offsetX, self.k_offsetY = TOP, 0, round((db.auraPadding + ICON_SIZE) * db.scale) - elseif (db.auraGrowth == 'LEFT') then - self.k_point, self.k_offsetX, self.k_offsetY = RIGHT, round(-1 * (db.auraPadding + ICON_SIZE) * db.scale), 0 - else -- RIGHT - self.k_point, self.k_offsetX, self.k_offsetY = LEFT, round((db.auraPadding + ICON_SIZE) * db.scale), 0 - end - - self['UpdateDisplay'] = UpdateDisplayDirection - end -end - -local function AddAura(self, aType, tType, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - local existingAura = self.k_auraActive[name] or nil - - --vampirism stage check, should be working for all 3 language versions - if strfind(name, 'Vampirism') then - if strfind(name, '1') then - icon = 'Srendarr/Icons/Stage1.dds' - elseif strfind(name, '2') then - icon = 'Srendarr/Icons/Stage2.dds' - elseif strfind(name, '3') then - icon = 'Srendarr/Icons/Stage3.dds' - elseif strfind(name, '4') then - icon = 'Srendarr/Icons/Stage4.dds' - end - end - - -- Skip Minor Buffs - if (Srendarr.db.hideMinorBuffs and Srendarr.MinorBuffs[abilityId] ~= nil) then - return - end - - -- Skip Major Buffs - if (Srendarr.db.hideMajorBuffs and Srendarr.MajorBuffs[abilityId] ~= nil) then - return - end - - if (aType < 3) then -- timed - if (existingAura) then -- existingAura, update it - if (finish > (existingAura.k_finish + UPDATE_THRESHOLD)) then -- finish time changed enough to potentially need to alter display list - existingAura.k_start, existingAura.k_finish = start, finish - self:UpdateDisplay() - else -- minor change in timing (probably from hook), update data but don't alter display list - existingAura.k_start, existingAura.k_finish = start, finish - end - - if (existingAura.k_isGhost) then -- was ghosting, set to full visibility - existingAura.icon:SetDesaturation(0) - existingAura:SetAlpha(1) - existingAura.k_isGhost = false - end - else - local newAura = Aura:New(self, aType, tType, name, icon, start, finish, isShield, abilityType, buff, abilityId) - Srendarr:AddTimer(tType, name, newAura) - tinsert(self.k_auraSorted, newAura) - self:UpdateDisplay() - end - else -- toggle or passive - if (existingAura) then return end -- existing aura, nothing to do, abort - - local newAura = Aura:New(self, aType, tType, name, icon, start, finish, isShield, abilityType, buff, abilityId) - tinsert(self.k_auraSorted, newAura) - self:UpdateDisplay() - end -end - -local function RemoveAura(self, name) - local remAura = self.k_auraActive[name] or nil - - if (remAura) then -- aura exists, remove - Srendarr:RemoveTimer(remAura.k_timerType, name) - remAura:Release() - - for i, aura in pairs(self.k_auraSorted) do - if (aura.k_name == name) then - tremove(self.k_auraSorted, i) - break - end - end - - self:UpdateDisplay() - end -end - -local function RemoveAllAuras(self) - for _, aura in pairs(self.k_auraActive) do - aura:Release() - end - - while (#self.k_auraSorted > 0) do - tremove(self.k_auraSorted, 1) - end -end - -local function ConfigureAllAuras(self) - for _, aura in pairs(self.k_auraActive) do - aura:Configure() - end - - for _, aura in pairs(self.k_auraPool) do - aura:Configure() - end -end - -local function SetAurasNonInteractive(self) - for _, aura in pairs(self.k_auraActive) do - aura:SetMouseEnabled(false) - end - - for _, aura in pairs(self.k_auraPool) do - aura:SetMouseEnabled(false) - end -end - -function AuraFrame:New(id, alpha) - local frame = WINDOW_MANAGER:CreateControl(nil, Srendarr.auraAnchors[id], CT_CONTROL) - frame:SetKeyboardEnabled(false) - frame:SetMouseEnabled(false) - frame:SetMovable(false) - frame:SetDimensions(ICON_SIZE, ICON_SIZE) - frame:SetAnchor(CENTER) - frame:SetAlpha(alpha) - - frame.k_auraPool = {} - frame.k_auraActive = {} - frame.k_auraSorted = {} - frame.k_db = Srendarr.db.frames[id] - frame.k_id = id - - frame['ConfigureUpdateDisplay'] = ConfigureUpdateDisplay - frame['AddAura'] = AddAura - frame['RemoveAura'] = RemoveAura - frame['RemoveAllAuras'] = RemoveAllAuras - frame['ConfigureAllAuras'] = ConfigureAllAuras - frame['SetAurasNonInteractive'] = SetAurasNonInteractive - - frame:ConfigureUpdateDisplay() - - return frame -end - -Srendarr.AuraFrame = AuraFrame \ No newline at end of file diff --git a/CastBar.lua b/CastBar.lua new file mode 100644 index 0000000..76c0dfb --- /dev/null +++ b/CastBar.lua @@ -0,0 +1,307 @@ +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = Srendarr:GetLocale() +local LMP = LibStub('LibMediaProvider-1.0') +local Cast = _G['Srendarr_CastBar'] + +-- UPVALUES -- +local strformat = string.format +local GetGameTimeMillis = GetGameTimeMilliseconds +local GetLatency = GetLatency +local IsSlotToggled = IsSlotToggled +local AddControl = Srendarr.AddControl + +local auraLookupPlayer = Srendarr.auraLookup.player -- used for crystal frags procs (no cast if proc'd) +local crystalFragments = Srendarr.crystalFragments -- used for crystal frags procs (no cast if proc'd) + +local slotData = Srendarr.slotData +local tTenths = L.Time_Tenths +local isCastingOrChannelling = false +local currentTime, data +local settings + + +-- ------------------------ +-- CAST BAR UPDATE HANDLER +do ------------------------ + local RATE = Srendarr.CAST_UPDATE_RATE + local nextUpdate = 0 + local timeRemaining + + local function OnUpdate(self, updateTime) + if (updateTime >= nextUpdate) then + timeRemaining = self.castFinish - updateTime + + if (timeRemaining <= 0) then -- cast complete, stop cast + self:OnCastStop() + else + if (self.isChannel) then + Cast.bar:SetValue(1 - ((updateTime - self.castStart) / (self.castFinish - self.castStart))) + else + Cast.bar:SetValue((updateTime - self.castStart) / (self.castFinish - self.castStart)) + end + + Cast.timer:SetText(strformat(tTenths, timeRemaining)) + end + + nextUpdate = updateTime + RATE + end + end + + Cast:SetHidden(true) + Cast:SetHandler('OnUpdate', OnUpdate) +end + + +-- ------------------------ +-- CAST CONTROL +-- ------------------------ +function Cast:OnCastStart(isChannel, castName, start, finish, castIcon, abilityID) + self.isChannel = isChannel + self.castStart = start + self.castFinish = finish + self.abilityID = abilityID + + self.name:SetText(zo_strformat(SI_ABILITY_TOOLTIP_NAME, castName)) + self.icon:SetTexture(castIcon) + + currentTime = GetGameTimeMillis() / 1000 + + if (isChannel) then + self.bar:SetValue((currentTime - start) / (finish - start)) + else + self.bar:SetValue(1 - ((currentTime - start) / (finish - start))) + end + + self.timer:SetText(strformat(tTenths, finish - currentTime)) + + isCastingOrChannelling = true + + self:SetHidden(false) +end + +function Cast:OnCastStop() + isCastingOrChannelling = false + + self:SetHidden(true) +end + + +local function OnActionUpdateCooldowns() +--[[ UNUSED FOR NOW + if (isCastingOrChannelling) then + if (GetSlotCooldownInfo(Cast.slotID) > 0) then -- on cooldown, cast must be complete, cancel active + d(string.format('%.3f OnActionUpdateCooldowns - Cancelled Cast', GetFrameTimeSeconds()) + Cast:OnCastStop() + end + end +]] +end + +local function OnActionSlotAbilityUsed(evt, slot) + if (slot < 3 or slot > 8) then return end + + if (not slotData[slot].isDelayed) then return end -- this ability is instant cast + + data = slotData[slot] + + if (IsSlotToggled(slot)) then return end -- ability is toggled on, so no cast time to cancel + + if (isCastingOrChannelling and (data.abilityID == Cast.abilityID)) then return end -- already casting this ability, bail out + + if (auraLookupPlayer[46327] and data.abilityName == crystalFragments and not auraLookupPlayer[46327].isFading) then return end -- no cast bar if ability is frags and the proc is active (instant) + + currentTime = GetGameTimeMillis() + + Cast:OnCastStart( + data.isChannel, + data.abilityName, + currentTime / 1000, + (currentTime + (data.isChannel and data.channelTime or data.castTime) + GetLatency()) / 1000, + data.abilityIcon, + data.abilityID + ) +end + + +-- ------------------------ +-- CONFIGURATION +-- ------------------------ +function Srendarr:ConfigureCastBar() + if (not settings.enabled) then +-- EVENT_MANAGER:UnregisterForEvent(self.name .. 'Cast', EVENT_ACTION_UPDATE_COOLDOWNS) + EVENT_MANAGER:UnregisterForEvent(self.name .. 'Cast', EVENT_ACTION_SLOT_ABILITY_USED) + Cast:SetHidden(true) + return + end + + Cast:SetDimensions(settings.barWidth + 26, 23) + + Cast.icon:ClearAnchors() + Cast.bar:ClearAnchors() + Cast.bar:SetDimensions(settings.barWidth, 23) + Cast.bar:SetGradientColors(settings.barColour.r1, settings.barColour.g1, settings.barColour.b1, 1, settings.barColour.r2, settings.barColour.g2, settings.barColour.b2, 1) + Cast.bar.gloss:SetDimensions(settings.barWidth, 23) + Cast.bar.gloss:SetHidden(not settings.barGloss) + Cast.bar.borderM:SetDimensions(settings.barWidth - 17, 23) + Cast.bar.backdropM:SetDimensions(settings.barWidth - 17, 23) + + Cast.name:ClearAnchors() + Cast.name:SetFont(strformat('%s|%d|%s', LMP:Fetch('font', settings.nameFont), settings.nameSize, settings.nameStyle)) + Cast.name:SetColor(settings.nameColour[1], settings.nameColour[2], settings.nameColour[3], settings.nameColour[4]) + Cast.name:SetHidden(not settings.nameShow) + + Cast.timer:ClearAnchors() + Cast.timer:SetFont(strformat('%s|%d|%s', LMP:Fetch('font', settings.timerFont), settings.timerSize, settings.timerStyle)) + Cast.timer:SetColor(settings.timerColour[1], settings.timerColour[2], settings.timerColour[3], settings.timerColour[4]) + Cast.timer:SetHidden(not settings.timerShow) + + if (settings.barReverse) then + Cast.icon:SetAnchor(RIGHT, Cast, RIGHT, 0, 0) + Cast.bar:SetAnchor(RIGHT, Cast.icon, LEFT, -3, 0) + Cast.bar:SetBarAlignment(BAR_ALIGNMENT_REVERSE) + Cast.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_REVERSE) + Cast.bar.borderL:SetDimensions(13, 23) + Cast.bar.borderL:SetTextureCoords(0.3671874, 0.46875, 0.328125, 0.6875) + Cast.bar.borderR:SetDimensions(4, 23) + Cast.bar.borderR:SetTextureCoords(0.5859375, 0.6171875, 0.328125, 0.6875) + Cast.bar.backdropL:SetDimensions(13, 23) + Cast.bar.backdropL:SetTextureCoords(0.3671874, 0.46875, 0.328125, 0.6875) + Cast.bar.backdropR:SetDimensions(4, 23) + Cast.bar.backdropR:SetTextureCoords(0.5859375, 0.6171875, 0.328125, 0.6875) + Cast.name:SetAnchor(RIGHT, Cast.bar, RIGHT, -5, 0) + Cast.timer:SetAnchor(LEFT, Cast.bar, LEFT, 15, 0) + else + Cast.icon:SetAnchor(LEFT, Cast, LEFT, 0, 0) + Cast.bar:SetAnchor(LEFT, Cast.icon, RIGHT, 3, 0) + Cast.bar:SetBarAlignment(BAR_ALIGNMENT_NORMAL) + Cast.bar.gloss:SetBarAlignment(BAR_ALIGNMENT_NORMAL) + Cast.bar.borderL:SetDimensions(4, 23) + Cast.bar.borderL:SetTextureCoords(0.6171875, 0.5859375, 0.328125, 0.6875) + Cast.bar.borderR:SetDimensions(13, 23) + Cast.bar.borderR:SetTextureCoords(0.46875, 0.3671874, 0.328125, 0.6875) + Cast.bar.backdropL:SetDimensions(4, 23) + Cast.bar.backdropL:SetTextureCoords(0.6171875, 0.5859375, 0.328125, 0.6875) + Cast.bar.backdropR:SetDimensions(13, 23) + Cast.bar.backdropR:SetTextureCoords(0.46875, 0.3671874, 0.328125, 0.6875) + Cast.name:SetAnchor(LEFT, Cast.bar, LEFT, 5, 0) + Cast.timer:SetAnchor(RIGHT, Cast.bar, RIGHT, -15, 0) + end + +-- EVENT_MANAGER:RegisterForEvent(self.name .. 'Cast', EVENT_ACTION_UPDATE_COOLDOWNS, OnActionUpdateCooldowns) -- don't think this is needed anymore + EVENT_MANAGER:RegisterForEvent(self.name .. 'Cast', EVENT_ACTION_SLOT_ABILITY_USED, OnActionSlotAbilityUsed) +end + + +-- ------------------------ +-- DRAG OVERLAY +-- ------------------------ +function Cast:EnableDragOverlay() + self:SetMouseEnabled(true) + self:SetMovable(true) + + currentTime = GetGameTimeMillis() / 1000 + + Cast:OnCastStart( + true, + strformat('%s - %s', L.Srendarr_Basic, L.CastBar), + currentTime, + currentTime + 600, + [[esoui/art/icons/ability_mageguild_001.dds]], + 116016 + ) + + self:SetHidden(false) +end + +function Cast:DisableDragOverlay() + self:SetMouseEnabled(false) + self:SetMovable(false) + + Cast:OnCastStop() + + self:SetHidden(true) +end + + +-- ------------------------ +-- INITIALIZATION +-- ------------------------ +function Srendarr:InitializeCastBar() + settings = self.db.castBar + + Cast:SetKeyboardEnabled(false) + Cast:SetMouseEnabled(false) + Cast:SetMovable(false) + Cast:SetDimensions(settings.barWidth + 26, 23) + Cast:SetAnchor(settings.base.point, GuiRoot, settings.base.point, settings.base.x, settings.base.y) + Cast:SetAlpha(settings.base.alpha) -- both values, if configured after load, are done directly) + Cast:SetScale(settings.base.scale) -- both values, if configured after load, are done directly) + + Cast:SetHandler('OnReceiveDrag', function(f) + f:StartMoving() + end) + Cast:SetHandler('OnMouseUp', function(f) + f:StopMovingOrResizing() + local point, x, y = Srendarr:GetEdgeRelativePosition(f) + settings.base.point = point + settings.base.x = x + settings.base.y = y + end) + + -- ICON + Cast.icon, ctrl = AddControl(Cast, CT_TEXTURE, 0) + ctrl:SetDimensions(23, 23) + Cast.iconBorder, ctrl = AddControl(Cast.icon, CT_TEXTURE, 1) + ctrl:SetDimensions(23, 23) + ctrl:SetTexture([[/esoui/art/actionbar/abilityframe64_up.dds]]) + ctrl:SetAnchor(CENTER) + -- LABELS + Cast.name, ctrl = AddControl(Cast, CT_LABEL, 4) + ctrl:SetVerticalAlignment(TEXT_ALIGN_CENTER) + ctrl:SetInheritScale(false) + Cast.timer, ctrl = AddControl(Cast, CT_LABEL, 4) + ctrl:SetVerticalAlignment(TEXT_ALIGN_CENTER) + ctrl:SetInheritScale(false) + -- BAR + Cast.bar, ctrl = AddControl(Cast, CT_STATUSBAR, 2) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_fill.dds]]) + ctrl:SetTextureCoords(0, 1, 0, 0.53125) + ctrl:SetLeadingEdge([[/esoui/art/unitattributevisualizer/attributebar_dynamic_leadingedge.dds]], 11, 17) + ctrl:SetLeadingEdgeTextureCoords(0, 0.6875, 0, 0.53125) + ctrl:EnableLeadingEdge(true) + ctrl:SetHandler('OnValueChanged', function(bar, value) bar.gloss:SetValue(value) end) -- change gloss value as main bar changes + -- BAR GLOSS + Cast.bar.gloss, ctrl = AddControl(Cast.bar, CT_STATUSBAR, 3) + ctrl:SetAnchor(TOPLEFT) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_fill_gloss.dds]]) + ctrl:SetTextureCoords(0, 1, 0, 0.53125) + ctrl:SetLeadingEdge([[/esoui/art/unitattributevisualizer/attributebar_dynamic_leadingedge_gloss.dds]], 11, 17) + ctrl:SetLeadingEdgeTextureCoords(0, 0.6875, 0, 0.53125) + ctrl:EnableLeadingEdge(true) + -- BAR FRAME + Cast.bar.borderL, ctrl = AddControl(Cast.bar, CT_TEXTURE, 4) + ctrl:SetAnchor(TOPLEFT) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_frame.dds]]) + Cast.bar.borderR, ctrl = AddControl(Cast.bar, CT_TEXTURE, 4) + ctrl:SetAnchor(TOPRIGHT) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_frame.dds]]) + Cast.bar.borderM, ctrl = AddControl(Cast.bar, CT_TEXTURE, 4) + ctrl:SetAnchor(TOPLEFT, Cast.bar.borderL, TOPRIGHT, 0, 0) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_frame.dds]]) + ctrl:SetTextureCoords(0.4921875, 0.5546875, 0.328125, 0.6875) + -- BAR BACKDROP + Cast.bar.backdropL, ctrl = AddControl(Cast.bar, CT_TEXTURE, 1) + ctrl:SetAnchor(TOPLEFT) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_bg.dds]]) + Cast.bar.backdropR, ctrl = AddControl(Cast.bar, CT_TEXTURE, 1) + ctrl:SetAnchor(TOPRIGHT) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_bg.dds]]) + Cast.bar.backdropM, ctrl = AddControl(Cast.bar, CT_TEXTURE, 1) + ctrl:SetAnchor(TOPLEFT, Cast.bar.backdropL, TOPRIGHT, 0, 0) + ctrl:SetTexture([[/esoui/art/unitattributevisualizer/attributebar_dynamic_bg.dds]]) + ctrl:SetTextureCoords(0.4921875, 0.5546875, 0.328125, 0.6875) + + self:ConfigureCastBar() +end + +Srendarr.Cast = Cast diff --git a/Core.lua b/Core.lua new file mode 100644 index 0000000..4a8a176 --- /dev/null +++ b/Core.lua @@ -0,0 +1,340 @@ +--[[---------------------------------------------------------- + Srendarr - Aura (Buff & Debuff) Tracker + ---------------------------------------------------------- + * + * Version 2.1.5 + * Kith, Garkin, silentgecko + * + * +]]-- +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = Srendarr:GetLocale() + +Srendarr.name = 'Srendarr' +Srendarr.slash = '/srendarr' +Srendarr.version = '2.1.5' +Srendarr.versionDB = 3 + +Srendarr.displayFrames = {} +Srendarr.displayFramesScene = {} + +Srendarr.slotData = {} + +Srendarr.auraLookup = { + ['player'] = {}, + ['reticleover'] = {}, + ['groundaoe'] = {} +} + +Srendarr.auraGroupStrings = { -- used in several places to display the aura grouping text + [Srendarr.GROUP_PLAYER_SHORT] = L.Group_Player_Short, + [Srendarr.GROUP_PLAYER_LONG] = L.Group_Player_Long, + [Srendarr.GROUP_PLAYER_TOGGLED] = L.Group_Player_Toggled, + [Srendarr.GROUP_PLAYER_PASSIVE] = L.Group_Player_Passive, + [Srendarr.GROUP_PLAYER_DEBUFF] = L.Group_Player_Debuff, + [Srendarr.GROUP_PLAYER_GROUND] = L.Group_Player_Ground, + [Srendarr.GROUP_PLAYER_MAJOR] = L.Group_Player_Major, + [Srendarr.GROUP_PLAYER_MINOR] = L.Group_Player_Minor, + [Srendarr.GROUP_TARGET_BUFF] = L.Group_Target_Buff, + [Srendarr.GROUP_TARGET_DEBUFF] = L.Group_Target_Debuff, + [Srendarr.GROUP_PROMINENT] = L.Group_Prominent +} + +Srendarr.uiLocked = true -- flag for whether the UI is current drag enabled + + +-- ------------------------ +-- ADDON INITIALIZATION +-- ------------------------ +function Srendarr.OnInitialize(code, addon) + if (addon ~= Srendarr.name) then return end + + local self = Srendarr + + EVENT_MANAGER:UnregisterForEvent(self.name, EVENT_ADD_ON_LOADED) + SLASH_COMMANDS[self.slash] = self.SlashCommand + + self.db = ZO_SavedVars:NewAccountWide('SrendarrDB', self.versionDB, nil, self:GetDefaults()) + + if (not self.db.useAccountWide) then -- not using global settings, generate (or load) character specific settings + self.db = ZO_SavedVars:New('SrendarrDB', self.versionDB, nil, self:GetDefaults()) + end + + local displayBase + + -- create display frames + for x = 1, self.NUM_DISPLAY_FRAMES do + displayBase = self.db.displayFrames[x].base + + self.displayFrames[x] = self.DisplayFrame:Create(x, displayBase.point, displayBase.x, displayBase.y, displayBase.alpha, displayBase.scale) + self.displayFrames[x]:Configure() + + -- add each frame to the ZOS scene manager to control visibility + self.displayFramesScene[x] = ZO_HUDFadeSceneFragment:New(self.displayFrames[x], 0, 0) + + HUD_SCENE:AddFragment(self.displayFramesScene[x]) + HUD_UI_SCENE:AddFragment(self.displayFramesScene[x]) + SIEGE_BAR_SCENE:AddFragment(self.displayFramesScene[x]) + + self.displayFrames[x]:SetHandler('OnEffectivelyShown', function(f) + f:SetAlpha(f.displayAlpha) -- ensure alpha is reset after a scene fade + end) + end + + self:PopulateFilteredAuras() -- AuraData.lua + self:ConfigureAuraFadeTime() -- Aura.lua + self:InitializeAuraControl() -- AuraControl.lua + self:InitializeCastBar() -- CastBar.lua + self:InitializeProcs() -- Procs.lua + self:InitializeSettings() -- Settings.lua + + -- setup events to handle actionbar slotted abilities (used for procs and the castbar) + for slot = 3, 8 do + self.slotData[slot] = {} + self.OnActionSlotUpdated(nil, slot) -- populate initial data (before events registered so no triggers before setup is done) + end + + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_ACTION_SLOTS_FULL_UPDATE, self.OnActionSlotsFullUpdate) + EVENT_MANAGER:RegisterForEvent(self.name, EVENT_ACTION_SLOT_UPDATED, self.OnActionSlotUpdated) +end + +function Srendarr.SlashCommand(text) + if (text == 'lock') then + for x = 1, Srendarr.NUM_DISPLAY_FRAMES do + Srendarr.displayFrames[x]:DisableDragOverlay() + end + + Srendarr.Cast:DisableDragOverlay() + + Srendarr.uiLocked = true + elseif (text == 'unlock') then + for x = 1, Srendarr.NUM_DISPLAY_FRAMES do + Srendarr.displayFrames[x]:EnableDragOverlay() + end + + Srendarr.Cast:EnableDragOverlay() + + Srendarr.uiLocked = false + else + CHAT_SYSTEM:AddMessage(L.Usage) + end +end + + +-- ------------------------ +-- SLOTTED ABILITY DATA HANDLING +-- ------------------------ +do + local GetSlotBoundId = GetSlotBoundId + local GetAbilityName = GetAbilityName + local GetAbilityCastInfo = GetAbilityCastInfo + local GetAbilityIcon = GetAbilityIcon + local procAbilityNames = Srendarr.procAbilityNames + + local abilityID, abilityName, slotData, isChannel, castTime, channelTime + + function Srendarr.OnActionSlotsFullUpdate() + for slot = 3, 8 do + Srendarr.OnActionSlotUpdated(nil, slot) + end + end + + function Srendarr.OnActionSlotUpdated(evt, slot) + if (slot < 3 or slot > 8) then return end -- abort if not a main ability (or ultimate) + + abilityID = GetSlotBoundId(slot) + slotData = Srendarr.slotData[slot] + + if (slotData.abilityID == abilityID) then return end -- nothing has changed, abort + + abilityName = GetAbilityName(abilityID) + + slotData.abilityID = abilityID + slotData.abilityName = abilityName + slotData.abilityIcon = GetAbilityIcon(abilityID) + + isChannel, castTime, channelTime = GetAbilityCastInfo(abilityID) + + if (castTime > 0 or channelTime > 0) then + slotData.isDelayed = true -- check for needing a cast bar + slotData.isChannel = isChannel + slotData.castTime = castTime + slotData.channelTime = channelTime + else + slotData.isDelayed = false + end + + if (procAbilityNames[abilityName]) then -- this is currently a proc'd ability (or special case for crystal fragments) + Srendarr:ProcAnimationStart(slot) + elseif (slot ~= 8) then -- cannot have procs on ultimate slot + Srendarr:ProcAnimationStop(slot) + end + end +end + + +-- ------------------------ +-- BLACKLIST AND PROMINENT AURAS CONTROL +do ------------------------ + local str_gsub = string.gsub + + local DoesAbilityExist = DoesAbilityExist + local GetAbilityName = GetAbilityName + local GetAbilityDuration = GetAbilityDuration + local GetAbilityDescription = GetAbilityDescription + + local fakeAuras = Srendarr.fakeAuras + + function Srendarr:ProminentAuraAdd(auraName) + auraName = str_gsub(auraName, '%^%a?', '') -- strip out any control characters player may have entered + + if (self.db.prominentWhitelist[auraName]) then return end -- already added this aura + + local matchedIDs = {} + local compareName + + for id = 1, 100000 do -- scan all abilityIDs looking for this auraName + if (DoesAbilityExist(id) and GetAbilityDuration(id) > 0) then + compareName = str_gsub(GetAbilityName(id), '%^%a?', '') -- strip out any control characters from the ability name + + if (compareName == auraName) then -- matching ability with a duration (no toggles or passives in prominence) + table.insert(matchedIDs, id) + end + end + end + + if (fakeAuras[auraName]) then -- a fake aura exists for this ability, add its ID + table.insert(matchedIDs, fakeAuras[auraName].abilityID) + end + + if (#matchedIDs > 0) then -- matches were found + self.db.prominentWhitelist[auraName] = {} -- add a new whitelist entry + + for _, id in ipairs(matchedIDs) do + self.db.prominentWhitelist[auraName][id] = true + end + + Srendarr:ConfigureAuraHandler() -- update handler ref + + CHAT_SYSTEM:AddMessage(string.format('%s: %s %s', L.Srendarr, auraName, L.Prominent_AuraAddSuccess)) -- inform user of successful addition + else + CHAT_SYSTEM:AddMessage(string.format('%s: %s %s', L.Srendarr, auraName, L.Prominent_AuraAddFail)) -- inform user of failed addition + end + end + + function Srendarr:ProminentAuraRemove(auraName) + auraName = str_gsub(auraName, '%^%a?', '') -- strip out any control characters player may have entered + + if (not self.db.prominentWhitelist[auraName]) then return end -- not in whitelist, abort + + for id in pairs(self.db.prominentWhitelist[auraName]) do + self.db.prominentWhitelist[auraName][id] = nil -- clean out whitelist entry + end + + self.db.prominentWhitelist[auraName] = nil -- remove whitelist entrys + + Srendarr:ConfigureAuraHandler() -- update handler ref + + CHAT_SYSTEM:AddMessage(string.format('%s: %s %s', L.Srendarr, auraName, L.Prominent_AuraRemoved)) -- inform user of removal + end + + function Srendarr:BlacklistAuraAdd(auraName) + auraName = str_gsub(auraName, '%^%a?', '') -- strip out any control characters player may have entered + + if (self.db.blacklist[auraName]) then return end -- already added this aura + + local matchedIDs = {} + local compareName + + for id = 1, 100000 do -- scan all abilityIDs looking for this auraName + if (DoesAbilityExist(id)) then + compareName = str_gsub(GetAbilityName(id), '%^%a?', '') -- strip out any control characters from the ability name + + if (compareName == auraName) then -- found a matching ability + table.insert(matchedIDs, id) + end + end + end + + if (fakeAuras[auraName]) then -- a fake aura exists for this ability, add its ID + table.insert(matchedIDs, fakeAuras[auraName].abilityID) + end + + if (#matchedIDs > 0) then -- matches were found + self.db.blacklist[auraName] = {} -- add a new blacklist entry + + for _, id in ipairs(matchedIDs) do + self.db.blacklist[auraName][id] = true + end + + Srendarr:PopulateFilteredAuras() -- update filtered aura IDs + + CHAT_SYSTEM:AddMessage(string.format('%s: %s %s', L.Srendarr, auraName, L.Blacklist_AuraAddSuccess)) -- inform user of successful addition + else + CHAT_SYSTEM:AddMessage(string.format('%s: %s %s', L.Srendarr, auraName, L.Blacklist_AuraAddFail)) -- inform user of failed addition + end + end + + function Srendarr:BlacklistAuraRemove(auraName) + auraName = str_gsub(auraName, '%^%a?', '') -- strip out any control characters player may have entered + + if (not self.db.blacklist[auraName]) then return end -- not in blacklist, abort + + for id in pairs(self.db.blacklist[auraName]) do + self.db.blacklist[auraName][id] = nil -- clean out blacklist entry + end + + self.db.blacklist[auraName] = nil -- remove blacklist entrys + + Srendarr:PopulateFilteredAuras() -- update filtered aura IDs + + CHAT_SYSTEM:AddMessage(string.format('%s: %s %s', L.Srendarr, auraName, L.Blacklist_AuraRemoved)) -- inform user of removal + end +end + + +-- ------------------------ +-- UI HELPER FUNCTIONS +-- ------------------------ +do + local math_abs = math.abs + local WM = WINDOW_MANAGER + + function Srendarr:GetEdgeRelativePosition(object) + local left, top = object:GetLeft(), object:GetTop() + local right, bottom = object:GetRight(), object:GetBottom() + local rootW, rootH = GuiRoot:GetWidth(), GuiRoot:GetHeight() + local point = 0 + local x, y + + if (left < (rootW - right) and left < math_abs((left + right) / 2 - rootW / 2)) then + x, point = left, 2 -- 'LEFT' + elseif ((rootW - right) < math_abs((left + right) / 2 - rootW / 2)) then + x, point = right - rootW, 8 -- 'RIGHT' + else + x, point = (left + right) / 2 - rootW / 2, 0 + end + + if (bottom < (rootH - top) and bottom < math_abs((bottom + top) / 2 - rootH / 2)) then + y, point = top, point + 1 -- 'TOP|TOPLEFT|TOPRIGHT' + elseif ((rootH - top) < math_abs((bottom + top) / 2 - rootH / 2)) then + y, point = bottom - rootH, point + 4 -- 'BOTTOM|BOTTOMLEFT|BOTTOMRIGHT' + else + y = (bottom + top) / 2 - rootH / 2 + end + + point = (point == 0) and 128 or point -- 'CENTER' + + return point, x, y + end + + function Srendarr.AddControl(parent, cType, level) + local c = WM:CreateControl(nil, parent, cType) + c:SetDrawLayer(DL_OVERLAY) + c:SetDrawLevel(level) + return c, c + end +end + + +EVENT_MANAGER:RegisterForEvent(Srendarr.name, EVENT_ADD_ON_LOADED, Srendarr.OnInitialize) diff --git a/Defaults.lua b/Defaults.lua new file mode 100644 index 0000000..bd4643f --- /dev/null +++ b/Defaults.lua @@ -0,0 +1,325 @@ +local Srendarr = _G['Srendarr'] -- grab addon table from global + +-- CONST DECLARATIONS : referenced locally in other files when needed -- +Srendarr.DEBUG_ABILITYID = false -- enable to show the abilityID for each aura + +Srendarr.AURA_UPDATE_RATE = 0.05 +Srendarr.CAST_UPDATE_RATE = 0.02 + +Srendarr.NUM_DISPLAY_FRAMES = 8 + +Srendarr.GROUP_PLAYER_SHORT = 1 -- categories to divide up auras for positioning in +Srendarr.GROUP_PLAYER_LONG = 2 -- the (player chosen) display frames +Srendarr.GROUP_PLAYER_TOGGLED = 3 +Srendarr.GROUP_PLAYER_PASSIVE = 4 +Srendarr.GROUP_PLAYER_DEBUFF = 5 +Srendarr.GROUP_PLAYER_GROUND = 6 +Srendarr.GROUP_PLAYER_MAJOR = 7 +Srendarr.GROUP_PLAYER_MINOR = 8 +Srendarr.GROUP_TARGET_BUFF = 10 +Srendarr.GROUP_TARGET_DEBUFF = 11 +Srendarr.GROUP_PROMINENT = 100 -- special case, only assigned to auras when whitelisted + +Srendarr.AURA_TYPE_TIMED = 1 +Srendarr.AURA_TYPE_TOGGLED = 2 +Srendarr.AURA_TYPE_PASSIVE = 3 + +Srendarr.AURA_HEIGHT = 40 + +Srendarr.AURA_STYLE_FULL = 1 +Srendarr.AURA_STYLE_ICON = 2 +Srendarr.AURA_STYLE_MINI = 3 + +Srendarr.AURA_GROW_UP = 1 +Srendarr.AURA_GROW_DOWN = 2 +Srendarr.AURA_GROW_LEFT = 3 +Srendarr.AURA_GROW_RIGHT = 4 +Srendarr.AURA_GROW_CENTERLEFT = 5 +Srendarr.AURA_GROW_CENTERRIGHT = 6 + +Srendarr.AURA_SORT_NAMEASC = 1 +Srendarr.AURA_SORT_TIMEASC = 2 +Srendarr.AURA_SORT_CASTASC = 3 +Srendarr.AURA_SORT_NAMEDESC = 4 +Srendarr.AURA_SORT_TIMEDESC = 5 +Srendarr.AURA_SORT_CASTDESC = 6 + +Srendarr.AURA_TIMERLOC_HIDDEN = 1 +Srendarr.AURA_TIMERLOC_OVER = 2 +Srendarr.AURA_TIMERLOC_ABOVE = 3 +Srendarr.AURA_TIMERLOC_BELOW = 4 + + +-- register our new default sound with LibMediaProvider (cannot be a localized name for consistant internal refs) +LibStub('LibMediaProvider-1.0'):Register('sound', 'Srendarr Ability Proc', SOUNDS.DEATH_RECAP_KILLING_BLOW_SHOWN) + + +local defaults = { + -- general + combatDisplayOnly = false, + auraFakeEnabled = true, + auraFadeTime = 2, + shortBuffThreshold = 35, + procEnableAnims = true, + procPlaySound = 'Srendarr Ability Proc', -- can be set to None by user + auraGroups = { + [Srendarr.GROUP_PLAYER_SHORT] = 1, -- set the displayFrame that will display this grouping + [Srendarr.GROUP_PLAYER_LONG] = 2, -- multiple groupings can go to a given frame + [Srendarr.GROUP_PLAYER_TOGGLED] = 2, + [Srendarr.GROUP_PLAYER_PASSIVE] = 2, -- a setting of 0 means don't display this grouping at all + [Srendarr.GROUP_PLAYER_DEBUFF] = 3, + [Srendarr.GROUP_PLAYER_GROUND] = 4, + [Srendarr.GROUP_PLAYER_MAJOR] = 1, + [Srendarr.GROUP_PLAYER_MINOR] = 1, + [Srendarr.GROUP_TARGET_BUFF] = 5, + [Srendarr.GROUP_TARGET_DEBUFF] = 6, + [Srendarr.GROUP_PROMINENT] = 0, + }, + prominentWhitelist = {}, -- list of auras that are filtered to the prominent group + blacklist = {}, -- list of auras that are to be blacklisted from display + -- filters + filtersPlayer = { + block = false, -- as these are filters, false means DO show this filter category + cyrodiil = false, + disguise = false, + mundusBoon = false, + soulSummons = false, + vampLycan = false, + vampLycanBite = false, + }, + filtersTarget = { + block = false, -- as these are filters, false means DO show this filter category + cyrodiil = false, + disguise = false, + majorEffects = false, + minorEffects = false, + mundusBoon = false, + soulSummons = false, + vampLycan = false, + vampLycanBite = false, + }, + castBar = { + enabled = true, + base = {point = BOTTOM, x = 0, y = -160, alpha = 1.0, scale = 1.0}, + nameShow = true, + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 15, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerShow = true, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 15, + timerColour = {0.9, 0.9, 0.9, 1.0}, + barReverse = false, -- bar alignment direction + barGloss = true, + barWidth = 255, + barColour = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + }, + displayFrames = { + [1] = { + base = {point = BOTTOMRIGHT, x = 0, y = 0, alpha = 1.0, scale = 1.0}, + style = Srendarr.AURA_STYLE_FULL, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_UP, -- UP|DOWN|LEFT|LEFTCENTER|RIGHT|RIGHTCENTER (valid choices vary based on style) + auraPadding = 3, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_OVER, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = true, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + [2] = { + base = {point = BOTTOMRIGHT, x = -210, y = 0, alpha = 1.0, scale = 1.0}, + style = Srendarr.AURA_STYLE_FULL, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_UP, -- UP|DOWN|LEFT|RIGHT|CENTERLEFT|CENTERRIGHT (valid choices vary based on style) + auraPadding = 3, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_OVER, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = true, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + [3] = { + base = {point = TOPRIGHT, x = 0, y = 0, alpha = 1.0, scale = 1.0}, + style = Srendarr.AURA_STYLE_FULL, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_DOWN, -- UP|DOWN|LEFT|RIGHT|CENTERLEFT|CENTERRIGHT (valid choices vary based on style) + auraPadding = 3, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_OVER, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = true, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + [4] = { + base = {point = TOPLEFT, x = 0, y = 0, alpha = 1.0, scale = 1.0}, + style = Srendarr.AURA_STYLE_FULL, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_DOWN, -- UP|DOWN|LEFT|RIGHT|CENTERLEFT|CENTERRIGHT (valid choices vary based on style) + auraPadding = 3, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_OVER, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = false, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + [5] = { + base = {point = TOP, x = 220, y = 88, alpha = 1.0, scale = 0.8}, + style = Srendarr.AURA_STYLE_ICON, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_RIGHT, -- UP|DOWN|LEFT|RIGHT|CENTERLEFT|CENTERRIGHT (valid choices vary based on style) + auraPadding = 4, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_BELOW, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = true, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + [6] = { + base = {point = TOP, x = -220, y = 88, alpha = 1.0, scale = 0.8}, + style = Srendarr.AURA_STYLE_ICON, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_LEFT, -- UP|DOWN|LEFT|RIGHT|CENTERLEFT|CENTERRIGHT (valid choices vary based on style) + auraPadding = 4, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_BELOW, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = true, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + [7] = { + base = {point = TOPLEFT, x = 500, y = 0, alpha = 1.0, scale = 1.0}, + style = Srendarr.AURA_STYLE_ICON, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_LEFT, -- UP|DOWN|LEFT|RIGHT|CENTERLEFT|CENTERRIGHT (valid choices vary based on style) + auraPadding = 4, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_BELOW, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = true, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + [8] = { + base = {point = TOPRIGHT, x = -500, y = 0, alpha = 1.0, scale = 1.0}, + style = Srendarr.AURA_STYLE_ICON, -- FULL|ICON|MINI + auraGrowth = Srendarr.AURA_GROW_RIGHT, -- UP|DOWN|LEFT|RIGHT|CENTERLEFT|CENTERRIGHT (valid choices vary based on style) + auraPadding = 4, + auraSort = Srendarr.AURA_SORT_TIMEASC, -- NAME|TIME|CAST + ASC|DESC + highlightToggled = true, -- shows the same 'toggled on' highlight action buttons do on toggles + nameFont = 'Univers 67', + nameStyle = 'soft-shadow-thick', + nameSize = 16, + nameColour = {0.9, 0.9, 0.9, 1.0}, + timerFont = 'Univers 67', + timerStyle = 'soft-shadow-thick', + timerSize = 14, + timerColour = {0.9, 0.9, 0.9, 1.0}, + timerLocation = Srendarr.AURA_TIMERLOC_BELOW, -- ABOVE|BELOW|OVER|HIDE (valid choices based on style) + barReverse = true, -- bar alignment direction (and icon placement in the FULL style) + barGloss = true, + barWidth = 160, + barColours = { + [Srendarr.AURA_TYPE_TIMED] = {r1 = 0, g1 = 0.1843, b1 = 0.5098, r2 = 0.3215, g2 = 0.8431, b2 = 1}, + [Srendarr.AURA_TYPE_TOGGLED] = {r1 = 0.7764, g1 = 0.6000, b1 = 0.1137, r2 = 0.9725, g2 = 0.8745, b2 = 0.2941}, + [Srendarr.AURA_TYPE_PASSIVE] = {r1 = 0.4196, g1 = 0.3803, b1 = 0.2313, r2 = 0.4196, g2 = 0.3803, b2 = 0.2313}, + }, + }, + } +} + +function Srendarr:GetDefaults() + return defaults +end diff --git a/DisplayFrame.lua b/DisplayFrame.lua new file mode 100644 index 0000000..a729488 --- /dev/null +++ b/DisplayFrame.lua @@ -0,0 +1,384 @@ +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = Srendarr:GetLocale() +local Aura = Srendarr.Aura +local DisplayFrame = {} + +-- CONSTS -- +local AURA_TYPE_TIMED = Srendarr.AURA_TYPE_TIMED +local AURA_TYPE_TOGGLED = Srendarr.AURA_TYPE_TOGGLED +local AURA_TYPE_PASSIVE = Srendarr.AURA_TYPE_PASSIVE + +local AURA_HEIGHT = Srendarr.AURA_HEIGHT + +local AURA_GROW_UP = Srendarr.AURA_GROW_UP +local AURA_GROW_DOWN = Srendarr.AURA_GROW_DOWN +local AURA_GROW_LEFT = Srendarr.AURA_GROW_LEFT +local AURA_GROW_RIGHT = Srendarr.AURA_GROW_RIGHT +local AURA_GROW_CENTERLEFT = Srendarr.AURA_GROW_CENTERLEFT +local AURA_GROW_CENTERRIGHT = Srendarr.AURA_GROW_CENTERRIGHT + +local AURA_SORT_NAMEASC = Srendarr.AURA_SORT_NAMEASC +local AURA_SORT_TIMEASC = Srendarr.AURA_SORT_TIMEASC +local AURA_SORT_CASTASC = Srendarr.AURA_SORT_CASTASC +local AURA_SORT_NAMEDESC = Srendarr.AURA_SORT_NAMEDESC +local AURA_SORT_TIMEDESC = Srendarr.AURA_SORT_TIMEDESC +local AURA_SORT_CASTDESC = Srendarr.AURA_SORT_CASTDESC + + +-- UPVALUES -- +local round = zo_round +local tsort = table.sort +local tinsert = table.insert +local tremove = table.remove +local AddControl = Srendarr.AddControl + + +-- ------------------------ +-- SORTING FUNCTIONS +-- ------------------------ +local function SortAurasByTimeAsc(a, b) + if (a.auraType == AURA_TYPE_TIMED and b.auraType == AURA_TYPE_TIMED) then -- timed auras, sort by time + return a.finish > b.finish + elseif (a.auraType == b.auraType) then -- non-timed auras, same type, sort by name + return a.auraName < b.auraName + else -- non-timed auras, different types, sort by type + return a.auraType > b.auraType + end +end + +local function SortAurasByNameAsc(a, b) + return a.auraName < b.auraName +end + +local function SortAurasByCastAsc(a, b) + return a.start < b.start +end + +local function SortAurasByTimeDesc(a, b) + if (a.auraType == AURA_TYPE_TIMED and b.auraType == AURA_TYPE_TIMED) then -- timed auras, sort by time + return a.finish < b.finish + elseif (a.auraType == b.auraType) then -- non-timed auras, same type, sort by name + return a.auraName > b.auraName + else -- non-timed auras, different types, sort by type + return a.auraType < b.auraType + end +end + +local function SortAurasByNameDesc(a, b) + return a.auraName > b.auraName +end + +local function SortAurasByCastDesc(a, b) + return a.start > b.start +end + + +-- ------------------------ +-- DISPLAY FRAME +-- ------------------------ +function DisplayFrame:Create(id, point, x, y, alpha, scale) + local df = WINDOW_MANAGER:CreateControl(nil, GuiRoot, CT_TOPLEVELCONTROL) + df:SetKeyboardEnabled(false) + df:SetMouseEnabled(false) + df:SetMovable(false) + df:SetClampedToScreen(true) + df:SetDimensions(AURA_HEIGHT, AURA_HEIGHT) + df:SetAnchor(point, GuiRoot, point, x, y) + df:SetAlpha(alpha) -- both values, if configured after load, are done directly) + df:SetScale(scale) -- both values, if configured after load, are done directly) + + df.displayAlpha = alpha + df.displayID = id + + df:SetHandler('OnReceiveDrag', function(f) + f:StartMoving() + end) + df:SetHandler('OnMouseUp', function(f) + f:StopMovingOrResizing() + local point, x, y = Srendarr:GetEdgeRelativePosition(f) + Srendarr.db.displayFrames[f.displayID].base.point = point + Srendarr.db.displayFrames[f.displayID].base.x = x + Srendarr.db.displayFrames[f.displayID].base.y = y + end) + + df.aurasActive = {} + df.aurasInactive = {} + df.aurasSorted = {} + df.settings = Srendarr.db.displayFrames[id] + + -- aura handling + df['AddAuraToDisplay'] = DisplayFrame.AddAuraToDisplay + df['OnAuraReleased'] = DisplayFrame.OnAuraReleased + df['ConfigureAssignedAuras']= DisplayFrame.ConfigureAssignedAuras + -- configuration + df['Configure'] = DisplayFrame.Configure +-- df['UpdateDisplay'] = [Set By Configure] + -- drag overlay + df['EnableDragOverlay'] = DisplayFrame.EnableDragOverlay + df['DisableDragOverlay'] = DisplayFrame.DisableDragOverlay + df['ConfigureDragOverlay'] = DisplayFrame.ConfigureDragOverlay + + return df +end + + +-- ------------------------ +-- AURA HANDLING +-- ------------------------ +function DisplayFrame:AddAuraToDisplay(flagBurst, auraGroup, auraType, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + local aura = tremove(self.aurasInactive, 1) -- grab an aura from inactive pool (if any) + + if (not aura) then -- no inactive auras, create one + aura = Srendarr.Aura:Create(self) + aura:Configure(self.settings) + end + + aura:Initialize(auraGroup, auraType, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + + self.aurasActive[aura.auraID] = aura + + tinsert(self.aurasSorted, aura) + + if (not flagBurst) then + self:UpdateDisplay() + end +end + +function DisplayFrame:OnAuraReleased(flagBurst, aura) + if (self.aurasActive[aura.auraID]) then -- aura is displayed here, remove it + self.aurasActive[aura.auraID] = nil + + tinsert(self.aurasInactive, aura) + + for i, sortedAura in ipairs(self.aurasSorted) do + if (sortedAura.auraID == aura.auraID) then + tremove(self.aurasSorted, i) + break + end + end + + if (not flagBurst) then + self:UpdateDisplay() + end + end +end + +function DisplayFrame:ConfigureAssignedAuras() + for _, aura in pairs(self.aurasActive) do -- configure all active auras assigned to this display frame + aura:Configure(self.settings) + aura:UpdateVisuals() + end + + for _, aura in pairs(self.aurasInactive) do -- configure all inactive auras in this display frame's pool + aura:Configure(self.settings) + end +end + + +-- ------------------------ +-- CONFIGURATION +-- ------------------------ +local function UpdateDisplayCentered(self) + tsort(self.aurasSorted, self.SortAuras) + + local offsetI = self.displayOffsetX * ((#self.aurasSorted - 1) / 2) + + for i, aura in ipairs(self.aurasSorted) do + aura:ClearAnchors() + aura:SetAnchor(CENTER, self, CENTER, offsetI, 0) + offsetI = offsetI - self.displayOffsetX + end +end + +local function UpdateDisplayDirectional(self) + tsort(self.aurasSorted, self.SortAuras) + + for i, aura in ipairs(self.aurasSorted) do + aura:ClearAnchors() + aura:SetAnchor(self.displayPoint, self, self.displayPoint, self.displayOffsetX * (i - 1), self.displayOffsetY * (i - 1)) + end +end + +function DisplayFrame:Configure() + local db = self.settings + + if (db.auraSort == AURA_SORT_NAMEASC) then + self['SortAuras'] = SortAurasByNameAsc + elseif (db.auraSort == AURA_SORT_TIMEASC) then + self['SortAuras'] = SortAurasByTimeAsc + elseif (db.auraSort == AURA_SORT_CASTASC) then + self['SortAuras'] = SortAurasByCastAsc + elseif (db.auraSort == AURA_SORT_NAMEDESC) then + self['SortAuras'] = SortAurasByNameDesc + elseif (db.auraSort == AURA_SORT_TIMEDESC) then + self['SortAuras'] = SortAurasByTimeDesc + elseif (db.auraSort == AURA_SORT_CASTDESC) then + self['SortAuras'] = SortAurasByCastDesc + end + + if (db.auraGrowth == AURA_GROW_CENTERLEFT or db.auraGrowth == AURA_GROW_CENTERRIGHT) then + self.displayOffsetX = round((db.auraPadding + AURA_HEIGHT) * ((db.auraGrowth == AURA_GROW_CENTERLEFT) and 1 or -1)) + self['UpdateDisplay'] = UpdateDisplayCentered + else + if (db.auraGrowth == AURA_GROW_UP) then + self.displayPoint = BOTTOM + self.displayOffsetX = 0 + self.displayOffsetY = round(-1 * (db.auraPadding + AURA_HEIGHT)) + elseif (db.auraGrowth == AURA_GROW_DOWN) then + self.displayPoint = TOP + self.displayOffsetX = 0 + self.displayOffsetY = round(db.auraPadding + AURA_HEIGHT) + elseif (db.auraGrowth == AURA_GROW_LEFT) then + self.displayPoint = RIGHT + self.displayOffsetX = round(-1 * (db.auraPadding + AURA_HEIGHT)) + self.displayOffsetY = 0 + else -- AURA_GROW_RIGHT + self.displayPoint = LEFT + self.displayOffsetX = round(db.auraPadding + AURA_HEIGHT) + self.displayOffsetY = 0 + end + + self['UpdateDisplay'] = UpdateDisplayDirectional + end +end + + +-- ------------------------ +-- DRAG OVERLAY +-- ------------------------ +local function OnMouseEnter(self) + self.dragOverlay.highlight:SetHidden(false) + InitializeTooltip(InformationTooltip, self, TOP, 0, 4) + InformationTooltip:AddLine(self.tooltipText, '$(BOLD_FONT)|14', ZO_TOOLTIP_DEFAULT_COLOR:UnpackRGB()) +end + +local function OnMouseExit(self) + self.dragOverlay.highlight:SetHidden(true) + ClearTooltip(InformationTooltip) +end + +local function CreateDragOverlay(self) + local ctrl, anim + + local drag = AddControl(self, CT_TEXTURE, 3) + drag:SetDimensions(AURA_HEIGHT, AURA_HEIGHT) + drag:SetAnchor(CENTER) + drag:SetTexture([[/esoui/art/actionbar/abilityframe64_up.dds]]) -- border (and root) + -- OVERLAY ICON + drag.icon, ctrl = AddControl(drag, CT_TEXTURE, 2) + ctrl:SetDimensions(AURA_HEIGHT, AURA_HEIGHT) + ctrl:SetAnchor(CENTER) + ctrl:SetTexture[[/esoui/art/icons/ability_restorationstaff_001.dds]] + -- MOUSEOVER HIGHLIGHT + drag.highlight, ctrl = AddControl(drag, CT_TEXTURE, 4) + ctrl:SetDimensions(AURA_HEIGHT, AURA_HEIGHT) + ctrl:SetAnchor(CENTER) + ctrl:SetTexture([[/esoui/art/actionbar/actionslot_toggledon.dds]]) + ctrl:SetColor(1, 0.82, 0) + ctrl:SetHidden(true) + -- LABEL + drag.label, ctrl = AddControl(drag, CT_LABEL, 4) + ctrl:SetFont('ZoFontWinH1') + ctrl:SetDimensions(AURA_HEIGHT, AURA_HEIGHT) + ctrl:SetAnchor(CENTER) + ctrl:SetVerticalAlignment(1) + ctrl:SetHorizontalAlignment(1) + ctrl:SetColor(0.64, 0.52, 0, 1) + ctrl:SetText(self.displayID) + -- AURA OUTLINES + drag.auraOutlines = {} + for x = 1, 4 do + drag.auraOutlines[x], ctrl = AddControl(drag, CT_BACKDROP, 1) + ctrl:SetHeight(AURA_HEIGHT) + ctrl:SetCenterColor(0, 0.5, 0.7, 0.24 / x) + ctrl:SetEdgeColor(0, 0.5, 0.7, 0.32 / x) + ctrl:SetEdgeTexture('', 8, 1, 0) + end + -- ANIMATION + drag.timeline = ANIMATION_MANAGER:CreateTimeline() + drag.timeline:SetPlaybackType(ANIMATION_PLAYBACK_LOOP, -1) + anim = drag.timeline:InsertAnimation(ANIMATION_COLOR, drag.label, 0) + anim:SetDuration(750) + anim:SetEasingFunction(ZO_LinearEase) + anim:SetColorValues(0.64, 0.52, 0, 1, 1, 0.82, 0, 1) + anim = drag.timeline:InsertAnimation(ANIMATION_COLOR, drag.label, 750) + anim:SetDuration(750) + anim:SetEasingFunction(ZO_LinearEase) + anim:SetColorValues(1, 0.82, 0, 1, 0.64, 0.52, 0, 1) + + self:SetHandler('OnMouseEnter', OnMouseEnter) + self:SetHandler('OnMouseExit', OnMouseExit) + + self.dragOverlay = drag +end + +function DisplayFrame:ConfigureDragOverlay() + if (not self.dragOverlay) then return end -- no overlay yet, so no need to configure it + + local db = self.settings + local drag = self.dragOverlay + local outline, offsetI + + local outlineWidth = AURA_HEIGHT + local point = self.displayPoint + self.tooltipText = zo_strformat('|cffffff<<Z:1>>|r', L.Group_Displayed_Here) + + local noGroups = true -- check if there are no groups assigned to this frame + + for group, frame in pairs(Srendarr.db.auraGroups) do + if (frame == self.displayID) then -- this group is being show on this frame + self.tooltipText = string.format('%s\n%s', self.tooltipText, Srendarr.auraGroupStrings[group]) + noGroups = false + end + end + + if (noGroups) then + self.tooltipText = string.format('%s\n%s', self.tooltipText, L.Group_Displayed_None) + end + + if (db.auraGrowth == AURA_GROW_CENTERLEFT or db.auraGrowth == AURA_GROW_CENTERRIGHT) then + offsetI = self.displayOffsetX * 1.5 + elseif (db.auraGrowth == AURA_GROW_UP or db.auraGrowth == AURA_GROW_DOWN) then + point = (db.barReverse and TOPRIGHT or TOPLEFT) + outlineWidth = AURA_HEIGHT + 3 + db.barWidth + end + + for x = 1, 4 do + outline = drag.auraOutlines[x] + outline:ClearAnchors() + + if (db.auraGrowth == AURA_GROW_CENTERLEFT or db.auraGrowth == AURA_GROW_CENTERRIGHT) then + outline:SetAnchor(CENTER, self, CENTER, offsetI, 0) + offsetI = offsetI - self.displayOffsetX + else + outline:SetAnchor(point, self, point, self.displayOffsetX * (x - 1), self.displayOffsetY * (x - 1)) + end + + outline:SetWidth(outlineWidth) + end +end + +function DisplayFrame:EnableDragOverlay() + if (not self.dragOverlay) then + CreateDragOverlay(self) + end + + self:ConfigureDragOverlay() + self:SetMouseEnabled(true) + self:SetMovable(true) + self.dragOverlay:SetHidden(false) + self.dragOverlay.timeline:PlayFromStart() +end + +function DisplayFrame:DisableDragOverlay() + self:SetMouseEnabled(false) + self:SetMovable(false) + + if (self.dragOverlay) then + self.dragOverlay.timeline:Stop() + self.dragOverlay:SetHidden(true) + end +end + + +Srendarr.DisplayFrame = DisplayFrame diff --git a/Events.lua b/Events.lua deleted file mode 100644 index f42082d..0000000 --- a/Events.lua +++ /dev/null @@ -1,680 +0,0 @@ -local Srendarr = _G['Srendarr'] -local L = Srendarr:GetLocale() - -local ATTRIBUTE_VISUAL_POWER_SHIELDING = ATTRIBUTE_VISUAL_POWER_SHIELDING -local EVENT_PLAYER_DEAD = EVENT_PLAYER_DEAD -local IsSlotUsed = IsSlotUsed -local GetSlotName = GetSlotName -local GetSlotTexture = GetSlotTexture -local GetSlotBoundId = GetSlotBoundId -local GetSlotItemSound = GetSlotItemSound -local GetAbilityDuration = GetAbilityDuration -local GetAbilityCastInfo = GetAbilityCastInfo -local GetGameTimeMilliseconds = GetGameTimeMilliseconds - -local db, auraFrameLong, auraFrameShort, auraFrameDebuffs - --- HOTBAR WATCHLIST -- -local watchlist = { - [3] = {name = false, buff = false, debuff = false, cast = 0, texture = '', isShield = false, abilityId = 0}, - [4] = {name = false, buff = false, debuff = false, cast = 0, texture = '', isShield = false, abilityId = 0}, - [5] = {name = false, buff = false, debuff = false, cast = 0, texture = '', isShield = false, abilityId = 0}, - [6] = {name = false, buff = false, debuff = false, cast = 0, texture = '', isShield = false, abilityId = 0}, - [7] = {name = false, buff = false, debuff = false, cast = 0, texture = '', isShield = false, abilityId = 0}, - [8] = {name = false, buff = false, debuff = false, cast = 0, texture = '', isShield = false, abilityId = 0}, - [9] = {name = false, buff = false, debuff = false, cast = 0, texture = '', isShield = false, abilityId = 0}, -} -local triggeredSlots = {} - -function Srendarr:GetTriggeredSlotNum(name) - return triggeredSlots[name] -end - -do -- BUTTON HOOKS FOR CAST DETECTION - local CostFail = HasCostFailure - local ReqFail = HasRequirementFailure - local WeaponFail = HasWeaponSlotFailure - local TargetFail = HasTargetFailure - local RangeFail = HasRangeFailure - local StatusFail = HasStatusEffectFailure - local FallingFail = HasFallingFailure - local SwimmingFail = HasSwimmingFailure - local MountedFail = HasMountedFailure - local RezFail = HasReincarnatingFailure - local GetSlotCooldownInfo = GetSlotCooldownInfo - local zomax = zo_max - local B_PRESSED = BSTATE_PRESSED - local B_NORMAL = BSTATE_NORMAL - local SPAM_THRESHOLD = Srendarr.SPAM_THRESHOLD - - local buffFrame, debuffFrame - - local ActionButton_SetState_Orig - local QuickSlotButton_SetState_Orig - - local flags = { - [3] = false, - [4] = false, - [5] = false, - [6] = false, - [7] = false, - [8] = false, - [9] = false, - } - local lastCast = { - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 0, - [8] = 0, - [9] = 0, - } - local watched = {} - - local function ActionFailed(slot) - if (CostFail(slot) or ReqFail(slot) or WeaponFail(slot) or TargetFail(slot) - or RangeFail(slot) or StatusFail(slot) or FallingFail(slot) - or SwimmingFail(slot) or MountedFail(slot) or RezFail(slot) - ) then - return true - end - return false - end - - local function ActionButton_SetState_Hook(self, state, locked) - ActionButton_SetState_Orig(self, state, locked) - - -- Trigger event for target debuff list - Srendarr:OnTargetChanged() - local slot = self.slotNum - if (watched[slot]) then -- only proceed if this button is being watched - if (state == B_PRESSED) then - flags[slot] = true - elseif (state == B_NORMAL) then - if (flags[slot]) then -- button was just pressed, this is a cast attempt - local start = GetGameTimeMilliseconds() / 1000 - - if (not ActionFailed(slot) and (start > lastCast[slot] + SPAM_THRESHOLD)) then -- avoid failure and button mashing - local casting = watchlist[slot] - - local proc = Srendarr:HasProc(casting.name) --for now just Crystal Fragments - if proc then - if buffFrame.k_auraActive[proc] then - casting.cast = 0 - end - end - - -- @todo Here Buff / Debuff section - if (casting.buff) then -- buff in this slot - buffFrame:AddAura(1, 1, casting.name, casting.texture, (start + casting.cast), (start + casting.cast + casting.buff), casting.isShield, nil, nil, casting.abilityId, BUFF_EFFECT_TYPE_BUFF) - end - - if (casting.debuff) then -- debuff in this slot - debuffFrame:AddAura(1, 2, casting.name, casting.texture, (start + casting.cast), (start + casting.cast + casting.debuff), casting.isShield, nil, nil, casting.abilityId, BUFF_EFFECT_TYPE_DEBUFF) - end - - lastCast[slot] = start - - --check for class passive effects - local name, buff, debuff, texture, abilityId = Srendarr:GetClassPassiveSkillEffect(casting.name) - if (name) then - if (buff) then - buffFrame:AddAura(1, 1, name, texture, (start + casting.cast), (start + casting.cast) + buff, false, nil, nil, abilityId, BUFF_EFFECT_TYPE_BUFF) - end - - if (debuff) then - debuffFrame:AddAura(1, 2, name, casting.texture, (start + casting.cast), (start + casting.cast) + debuff, false, nil, nil, abilityId, BUFF_EFFECT_TYPE_DEBUFF) - end - end - end - end - flags[slot] = false - end - end - end - - local function QuickSlotButton_SetState_Hook(self, state, locked) - QuickSlotButton_SetState_Orig(self, state, locked) - - if (watched[9]) then - local start = GetGameTimeMilliseconds() / 1000 - - if (start > lastCast[9]) then - local button = ZO_ActionBar_GetButton(9) - local slotNum = button:GetSlot() - if button.useable then - local timeLeft = GetSlotCooldownInfo(slotNum) - - lastCast[9] = start + zomax((timeLeft / 1000), SPAM_THRESHOLD) - - local casting = watchlist[9] - - if (casting.buff) then - buffFrame:AddAura(1, 1, casting.name, casting.texture, start, start + casting.buff, false, nil, nil, casting.abilityId, BUFF_EFFECT_TYPE_BUFF) - end - - if (casting.debuff) then - debuffFrame:AddAura(1, 2, casting.name, casting.texture, start, start + casting.debuff, false, nil, nil, casting.abilityId, BUFF_EFFECT_TYPE_DEBUFF) - end - end - end - end - end - - function Srendarr:SetupActionButtonHooks() - buffFrame = Srendarr.auraFrames[1] -- short term always go to the first frame - debuffFrame = Srendarr.auraFrames[3] -- debuffs always go to the third frame - - ActionButton_SetState_Orig = ActionButton3Button.SetState - ActionButton3Button.SetState = ActionButton_SetState_Hook - ActionButton4Button.SetState = ActionButton_SetState_Hook - ActionButton5Button.SetState = ActionButton_SetState_Hook - ActionButton6Button.SetState = ActionButton_SetState_Hook - ActionButton7Button.SetState = ActionButton_SetState_Hook - --ultimate - ActionButton8Button.SetState = ActionButton_SetState_Hook - --quickslot - QuickSlotButton_SetState_Orig = ActionButton9Button.SetState - ActionButton9Button.SetState = QuickSlotButton_SetState_Hook - end - - function Srendarr:ConfigureActionButtonWatcher(slotNum) - watched[slotNum] = (watchlist[slotNum].name) and true or false - end -end - -function Srendarr.OnActionSlotChanged(evt, slotNum) - if (slotNum < 3 or slotNum > 8) then return end - - local actionButton - if slotNum ~= 8 then - for ability, slot in pairs(triggeredSlots) do - if (slot == slotNum) then - triggeredSlots[ability] = nil - end - end - - actionButton = ZO_ActionBar_GetButton(slotNum) - if Srendarr:IsPlayingProcAnimation(actionButton) then - Srendarr:StopProcAnimations(actionButton) - end - end - - if (IsSlotUsed(slotNum)) then - local ability = GetSlotName(slotNum) - local abilityId = GetSlotBoundId(slotNum) - local texture = GetSlotTexture(slotNum) - local buff, debuff, cast, corrections = Srendarr:GetAuraData(ability) - - --corrections - local duration = GetAbilityDuration(abilityId) - if (duration > 0 and corrections ~= 3) then - if (buff and buff > 0 and (not corrections or corrections == 1)) then - buff = duration / 1000 - end - if (debuff and debuff > 0 and (not corrections or corrections == 2)) then - debuff = duration / 1000 - end - end - local channeled, castTime, channelTime = GetAbilityCastInfo(abilityId) - if (castTime > 0) then - cast = castTime / 1000 - end - - if (not Srendarr.db.showDebuff) then - debuff = false -- if not showing debuffs, then don't track - end - - if (buff or debuff) then - local data = watchlist[slotNum] - data.name = ability - data.buff = buff - data.debuff = debuff - data.cast = cast - data.texture = texture - data.isShield = Srendarr:IsDamageShield(ability) - data.abilityId = abilityId - else - watchlist[slotNum].name = false - end - - --proc animaitons - if slotNum ~= 8 then - local proc = Srendarr:HasProc(ability) - if Srendarr:IsProc(ability) then - Srendarr:PlayProcAnimations(actionButton) - elseif proc then - triggeredSlots[proc] = slotNum - local aura = auraFrameShort.k_auraActive[proc] - if aura then - local remaining = (aura.k_finish * 1000) - GetGameTimeMilliseconds() - if remaining > 0 then - Srendarr:PlayProcAnimations(actionButton, true) - end - end - end - end - else - watchlist[slotNum].name = false - end - - Srendarr:ConfigureActionButtonWatcher(slotNum) -end - -function Srendarr.OnActionSlotsFullUpdate(evt, isHotbarSwap) - for slotNum = 3, 8 do - Srendarr.OnActionSlotChanged(evt, slotNum) - end -end - -function Srendarr.OnQuickSlotChanged(evt, slotNum) - if (IsSlotUsed(slotNum) and GetSlotItemSound(slotNum) == ITEM_SOUND_CATEGORY_POTION) then --only care about potions - local ability = GetSlotName(slotNum) - local abilityId = GetSlotBoundId(slotNum) - local texture = GetSlotTexture(slotNum) - local buff, debuff = Srendarr:GetPotionData(ability, abilityId) - - --corrections - if (buff and buff > 0) then - buff = buff * Srendarr:GetMedicinalUseCoefficient() - end - if (debuff and debuff > 0) then - debuff = debuff * Srendarr:GetMedicinalUseCoefficient() - end - - if (not Srendarr.db.showDebuff) then - debuff = false -- if not showing debuffs, then don't track - end - - if (buff or debuff) then - local data = watchlist[9] - data.name = ability - data.buff = buff - data.debuff = debuff - data.cast = 0 - data.texture = texture - data.isShield = false - data.abilityId = abilityId - else - watchlist[9].name = false - end - - else - watchlist[9].name = false - end - - Srendarr:ConfigureActionButtonWatcher(9) -end - -do --triggered effects animations - local AM = ANIMATION_MANAGER - local WM = WINDOW_MANAGER - local PlaySound = PlaySound - - local function CreateProcAnimations(actionButton) - if not actionButton.procBurstTimeline then - actionButton.procBurstTexture = WM:CreateControl("$(parent)Burst", actionButton.slot, CT_TEXTURE) - actionButton.procBurstTexture:SetAnchor(TOPLEFT, actionButton.slot:GetNamedChild("FlipCard")) - actionButton.procBurstTexture:SetAnchor(BOTTOMRIGHT, actionButton.slot:GetNamedChild("FlipCard")) - actionButton.procBurstTexture:SetTexture("EsoUI/Art/ActionBar/coolDown_completeEFX.dds") - actionButton.procBurstTexture:SetBlendMode(TEX_BLEND_MODE_ADD) - actionButton.procBurstTexture:SetDrawLevel(2) - actionButton.procBurstTexture:SetHidden(true) - actionButton.procLoopTexture = WM:CreateControl("$(parent)Loop", actionButton.slot, CT_TEXTURE) - actionButton.procLoopTexture:SetAnchor(TOPLEFT, actionButton.slot:GetNamedChild("FlipCard")) - actionButton.procLoopTexture:SetAnchor(BOTTOMRIGHT, actionButton.slot:GetNamedChild("FlipCard")) - actionButton.procLoopTexture:SetTexture("EsoUI/Art/ActionBar/abilityHighlight_mage_med.dds") - actionButton.procLoopTexture:SetBlendMode(TEX_BLEND_MODE_ADD) - actionButton.procLoopTexture:SetDrawLevel(2) - actionButton.procLoopTexture:SetHidden(true) - - actionButton.procBurstTimeline = AM:CreateTimelineFromVirtual("UltimateReadyBurst", actionButton.procBurstTexture) - actionButton.procLoopTimeline = AM:CreateTimelineFromVirtual("UltimateReadyLoop", actionButton.procLoopTexture) - - actionButton.procBurstTimeline:SetHandler("OnPlay", function() PlaySound(SOUNDS.DEATH_RECAP_KILLING_BLOW_SHOWN) end) - - local function OnStop(self) - if(self:GetProgress() == 1) then - actionButton.procBurstTexture:SetHidden(true) - actionButton.procLoopTimeline:PlayFromStart() - actionButton.procLoopTexture:SetHidden(false) - end - end - actionButton.procBurstTimeline:SetHandler("OnStop", OnStop) - - actionButton.procLoopTimeline:SetHandler("OnStop", function() actionButton.procLoopTexture:SetHidden(true) end) - end - end - - function Srendarr:PlayProcAnimations(actionButton, isActive) - CreateProcAnimations(actionButton) - if actionButton.procBurstTimeline then - if not actionButton.procBurstTimeline:IsPlaying() and not actionButton.procLoopTimeline:IsPlaying() then - if isActive then - actionButton.procLoopTimeline:PlayFromStart() - actionButton.procLoopTexture:SetHidden(false) - else - actionButton.procBurstTimeline:PlayFromStart() - actionButton.procBurstTexture:SetHidden(false) - end - end - end - end - - function Srendarr:StopProcAnimations(actionButton) - if actionButton.procBurstTimeline then - actionButton.procBurstTexture:SetHidden(true) - actionButton.procLoopTexture:SetHidden(true) - actionButton.procBurstTimeline:Stop() - actionButton.procLoopTimeline:Stop() - end - end - - function Srendarr:IsPlayingProcAnimation(actionButton) - if actionButton.procBurstTimeline then - return actionButton.procBurstTimeline:IsPlaying() or actionButton.procLoopTimeline:IsPlaying() - end - end -end - -function Srendarr.OnEffectChanged(_, change, buff, name, unit, start, finish, stack, icon, _, effectType, abilityType, statusEffectType, unitName, unitId, abilityId) - if (unit ~= 'player') then return end - -- Trigger event for target debuff list - Srendarr:OnTargetChanged() - - -- Skip Minor Buffs - if (Srendarr.db.hideMinorBuffs and Srendarr.MinorBuffs[abilityId] ~= nil) then - return - end - - -- Skip Major Buffs - if (Srendarr.db.hideMajorBuffs and Srendarr.MajorBuffs[abilityId] ~= nil) then - return - end - - if (change == EFFECT_RESULT_FADED) then -- losing an aura - if (auraFrameLong.k_auraActive[name]) then - if (auraFrameLong.k_auraActive[name].k_type < 3) then -- timed, ghost it - auraFrameLong.k_auraActive[name]:Ghost() - else -- non timed, kill it - auraFrameLong:RemoveAura(name) - end - end - if(effectType == BUFF_EFFECT_TYPE_DEBUFF) then - if (auraFrameDebuffs.k_auraActive[name]) then - if (auraFrameDebuffs.k_auraActive[name].k_type < 1) then -- timed, ghost it - auraFrameDebuffs.k_auraActive[name]:Ghost() - else -- non timed, kill it - auraFrameDebuffs:RemoveAura(name) - end - end - else - if (auraFrameShort.k_auraActive[name]) then - if (auraFrameShort.k_auraActive[name].k_type < 1) then -- timed, ghost it - auraFrameShort.k_auraActive[name]:Ghost() - else -- non timed, kill it - auraFrameShort:RemoveAura(name) - end - end - end - if (abilityType == ABILITY_TYPE_REGISTERTRIGGER) then - local slotNum = triggeredSlots[name] - if slotNum then - local actionButton = ZO_ActionBar_GetButton(slotNum) - Srendarr:StopProcAnimations(actionButton) - end - end - else -- adding or updating an aura - local isShield = abilityType == ABILITY_TYPE_DAMAGESHIELD - if (finish > start) then -- timed ability - if(effectType == BUFF_EFFECT_TYPE_DEBUFF) then - --- d('abilityId', abilityId) --- d('abilityName', name) --- d('buff', buff) --- d('effectType', effectType) --- d('statufEffectType', statusEffectType) - if (Srendarr:IsWatchedTimed(name)) then - auraFrameDebuffs:AddAura(1, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - end - else - if (finish - start < db.shortBuffThreshold) then - if (Srendarr:IsWatchedTimed(name)) then - auraFrameShort:AddAura(1, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - end - else - if (Srendarr:IsWatchedTimed(name)) then - auraFrameLong:AddAura(2, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - end - end - end - elseif (Srendarr:IsToggled(name)) then -- toggled ability - if (db.showToggle) then -- showing toggled - auraFrameLong:AddAura(3, 1, name, icon, 1, 1, isShield, abilityType, buff, abilityId, effectType) - end - else -- passive (assumption: passives have start = finish) - if (abilityType == ABILITY_TYPE_REGISTERTRIGGER) then - local duration = Srendarr:GetAuraData(name) or 0 - auraFrameShort:AddAura(1, 1, name, icon, start, start + duration, isShield, abilityType, buff, abilityId, effectType) - elseif (Srendarr:IsWatchedPassive(name, abilityType)) then - auraFrameLong:AddAura(4, 1, name, icon, 1, 1, isShield, abilityType, buff, abilityId, effectType) - end - end - if (abilityType == ABILITY_TYPE_REGISTERTRIGGER) then - local slotNum = triggeredSlots[name] - if slotNum then - local actionButton = ZO_ActionBar_GetButton(slotNum) - Srendarr:PlayProcAnimations(actionButton) - end - end - if (name == L.Passive_MedicinalUse) then - Srendarr:SetMedicinalUseCoefficient(abilityId) - end - end -end - -do --shields - local GetUnitAttributeVisualizerEffectInfo = GetUnitAttributeVisualizerEffectInfo - local callLater = zo_callLater - - local function RemoveShields() - local value = GetUnitAttributeVisualizerEffectInfo('player', ATTRIBUTE_VISUAL_POWER_SHIELDING, STAT_MITIGATION, ATTRIBUTE_HEALTH, POWERTYPE_HEALTH) or 0 - - if (value <= 0) then - -- shields are always 'short', remove from [1] if present - for _, aura in pairs(auraFrameShort.k_auraActive) do - if (aura.k_isShield) then - aura:Ghost() - end - end - end - end - - function Srendarr.OnVisualRemoved(_, unit, visual, ...) - if (unit == 'player' and visual == ATTRIBUTE_VISUAL_POWER_SHIELDING) then - callLater(RemoveShields, 5) - end - end -end - -function Srendarr.OnPlayerDeath(event) - if (event == EVENT_PLAYER_DEAD) then -- player died - Srendarr:StripAuras() - else -- player lives again - Srendarr:UpdateAuras() - end -end - -do - local equippedArmor = { - [EQUIP_SLOT_CHEST] = ARMORTYPE_NONE, - [EQUIP_SLOT_FEET] = ARMORTYPE_NONE, - [EQUIP_SLOT_HAND] = ARMORTYPE_NONE, - [EQUIP_SLOT_HEAD] = ARMORTYPE_NONE, - [EQUIP_SLOT_LEGS] = ARMORTYPE_NONE, - [EQUIP_SLOT_SHOULDERS] = ARMORTYPE_NONE, - [EQUIP_SLOT_WAIST] = ARMORTYPE_NONE, - } - - function Srendarr:GetNumArmorPieces(desiredArmorType) - local numPieces = 0 - for equipSlot, armorType in pairs(equippedArmor) do - if armorType == desiredArmorType then - numPieces = numPieces + 1 - end - end - return numPieces - end - - function Srendarr.InventorySlotUpdated(event, bagId, slotId, isNewItem, itemSoundCategory, updateReason) - if bagId == BAG_WORN and updateReason == INVENTORY_UPDATE_REASON_DEFAULT and equippedArmor[slotId] then - local newArmorType = GetItemArmorType(bagId, slotId) - if newArmorType ~= equippedArmor[slotId] then - equippedArmor[slotId] = newArmorType - Srendarr:SetupPassiveSkillEffects() - end - end - end - - function Srendarr:InitializeArmorWatcher() - for equipSlot in pairs(equippedArmor) do - equippedArmor[equipSlot] = GetItemArmorType(BAG_WORN, equipSlot) - end - Srendarr:SetupPassiveSkillEffects() - end -end - -function Srendarr.OnCombatState(event, inCombat) - if (inCombat) then - if (db.onlyInCombat) then - for i = 1, 3 do --hide all auras except of long term buffs (4) - Srendarr.auraSceneFragments[i]:SetHiddenForReason("combatstate", false) - end - end - else - Srendarr:ClearTimerType(2) -- end all potential debuffs - Srendarr.auraFrames[3]:RemoveAllAuras() -- end all potential debuffs - - if (db.onlyInCombat) then - for i = 1, 3 do - Srendarr.auraSceneFragments[i]:SetHiddenForReason("combatstate", true) - end - end - end -end - -function Srendarr.OnPlayerActivated() - Srendarr:UpdateAuras() -end - -do - local GetNumBuffs = GetNumBuffs - local GetUnitBuffInfo = GetUnitBuffInfo - local DoesUnitExist = DoesUnitExist - - local frame, db, frameDebuff - - function Srendarr.OnTargetChanged() - if (Srendarr.db.showTargetAurasDebuff == false) then - return - end - -- cleanse out previous auras - frame:RemoveAllAuras() - frameDebuff:RemoveAllAuras() - Srendarr:ClearTimerType(3) - Srendarr:ClearTimerType(4) - - if (DoesUnitExist('reticleover')) then -- have a target - if (db.onlyInCombat and not Srendarr.ui_InCombat) then return end -- showing only in combat, but not - - local numAuras = GetNumBuffs('reticleover') - - if (numAuras > 0) then - for x = 1, numAuras do - local name, start, finish, buff, stack, icon, _, effectType, abilityType, statusEffectType, abilityId, _ = GetUnitBuffInfo('reticleover', x) - local isShield = abilityType == ABILITY_TYPE_DAMAGESHIELD - - - -- Skip Minor Buffs - if (Srendarr.db.hideMinorBuffs and Srendarr.MinorBuffs[abilityId] ~= nil) then - return - end - - -- Skip Major Buffs - if (Srendarr.db.hideMajorBuffs and Srendarr.MajorBuffs[abilityId] ~= nil) then - return - end - - if (finish > start) then - if (Srendarr:IsWatchedTimedTarget(name) and effectType == BUFF_EFFECT_TYPE_DEBUFF) then - frameDebuff:AddAura(1, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - elseif (Srendarr:IsWatchedTimedTarget(name) and effectType == BUFF_EFFECT_TYPE_BUFF) then - frame:AddAura(2, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - end - elseif (Srendarr:IsToggled(name)) then -- toggled - if (db.showToggleTarget) then - frame:AddAura(3, 3, name, icon, 1, 1, isShield, abilityType, buff, abilityId, effectType) - end - else -- passive - if (Srendarr:IsWatchedPassiveTarget(name, abilityType)) then - frame:AddAura(4, 3, name, icon, 1, 1, isShield, abilityType, buff, abilityId, effectType) - end - end - end - - frame:UpdateDisplay() - frameDebuff:UpdateDisplay() - end - end - end - - function Srendarr:InitializeOnTargetChanged() - db, frame = self.db, self.auraFrames[4] - db, frameDebuff = self.db, self.auraFrames[5] - end -end - -function Srendarr:ConfigureEvents() - if (db.combineBuff) then - auraFrameLong = self.auraFrames[1] - else - auraFrameLong = self.auraFrames[2] - end - - if (db.showTargetAuras or db.showTargetAurasDebuff) then - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_RETICLE_TARGET_CHANGED, self.OnTargetChanged) - else - EVENT_MANAGER:UnregisterForEvent(self.name, EVENT_RETICLE_TARGET_CHANGED) - end -end - -function Srendarr:InitializeEvents() - db = self.db - auraFrameShort = self.auraFrames[1] - auraFrameDebuffs = self.auraFrames[3] - - -- register events - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_ACTION_SLOTS_FULL_UPDATE, self.OnActionSlotsFullUpdate) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_ACTION_SLOT_UPDATED, self.OnActionSlotChanged) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_ACTIVE_QUICKSLOT_CHANGED, self.OnQuickSlotChanged) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_EFFECT_CHANGED, self.OnEffectChanged) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_DEAD, self.OnPlayerDeath) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_ALIVE, self.OnPlayerDeath) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_UNIT_ATTRIBUTE_VISUAL_REMOVED, self.OnVisualRemoved) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_COMBAT_STATE, self.OnCombatState) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_ACTIVATED, self.OnPlayerActivated) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_INVENTORY_SINGLE_SLOT_UPDATE, self.InventorySlotUpdated) - EVENT_MANAGER:RegisterForEvent(self.name, EVENT_SKILLS_FULL_UPDATE, function() Srendarr:SetupPassiveSkillEffects() end) - - EVENT_MANAGER:AddFilterForEvent(self.name, EVENT_EFFECT_CHANGED, REGISTER_FILTER_UNIT_TAG, 'player') - EVENT_MANAGER:AddFilterForEvent(self.name, EVENT_UNIT_ATTRIBUTE_VISUAL_REMOVED, REGISTER_FILTER_UNIT_TAG, 'player') - - self:ConfigureEvents() - self:InitializeArmorWatcher() - self.OnActionSlotsFullUpdate() -- call on load to record initial hotbar data - self.OnQuickSlotChanged(nil, GetCurrentQuickslot()) - self:SetupActionButtonHooks() -- configure hooks, never call this again! - self:InitializeOnTargetChanged() - self.OnCombatState(nil, IsUnitInCombat("player")) -end \ No newline at end of file diff --git a/Icons/Stage1.dds b/Icons/Stage1.dds deleted file mode 100644 index 29f2c16..0000000 Binary files a/Icons/Stage1.dds and /dev/null differ diff --git a/Icons/Stage2.dds b/Icons/Stage2.dds deleted file mode 100644 index e7608fb..0000000 Binary files a/Icons/Stage2.dds and /dev/null differ diff --git a/Icons/Stage3.dds b/Icons/Stage3.dds deleted file mode 100644 index c33388d..0000000 Binary files a/Icons/Stage3.dds and /dev/null differ diff --git a/Icons/Stage4.dds b/Icons/Stage4.dds deleted file mode 100644 index 5537444..0000000 Binary files a/Icons/Stage4.dds and /dev/null differ diff --git a/Lib/LAM-doublecolor.lua b/Lib/LAM-doublecolor.lua deleted file mode 100644 index fea6e8c..0000000 --- a/Lib/LAM-doublecolor.lua +++ /dev/null @@ -1,174 +0,0 @@ ---[[widgetData = { - type = "doublecolor", - name = "My Control", - tooltip = "Control's tooltip", - getFuncA = function() end, - getFuncB = function() end, - setFuncA = function() end, - setFuncB = function() end, - width = "full", --or "half" (optional) - disabled = function() return boolean end, --(optional) boolean or function which returns boolean - warning = "Some warning text", --(optional) - default = { [1] = { r = val1, g = val2, b = val3, a = val4 }, [2] = ZO_ColorDef:New(r, g, b, a)}, -- (optional) table with color tables or ZO_ColorDef objects - reference = "MyControlReference", --(optional) unique global reference -} -]] - -local widgetVersion = 2 -local LAM = LibStub("LibAddonMenu-2.0", true) -if (not LAM) then return end -if not LAM:RegisterWidget("doublecolor", widgetVersion) then return end - -local wm = WINDOW_MANAGER -local cm = CALLBACK_MANAGER -local tinsert = table.insert - -local function UpdateDisabled(control) - local disable - if type(control.data.disabled) == "function" then - disable = control.data.disabled() - else - disable = control.data.disabled - end - - if disable then - control.label:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) - else - control.label:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) - end - - control.isDisabled = disable -end - -local function UpdateColor(control, valueR, valueG, valueB, valueA) - control.setFunc(valueR, valueG, valueB, valueA or 1) - - --after setting this value, let's refresh the others to see if any should be disabled or have their settings changed - local widget = control:GetParent() - if widget.panel.data.registerForRefresh then - cm:FireCallbacks("LAM-RefreshPanel", widget) - end - - control.thumb:SetColor(valueR, valueG, valueB, valueA or 1) -end - -local function UpdateValue(control, forceDefault) - local aR, aG, aB, aA, bR, bG, bB, bA - if forceDefault then --if we are forcing defaults - local colorA = control.data.default[1] - aR, aG, aB, aA = colorA.r, colorA.g, colorA.b, colorA.a - control.colorA.setFunc(aR, aG, aB, aA) - local colorB = control.data.default[2] - bR, bG, bB, bA = colorB.r, colorB.g, colorB.b, colorB.a - control.colorB.setFunc(bR, bG, bB, bA) - else - aR, aG, aB, aA = control.data.getFuncA() - bR, bG, bB, bA = control.data.getFuncB() - end - - control.colorA.thumb:SetColor(aR, aG, aB, aA or 1) - control.colorB.thumb:SetColor(bR, bG, bB, bA or 1) -end - - -function LAMCreateControl.doublecolor(parent, widgetData, controlName) - local panel = parent.panel or parent - - local dc = wm:CreateControl(controlName or widgetData.reference, parent.scroll or parent, CT_CONTROL) - dc:SetMouseEnabled(true) - dc:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter) - dc:SetHandler("OnMouseExit", ZO_Options_OnMouseExit) - - dc.label = wm:CreateControl(nil, dc, CT_LABEL) - dc.label:SetAnchor(TOPLEFT) - dc.label:SetFont("ZoFontWinH4") - dc.label:SetWrapMode(TEXT_WRAP_MODE_ELLIPSIS) - dc.label:SetText(widgetData.name) - - dc.colorA = wm:CreateControl(nil, dc, CT_CONTROL) - dc.colorA:SetDimensions(40, 24) - dc.colorA:SetMouseEnabled(true) - - dc.colorB = wm:CreateControl(nil, dc, CT_CONTROL) - dc.colorB:SetDimensions(40, 24) - dc.colorB:SetMouseEnabled(true) - - local isHalfWidth = widgetData.width == "half" - local widgetWidth = panel:GetWidth() - 60 - if isHalfWidth then - widgetWidth = widgetWidth / 2 - dc:SetDimensions(widgetWidth, 55) - dc.label:SetDimensions(widgetWidth, 26) - dc.colorA:SetAnchor(TOPLEFT, dc.label, BOTTOMLEFT, widgetWidth - 195, 0) - dc.colorB:SetAnchor(LEFT, dc.colorA, RIGHT, 16, 0) - else - dc:SetDimensions(widgetWidth, 30) - dc.label:SetDimensions(widgetWidth - 210, 26) - dc.colorA:SetAnchor(LEFT, dc, LEFT, widgetWidth - 195, 0) - dc.colorB:SetAnchor(LEFT, dc.colorA, RIGHT, 16, 0) - end - - local thumbA = wm:CreateControl(nil, dc.colorA, CT_TEXTURE) - thumbA:SetDimensions(36, 18) - thumbA:SetAnchor(LEFT, dc.colorA, LEFT, 4, 0) - dc.colorA.thumb = thumbA - - local borderA = wm:CreateControl(nil, dc.colorA, CT_TEXTURE) - borderA:SetAnchor(CENTER, thumbA, CENTER, 0, 0) - borderA:SetDimensions(40, 22) - borderA:SetTexture("EsoUI/Art/ChatWindow/chatOptions_bgColSwatch_frame.dds") - borderA:SetTextureCoords(0, .625, 0, .8125) - - local thumbB = wm:CreateControl(nil, dc.colorB, CT_TEXTURE) - thumbB:SetDimensions(36, 18) - thumbB:SetAnchor(LEFT, dc.colorB, LEFT, 4, 0) - dc.colorB.thumb = thumbB - - local borderB = wm:CreateControl(nil, dc.colorB, CT_TEXTURE) - borderB:SetAnchor(CENTER, thumbB, CENTER, 0, 0) - borderB:SetDimensions(40, 22) - borderB:SetTexture("EsoUI/Art/ChatWindow/chatOptions_bgColSwatch_frame.dds") - borderB:SetTextureCoords(0, .625, 0, .8125) - - local function OnMouseUp(self, btn, upInside) - if (upInside and not self:GetParent().isDisabled) then - local r, g, b, a = self.getFunc() - COLOR_PICKER:Show(function(r, g, b, a) UpdateColor(self, r, g, b, a or 1) end, r, g, b, a, widgetData.name) - end - end - - dc.colorA.getFunc = widgetData.getFuncA - dc.colorA.setFunc = widgetData.setFuncA - dc.colorB.getFunc = widgetData.getFuncB - dc.colorB.setFunc = widgetData.setFuncB - - dc.colorA:SetHandler("OnMouseUp", OnMouseUp) - dc.colorA:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(dc) end) - dc.colorA:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(dc) end) - dc.colorB:SetHandler("OnMouseUp", OnMouseUp) - dc.colorB:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(dc) end) - dc.colorB:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(dc) end) - - if widgetData.warning then - dc.warning = wm:CreateControlFromVirtual(nil, dc, "ZO_Options_WarningIcon") - dc.warning:SetAnchor(RIGHT, dc.colorA, LEFT, -5, 0) - dc.warning.data = {tooltipText = widgetData.warning} - end - - dc.panel = panel --if this is in a submenu, panel is its parent - dc.data = widgetData - dc.data.tooltipText = widgetData.tooltip - - if widgetData.disabled then - dc.UpdateDisabled = UpdateDisabled - dc:UpdateDisabled() - end - dc.UpdateValue = UpdateValue - dc:UpdateValue() - - if dc.panel.data.registerForRefresh or dc.panel.data.registerForDefaults then --if our parent window wants to refresh controls, then add this to the list - tinsert(dc.panel.controlsToRefresh, dc) - end - - return dc -end \ No newline at end of file diff --git a/Lib/LAM-fontblock.lua b/Lib/LAM-fontblock.lua deleted file mode 100644 index b74b157..0000000 --- a/Lib/LAM-fontblock.lua +++ /dev/null @@ -1,268 +0,0 @@ ---[[widgetData = { - type = "fontblock", - name = "My Control", - tooltip = "Control's tooltip", - getFace = function() return face end, - getSize = function() return size end, - getOutline = function() return outline end, - getColor = function() return r, g, b, a end, - setFace = function(face) end, - setSize = function(size) end, - setOutline = function(outline) end, - setColor = function(r, g, b, a) end, - width = "full", --or "half" (optional) - disabled = function() return boolean end, --(optional) boolean or function which returns boolean - warning = "Some warning text", --(optional) - default = { --(optional) - face = "Univers 67", - size = "22", - outline = "soft-shadow-thin", - color = { r = val1, g = val2, b = val3, a = val4 }, -- table (or ZO_ColorDef object) with default color values - }, - reference = "MyControlReference", --(optional) unique global reference -} -]] - -local widgetVersion = 4 -local LAM = LibStub("LibAddonMenu-2.0", true) -local LMP = LibStub("LibMediaProvider-1.0", true) -if (not LAM or not LMP) then return end -- need both libs to function -if not LAM:RegisterWidget("fontblock", widgetVersion) then return end - ---UPVALUES-- -local wm = GetWindowManager() -local cm = CALLBACK_MANAGER -local tinsert = table.insert -local strformat = string.format -local tostring = tostring -local round = zo_round - -local fontOutlineChoices = {"none", "outline", "thin-outline", "thick-outline", "shadow", "soft-shadow-thin", "soft-shadow-thick"} -local fontSizeChoices = {} - -for x = 1, 25 do - fontSizeChoices[x] = tostring(x + 7) -end - -local function UpdateDisabled(control) - local disable - if type(control.data.disabled) == "function" then - disable = control.data.disabled() - else - disable = control.data.disabled - end - - if disable then - control.label:SetColor(ZO_DEFAULT_DISABLED_COLOR:UnpackRGBA()) - else - control.label:SetColor(ZO_DEFAULT_ENABLED_COLOR:UnpackRGBA()) - end - - control.isDisabled = disable -end - -local function UpdateValue(control, forceDefault, face, size, outline, colorR, colorG, colorB, colorA) - local data = control.data - local isUpdated = false - - if forceDefault then - face = data.default.face - size = data.default.size - outline = data.default.outline - colorR = data.default.color.r - colorG = data.default.color.g - colorB = data.default.color.b - colorA = data.default.color.a - end - - if face then - data.setFace(face) - isUpdated = true - else - face = data.getFace() - end - - if size then - data.setSize(size) - isUpdated = true - else - size = data.getSize() - end - - if outline then - data.setOutline(outline) - isUpdated = true - else - outline = data.getOutline() - end - - if colorR and colorG and colorB then - data.setColor(colorR, colorG, colorB, colorA or 1) - isUpdated = true - else - colorR, colorG, colorB, colorA = data.getColor() - end - - if isUpdated then - if control.panel.data.registerForRefresh then - cm:FireCallbacks("LAM-RefreshPanel", control) - end - end - - control.size.dropdown:SetSelectedItem(size) - control.face.dropdown:SetSelectedItem(face) - control.outline.dropdown:SetSelectedItem(outline) - control.color.thumb:SetColor(colorR, colorG, colorB, colorA or 1) -end - -function LAMCreateControl.fontblock(parent, widgetData, controlName) - local panel = parent.panel or parent - if not panel.fbCounter then - panel.fbCounter = 0 - end - panel.fbCounter = panel.fbCounter + 1 - controlName = controlName or widgetData.reference or (panel:GetName() .. "Fontblock" .. tostring(panel.fbCounter)) - local fb = wm:CreateControl(controlName, parent.scroll or parent, CT_CONTROL) - fb:SetMouseEnabled(true) - fb:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter) - fb:SetHandler("OnMouseExit", ZO_Options_OnMouseExit) - - fb.label = wm:CreateControl(nil, fb, CT_LABEL) - fb.label:SetAnchor(TOPLEFT) - fb.label:SetFont("ZoFontWinH4") - fb.label:SetWrapMode(TEXT_WRAP_MODE_ELLIPSIS) - fb.label:SetText(widgetData.name) - - -- font face - local face = wm:CreateControlFromVirtual(controlName .. "Face", fb, "ZO_ComboBox") - fb.face = face - face:SetDimensions(164, 26) - face:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(fb) end) - face:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(fb) end) - - face.dropdown = ZO_ComboBox_ObjectFromContainer(face) - face.dropdown:ClearItems() - - local fontFaceChoices = LMP:List("font") - - local function FaceDropdownCallback(self, choiceText, choice) - fb:UpdateValue(false, choiceText) - end - - for i = 1, #fontFaceChoices do - local entry = face.dropdown:CreateItemEntry(fontFaceChoices[i], FaceDropdownCallback) - face.dropdown:AddItem(entry, ZO_COMBOBOX_SUPRESS_UPDATE) - end - - -- color picker - local color = wm:CreateControl(nil, fb, CT_CONTROL) - fb.color = color - color:SetDimensions(28, 25) - color:SetMouseEnabled(true) - color:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(fb) end) - color:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(fb) end) - - local thumb = wm:CreateControl(nil, color, CT_TEXTURE) - fb.color.thumb = thumb - thumb:SetDimensions(24, 20) - thumb:SetAnchor(LEFT, color, LEFT, 4, 0) - local border = wm:CreateControl(nil, color, CT_TEXTURE) - border:SetAnchor(CENTER, thumb, CENTER, 0, 0) - border:SetDimensions(28, 25) - border:SetTexture("EsoUI/Art/ChatWindow/chatOptions_bgColSwatch_frame.dds") - border:SetTextureCoords(0, .625, 0, .8125) - - local function ColorPickerCallback(r, g, b, a) - fb:UpdateValue(false, nil, nil, nil, r, g, b, a) - end - - fb.color:SetHandler("OnMouseUp", function(self, btn, upInside) - if (upInside) then - local r, g, b, a = widgetData.getColor() - COLOR_PICKER:Show(ColorPickerCallback, r, g, b, a, widgetData.name) - end - end) - - -- outline - local outline = wm:CreateControlFromVirtual(controlName .. "Outline", fb, "ZO_ComboBox") - fb.outline = outline - outline:SetDimensions(138, 26) - outline:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(fb) end) - outline:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(fb) end) - - outline.dropdown = ZO_ComboBox_ObjectFromContainer(outline) - outline.dropdown:ClearItems() - - local function OutlineDropdownCallback(self, choiceText, choice) - fb:UpdateValue(false, nil, nil, choiceText) - end - - for i = 1, #fontOutlineChoices do - local entry = outline.dropdown:CreateItemEntry(fontOutlineChoices[i], OutlineDropdownCallback) - outline.dropdown:AddItem(entry, ZO_COMBOBOX_SUPRESS_UPDATE) - end - - --size - local size = wm:CreateControlFromVirtual(controlName .. "Size", fb, "ZO_ComboBox") - fb.size = size - size:SetDimensions(54, 26) - size:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(fb) end) - size:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(fb) end) - - size.dropdown = ZO_ComboBox_ObjectFromContainer(size) - size.dropdown:ClearItems() - - local function SizeDropdownCallback(self, choiceText, choice) - fb:UpdateValue(false, nil, choiceText) - end - - for i = 1, #fontSizeChoices do - local entry = size.dropdown:CreateItemEntry(fontSizeChoices[i], SizeDropdownCallback) - size.dropdown:AddItem(entry, ZO_COMBOBOX_SUPRESS_UPDATE) - end - - - local isHalfWidth = widgetData.width == "half" - local widgetWidth = panel:GetWidth() - 60 - if isHalfWidth then - widgetWidth = widgetWidth / 2 - fb:SetDimensions(widgetWidth, 80) - fb.label:SetDimensions(widgetWidth, 26) - face:SetAnchor(TOPLEFT, fb, TOPLEFT, widgetWidth - 195, 26) - color:SetAnchor(TOPLEFT, fb, TOPLEFT, widgetWidth - 30, 26) - outline:SetAnchor(BOTTOMLEFT, fb, BOTTOMLEFT, widgetWidth - 195, 0) - size:SetAnchor(BOTTOMLEFT, fb, BOTTOMLEFT, widgetWidth - 54, 0) - else - fb:SetDimensions(widgetWidth, 54) - fb.label:SetDimensions(widgetWidth - 210, 26) - face:SetAnchor(TOPLEFT, fb, TOPLEFT, widgetWidth - 195, 0) - color:SetAnchor(TOPLEFT, fb, TOPLEFT, widgetWidth - 30, 0) - outline:SetAnchor(BOTTOMLEFT, fb, BOTTOMLEFT, widgetWidth - 195, 0) - size:SetAnchor(BOTTOMLEFT, fb, BOTTOMLEFT, widgetWidth - 54, 0) - end - - - if (widgetData.warning) then - fb.warning = wm:CreateControlFromVirtual(nil, fb, "ZO_Options_WarningIcon") - fb.warning:SetAnchor(RIGHT, face, LEFT, -5, 0) - fb.warning.data = { tooltipText = widgetData.warning } - end - - fb.panel = parent.panel or parent --if this is in a submenu, panel is its parent - fb.data = widgetData - fb.data.tooltipText = widgetData.tooltip - - if widgetData.disabled then - fb.UpdateDisabled = UpdateDisabled - fb:UpdateDisabled() - end - - fb.UpdateValue = UpdateValue - fb:UpdateValue() - - if fb.panel.data.registerForRefresh or fb.panel.data.registerForDefaults then --if our parent window wants to refresh controls, then add this to the list - tinsert(fb.panel.controlsToRefresh, fb) - end - - return fb -end \ No newline at end of file diff --git a/Lib/LibAddonMenu-2.0/LICENSE b/Lib/LibAddonMenu-2.0/LICENSE index 82fcf2f..f69cbd4 100644 --- a/Lib/LibAddonMenu-2.0/LICENSE +++ b/Lib/LibAddonMenu-2.0/LICENSE @@ -1,6 +1,6 @@ The Artistic License 2.0 - Copyright (c) 2015 Ryan Lakanen (Seerah) + Copyright (c) 2016 Ryan Lakanen (Seerah) Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/Lib/LibAddonMenu-2.0/LibAddonMenu-2.0.lua b/Lib/LibAddonMenu-2.0/LibAddonMenu-2.0.lua index dcbf151..568b95d 100644 --- a/Lib/LibAddonMenu-2.0/LibAddonMenu-2.0.lua +++ b/Lib/LibAddonMenu-2.0/LibAddonMenu-2.0.lua @@ -4,7 +4,7 @@ --Register LAM with LibStub -local MAJOR, MINOR = "LibAddonMenu-2.0", 18 +local MAJOR, MINOR = "LibAddonMenu-2.0", 19 local lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not lam then return end --the same or newer version of this lib is already loaded into memory @@ -61,7 +61,9 @@ local function CreateBaseControl(parent, controlData, controlName) control.data = controlData control.isHalfWidth = controlData.width == "half" - control:SetWidth(control.panel:GetWidth() - 60) + local width = 510 -- set default width in case a custom parent object is passed + if control.panel.GetWidth ~= nil then width = control.panel:GetWidth() - 60 end + control:SetWidth(width) return control end @@ -282,6 +284,30 @@ function lam:OpenToPanel(panel) end end +local TwinOptionsContainer_Index = 0 +local function TwinOptionsContainer(parent, leftWidget, rightWidget) + TwinOptionsContainer_Index = TwinOptionsContainer_Index + 1 + local cParent = parent.scroll or parent + local panel = parent.panel or cParent + local container = wm:CreateControl("$(parent)TwinContainer" .. tostring(TwinOptionsContainer_Index), + cParent, CT_CONTROL) + container:SetResizeToFitDescendents(true) + container:SetAnchor(select(2, leftWidget:GetAnchor(0) )) + + leftWidget:ClearAnchors() + leftWidget:SetAnchor(TOPLEFT, container, TOPLEFT) + rightWidget:SetAnchor(TOPLEFT, leftWidget, TOPRIGHT, 5, 0) + + leftWidget:SetWidth( leftWidget:GetWidth() - 2.5 ) -- fixes bad alignment with 'full' controls + rightWidget:SetWidth( rightWidget:GetWidth() - 2.5 ) + + leftWidget:SetParent(container) + rightWidget:SetParent(container) + + container.data = {type = "container"} + container.panel = panel + return container +end --INTERNAL FUNCTION --creates controls when options panel is first shown @@ -302,12 +328,12 @@ local function CreateOptionsControls(panel) widget:SetAnchor(TOPLEFT) anchorTarget = widget elseif wasHalf and isHalf then -- when the previous widget was only half width and this one is too, we place it on the right side - widget:SetAnchor(TOPLEFT, anchorTarget, TOPRIGHT, 5 + (offsetX or 0), 0) widget.lineControl = anchorTarget - offsetY = zo_max(0, widget:GetHeight() - anchorTarget:GetHeight()) -- we need to get the common height of both widgets to know where the next row starts isHalf = false + offsetY = 0 + anchorTarget = TwinOptionsContainer(parent, anchorTarget, widget) else -- otherwise we just put it below the previous one normally - widget:SetAnchor(TOPLEFT, anchorTarget, BOTTOMLEFT, 0, 15 + offsetY) + widget:SetAnchor(TOPLEFT, anchorTarget, BOTTOMLEFT, 0, 15) offsetY = 0 anchorTarget = widget end diff --git a/Lib/LibAddonMenu-2.0/controls/button.lua b/Lib/LibAddonMenu-2.0/controls/button.lua index 1c92003..7489872 100644 --- a/Lib/LibAddonMenu-2.0/controls/button.lua +++ b/Lib/LibAddonMenu-2.0/controls/button.lua @@ -11,7 +11,7 @@ } ]] -local widgetVersion = 7 +local widgetVersion = 8 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("button", widgetVersion) then return end @@ -75,7 +75,7 @@ function LAMCreateControl.button(parent, buttonData, controlName) control.warning.data = {tooltipText = buttonData.warning} end - if buttonData.disabled then + if buttonData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() @@ -86,4 +86,4 @@ function LAMCreateControl.button(parent, buttonData, controlName) end return control -end \ No newline at end of file +end diff --git a/Lib/LibAddonMenu-2.0/controls/checkbox.lua b/Lib/LibAddonMenu-2.0/controls/checkbox.lua index 07f3746..46fe069 100644 --- a/Lib/LibAddonMenu-2.0/controls/checkbox.lua +++ b/Lib/LibAddonMenu-2.0/controls/checkbox.lua @@ -12,7 +12,7 @@ } ]] -local widgetVersion = 9 +local widgetVersion = 10 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("checkbox", widgetVersion) then return end @@ -129,7 +129,7 @@ function LAMCreateControl.checkbox(parent, checkboxData, controlName) control.data.tooltipText = LAM.util.GetTooltipText(checkboxData.tooltip) - if checkboxData.disabled then + if checkboxData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end @@ -141,4 +141,4 @@ function LAMCreateControl.checkbox(parent, checkboxData, controlName) end return control -end \ No newline at end of file +end diff --git a/Lib/LibAddonMenu-2.0/controls/colorpicker.lua b/Lib/LibAddonMenu-2.0/controls/colorpicker.lua index 489f462..184a2e4 100644 --- a/Lib/LibAddonMenu-2.0/controls/colorpicker.lua +++ b/Lib/LibAddonMenu-2.0/controls/colorpicker.lua @@ -12,7 +12,7 @@ } ]] -local widgetVersion = 7 +local widgetVersion = 8 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("colorpicker", widgetVersion) then return end @@ -95,7 +95,7 @@ function LAMCreateControl.colorpicker(parent, colorpickerData, controlName) control.data.tooltipText = LAM.util.GetTooltipText(colorpickerData.tooltip) - if colorpickerData.disabled then + if colorpickerData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end @@ -107,4 +107,4 @@ function LAMCreateControl.colorpicker(parent, colorpickerData, controlName) end return control -end \ No newline at end of file +end diff --git a/Lib/LibAddonMenu-2.0/controls/description.lua b/Lib/LibAddonMenu-2.0/controls/description.lua index 7fa983f..233d525 100644 --- a/Lib/LibAddonMenu-2.0/controls/description.lua +++ b/Lib/LibAddonMenu-2.0/controls/description.lua @@ -7,7 +7,7 @@ } ]] -local widgetVersion = 6 +local widgetVersion = 7 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("description", widgetVersion) then return end @@ -21,7 +21,6 @@ local function UpdateValue(control) control.desc:SetText(control.data.text) end -local MIN_HEIGHT = 26 function LAMCreateControl.description(parent, descriptionData, controlName) local control = LAM.util.CreateBaseControl(parent, descriptionData, controlName) local isHalfWidth = control.isHalfWidth @@ -29,9 +28,9 @@ function LAMCreateControl.description(parent, descriptionData, controlName) control:SetResizeToFitDescendents(true) if isHalfWidth then - control:SetDimensionConstraints(width / 2, MIN_HEIGHT, width / 2, MIN_HEIGHT * 4) + control:SetDimensionConstraints(width / 2, 0, width / 2, 0) else - control:SetDimensionConstraints(width, MIN_HEIGHT, width, MIN_HEIGHT * 4) + control:SetDimensionConstraints(width, 0, width, 0) end control.desc = wm:CreateControl(nil, control, CT_LABEL) diff --git a/Lib/LibAddonMenu-2.0/controls/dropdown.lua b/Lib/LibAddonMenu-2.0/controls/dropdown.lua index 6ce11b4..5bdd546 100644 --- a/Lib/LibAddonMenu-2.0/controls/dropdown.lua +++ b/Lib/LibAddonMenu-2.0/controls/dropdown.lua @@ -14,7 +14,7 @@ } ]] -local widgetVersion = 9 +local widgetVersion = 10 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("dropdown", widgetVersion) then return end @@ -114,7 +114,7 @@ function LAMCreateControl.dropdown(parent, dropdownData, controlName) control.warning.data = {tooltipText = dropdownData.warning} end - if dropdownData.disabled then + if dropdownData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end @@ -128,4 +128,4 @@ function LAMCreateControl.dropdown(parent, dropdownData, controlName) end return control -end \ No newline at end of file +end diff --git a/Lib/LibAddonMenu-2.0/controls/editbox.lua b/Lib/LibAddonMenu-2.0/controls/editbox.lua index 676bd8d..1f9bb47 100644 --- a/Lib/LibAddonMenu-2.0/controls/editbox.lua +++ b/Lib/LibAddonMenu-2.0/controls/editbox.lua @@ -4,7 +4,8 @@ tooltip = "Editbox's tooltip text.", getFunc = function() return db.text end, setFunc = function(text) db.text = text doStuff() end, - isMultiline = true, --boolean + isMultiline = true, --boolean (optional) + isExtraWide = true, --boolean (optional) width = "full", --or "half" (optional) disabled = function() return db.someBooleanSetting end, --or boolean (optional) warning = "Will need to reload the UI.", --(optional) @@ -13,7 +14,7 @@ } ]] -local widgetVersion = 8 +local widgetVersion = 9 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("editbox", widgetVersion) then return end @@ -58,7 +59,7 @@ local function UpdateValue(control, forceDefault, value) end end -local MIN_HEIGHT = 26 +local MIN_HEIGHT = 24 local HALF_WIDTH_LINE_SPACING = 2 function LAMCreateControl.editbox(parent, editboxData, controlName) local control = LAM.util.CreateLabelAndContainerControl(parent, editboxData, controlName) @@ -100,28 +101,51 @@ function LAMCreateControl.editbox(parent, editboxData, controlName) editbox:SetHandler("OnMouseEnter", function() ZO_Options_OnMouseEnter(control) end) editbox:SetHandler("OnMouseExit", function() ZO_Options_OnMouseExit(control) end) - if not editboxData.isMultiline then - container:SetHeight(24) + local MIN_WIDTH = (parent.GetWidth and (parent:GetWidth() / 10)) or (parent.panel.GetWidth and (parent.panel:GetWidth() / 10)) or 0 + + control.label:ClearAnchors() + container:ClearAnchors() + + control.label:SetAnchor(TOPLEFT, control, TOPLEFT, 0, 0) + container:SetAnchor(BOTTOMRIGHT, control, BOTTOMRIGHT, 0, 0) + + if control.isHalfWidth then + container:SetAnchor(BOTTOMRIGHT, control, BOTTOMRIGHT, 0, 0) + end + + if editboxData.isExtraWide then + container:SetAnchor(BOTTOMLEFT, control, BOTTOMLEFT, 0, 0) else - local width = container:GetWidth() - local height = control.isHalfWidth and 74 or 100 - container:SetHeight(height) - editbox:SetDimensionConstraints(width, height, width, 500) + container:SetWidth(MIN_WIDTH * 3.2) + end - if control.lineControl then - control.lineControl:SetHeight(MIN_HEIGHT + height + HALF_WIDTH_LINE_SPACING) - else - control:SetHeight(height) - end + if editboxData.isMultiline then + container:SetHeight(MIN_HEIGHT * 3) + else + container:SetHeight(MIN_HEIGHT) + end + + if control.isHalfWidth ~= true and editboxData.isExtraWide ~= true then + control:SetHeight(container:GetHeight()) + else + control:SetHeight(container:GetHeight() + control.label:GetHeight()) end + editbox:ClearAnchors() + editbox:SetAnchor(TOPLEFT, container, TOPLEFT, 2, 2) + editbox:SetAnchor(BOTTOMRIGHT, container, BOTTOMRIGHT, -2, -2) + if editboxData.warning then control.warning = wm:CreateControlFromVirtual(nil, control, "ZO_Options_WarningIcon") - control.warning:SetAnchor(TOPRIGHT, control.bg, TOPLEFT, -5, 0) + if editboxData.isExtraWide then + control.warning:SetAnchor(BOTTOMRIGHT, control.bg, TOPRIGHT, 2, 0) + else + control.warning:SetAnchor(TOPRIGHT, control.bg, TOPLEFT, -5, 0) + end control.warning.data = {tooltipText = editboxData.warning} end - if editboxData.disabled then + if editboxData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end @@ -133,4 +157,4 @@ function LAMCreateControl.editbox(parent, editboxData, controlName) end return control -end \ No newline at end of file +end diff --git a/Lib/LibAddonMenu-2.0/controls/iconpicker.lua b/Lib/LibAddonMenu-2.0/controls/iconpicker.lua index b8737c2..93c47f3 100644 --- a/Lib/LibAddonMenu-2.0/controls/iconpicker.lua +++ b/Lib/LibAddonMenu-2.0/controls/iconpicker.lua @@ -18,7 +18,7 @@ reference = "MyAddonIconPicker" --(optional) unique global reference to control } ]] -local widgetVersion = 2 +local widgetVersion = 3 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("iconpicker", widgetVersion) then return end @@ -32,7 +32,7 @@ LAM.util.GetIconPickerMenu = function() if not iconPicker then iconPicker = IconPickerMenu:New("LAMIconPicker") local sceneFragment = LAM:GetAddonSettingsFragment() - ZO_PreHook(sceneFragment, "OnHidden", function() + ZO_PreHook(sceneFragment, "OnHidden", function() if not iconPicker.control:IsHidden() then iconPicker:Clear() end @@ -253,7 +253,7 @@ end local function UpdateChoices(control, choices, choicesTooltips) local data = control.data if not choices then - choices, choicesTooltips = data.choices, data.choicesTooltips + choices, choicesTooltips = data.choices, data.choicesTooltips or {} end local addedChoices = {} @@ -420,7 +420,7 @@ function LAMCreateControl.iconpicker(parent, iconpickerData, controlName) control.warning.data = {tooltipText = iconpickerData.warning} end - if iconpickerData.disabled then + if iconpickerData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end diff --git a/Lib/LibAddonMenu-2.0/controls/slider.lua b/Lib/LibAddonMenu-2.0/controls/slider.lua index 5a2cb66..fa16686 100644 --- a/Lib/LibAddonMenu-2.0/controls/slider.lua +++ b/Lib/LibAddonMenu-2.0/controls/slider.lua @@ -5,6 +5,7 @@ min = 0, max = 20, step = 1, --(optional) + decimals = 0, --(optional) getFunc = function() return db.var end, setFunc = function(value) db.var = value doStuff() end, width = "full", --or "half" (optional) @@ -15,7 +16,7 @@ } ]] -local widgetVersion = 7 +local widgetVersion = 8 local LAM = LibStub("LibAddonMenu-2.0") if not LAM:RegisterWidget("slider", widgetVersion) then return end @@ -123,17 +124,25 @@ function LAMCreateControl.slider(parent, sliderData, controlName) self:LoseFocus() control:UpdateValue(false, tonumber(self:GetText())) end) - + local function RoundDecimalToPlace(d, place) + return tonumber(string.format("%." .. tostring(place) .. "f", d)) + end local range = maxValue - minValue slider:SetValueStep(sliderData.step or 1) slider:SetHandler("OnValueChanged", function(self, value, eventReason) if eventReason == EVENT_REASON_SOFTWARE then return end - self:SetValue(value) --do we actually need this line? - slidervalue:SetText(value) + local new_value = sliderData.decimals and RoundDecimalToPlace(value, sliderData.decimals) or value + self:SetValue(new_value) --do we actually need this line? + slidervalue:SetText(new_value) end) slider:SetHandler("OnSliderReleased", function(self, value) --sliderData.setFunc(value) - control:UpdateValue(false, value) --does this work here instead? + local new_value = sliderData.decimals and RoundDecimalToPlace(value, sliderData.decimals) or value + control:UpdateValue(false, new_value) --does this work here instead? + end) + slider:SetHandler("OnMouseWheel", function(self, value) + local new_value = (tonumber(slidervalue:GetText()) or sliderData.min or 0) + ((sliderData.step or 1) * value) + control:UpdateValue(false, new_value) end) if sliderData.warning then @@ -142,7 +151,7 @@ function LAMCreateControl.slider(parent, sliderData, controlName) control.warning.data = {tooltipText = sliderData.warning} end - if sliderData.disabled then + if sliderData.disabled ~= nil then control.UpdateDisabled = UpdateDisabled control:UpdateDisabled() end @@ -154,4 +163,4 @@ function LAMCreateControl.slider(parent, sliderData, controlName) end return control -end \ No newline at end of file +end diff --git a/Locales/Local_de.lua b/Locales/Local_de.lua index 28d0d44..decdda9 100644 --- a/Locales/Local_de.lua +++ b/Locales/Local_de.lua @@ -1,204 +1,235 @@ --- German (de) - Translations provided by Tonyleila with help from Xianlung, FViper, MerlinGer, Rakke, Rial, Zuhligan +-- German (de) - Translations provided by Tonyleila + silentgecko local Srendarr = _G['Srendarr'] -- grab addon table from global - local L = {} -L.Srendarr = "|c67b1e9S|c4779ce'rendarr|r" -L.Usage = "|c67b1e9S|c4779ce'rendarr|r - Usage: /srendarr lock or unlock to toggle UI movement." - --- timer strings -L.Time_Seconds = '%ds' -L.Time_Minutes = '%dm' -L.Time_Hours = '%dh' -L.Time_Toggle = 'T' -L.Time_Passive = 'P' -L.Time_Cast = 'Cast' - --- drag overlay labels -L.DragLabel_BuffShort = 'KURZ' -L.DragLabel_BuffLong = 'LANG' -L.DragLabel_BuffAll = 'BUFF' -L.DragLabel_Debuff = 'DEBUFF' -L.DragLabel_Target = 'ZIEL' - --- --------------------------------------------------- --- PASSIVE COMPARE ----------------------------------- --- --------------------------------------------------- - -L.Passive_Mundus = 'Segen:' -L.Passive_HomeKeepBonus = 'gesicherte Heimat' -L.Passive_EnemyKeepBonus = 'Eroberungseuphorie' -L.Passive_ScrollBonus = 'Schriften' - --- --------------------------------------------------- --- POTION TYPES -------------------------------------- --- --------------------------------------------------- - -L.Potion_Sip = "Schlรผckchen" -L.Potion_Tincture = "Tinctur" -L.Potion_Serum = "Serum" -L.Potion_Dram = "Schluck" -L.Potion_Effusion = "Erguss" -L.Potion_Potion = "Trank" -L.Potion_Draught = "Mundvoll" -L.Potion_Solution = "Lรถsung" -L.Potion_Philter = "Zaubertrank" -L.Potion_Elixir = "Elixier" -L.Potion_Panacea = "Panazee" -- v5 -L.Potion_Distillate = "Destillat" -- v10 -L.Potion_Essence = "Essenz" -- v15 - - --- --------------------------------------------------- --- SETTINGS ------------------------------------------ --- --------------------------------------------------- - --- dropdown menus -L.DropGrowth1 = 'Hoch' -L.DropGrowth2 = 'Runter' -L.DropGrowth3 = 'Links' -L.DropGrowth4 = 'Links (Zentriert)' -L.DropGrowth5 = 'Rechts' -L.DropGrowth6 = 'Rechts (Zentriert)' -L.DropSort1 = 'Verbleibende Zeit' -L.DropSort2 = 'Talent Name' -L.DropTimer1 = 'รber Icon' -L.DropTimer2 = 'Unter Icon' -L.DropTimer3 = 'Oberhalb Icon' -L.DropTimer4 = 'Versteckt' - --- tabs -L.TabButton1 = 'Allgemein' -L.TabButton2 = 'Kurze Buffs' -L.TabButton3 = 'Lange Buffs' -L.TabButton4 = 'Debuffs' -L.TabButton5 = 'Ziel Buffs' -L.TabButton6 = 'Ziel Debuffs' -L.TabButton7 = 'Profile' -L.TabHeader1 = 'Allgemeine Einstellungen' -L.TabHeader2 = 'Kurze & kombinierte Buff Fenster Einstellungen' -L.TabHeader3 = 'Lange Buff Fenster Einstellungen' -L.TabHeader4 = 'Debuff Fenster Einstellungen' -L.TabHeader5 = 'Ziel Buff Fenster Einstellungen' -L.TabHeader6 = 'Ziel Debuff Fenster Einstellungen' -L.TabHeader7 = 'Profile Einstellungen' - - - --- example aura names -L.ExampleAura1 = 'Buff' -L.ExampleAura2 = 'Noch ein Buff' -L.ExampleAura3 = 'Und noch ein Buff' -L.ExampleAura4 = 'Debuff' -L.ExampleAura5 = 'Noch ein Debuff' -L.ExampleAura6 = 'Und noch ein Debuff' -L.ExampleAura7 = 'Zeitliche Aura (Lang)' -L.ExampleAura8 = 'Umschaltbare Aura' -L.ExampleAura9 = 'Passive Aura' - --- settings: general tab (1) -L.GeneralAnchorDesc = 'Entsperren, um die Anker der Buffleisten mit der Maus bewegbar zu machen. Der Reset Button setzt alle Anker wieder an die ursprรผngliche Position zurรผck.' -L.GeneralAnchorLock = 'Sperren' -L.GeneralAnchorUnlock = 'Entsperren' -L.GeneralAnchorReset = 'Zurรผcksetzen' -L.GeneralOnlyCombat = 'Nur im Kampf zeigen' -L.GeneralOnlyCombatTip = 'Legt fest ob alle Buff Anzeigen nur im Kampf sichtbar sind.' -L.GeneralCombine = 'Buffs Kombinieren' -L.GeneralCombineTip = 'Legt fest, ob kurze und lange Buffs in der selben Leiste angezeigt werden sollen oder in 2 Leisten aufgeteilt werden.\n\nBei der geteilten Einstellung werden Buffs mit einer Dauer von รผber einer Minute in einem Fenster zusammen mit den Passiven Buffs angezeigt.' -L.GeneralThreshold = 'Schwellwert fรผr kurze Buffs' -L.GeneralThresholdTip = 'Das Spiel selbst meldet alle Buffs lรคnger als 30 Sekunden als Langzeit Buffs. Hier kannst du diesen Schwellwert anpassen.' -L.GeneralTarget = 'Zeige Ziel Buffs' -L.GeneralTargetTip = 'Legt fest ob Buffs auf dem aktuellen Ziel angezeigt werden.\n\n Lange Buffs, Umschaltbare and Passive jeweil in einem seperatem Fenster.' -L.GeneralTargetDebuff = 'Zeigt Ziel Debuffs' -L.GeneralTargetDebuffTip = 'Legt fest ob Debuffs des aktuellen Ziels angezeigt werden oder nicht' -L.GeneralDebuff = 'Zeige Debuffs' -L.GeneralDebuffTip = 'Legt fest ob ein- und ausgehende Debuffs in einem seperatem Fenster angezeigt werden. Achtung: durch die geringen informationen die Addons auslesen kรถnnen, kรถnnen die Zeitangaben der eingehenden Debuffs ungenau sein.' -L.GeneralDebuffWarn = 'Kann durch API Beschrรคnkungen ungenau sein.' -L.GeneralHeaderFiltersPlayer = 'Aura Filter: Spieler' -L.GeneralHeaderFiltersTarget = 'Aura Filter: Ziel' -L.GeneralSoulSummons = 'Zeige Seelenbeschwรถrung abklingzeigt' -L.GeneralSoulSummonsTip = 'Legt fest ob der Buff des passiven Talents Seelenbeschwรถrung angezeigt werden soll oder nicht.' -L.GeneralToggle = 'Zeige Umschaltbare Buffs' -L.GeneralToggleTip = 'Legt fest ob umschaltbare Buffs angezeigt werden sollen oder nicht.\n\nz.B.: Instabiler Begleiter oder Magierlicht' -L.GeneralPassive = 'Zeige Passive Buffs' -L.GeneralPassiveTip = 'Legt fest ob passive Buffs angezeigt werden oder nicht.\n\nz.B. Mundus Segen' -L.GeneralCyrodiil = 'Zeige Cyrodiil Boni' -L.GeneralCyrodiilTip = 'Legt fest ob die Buffs die man wรคrend der Schlacht in Cyrodiil bekommt, angezeigt werden.\n\nBenรถtigt: Zeige Passive Buffs' -L.GeneralDisguise = 'Zeige Verkleidungen' -L.GeneralDisguiseTip = 'Legt fest ob angelegte Verkleidungen angezeigt werden.\n\nBenรถtigt: Zeige Passive Buffs' -L.GeneralMundus = 'Zeige Mundus Segen' -L.GeneralMundusTip = 'Legt fest ob Mundus Steine angezeigt werden.\n\nBenรถtigt: Zeige Passive Buffs' -L.GeneralVampLycan = 'Zeige Vampir / Werwolf' -L.GeneralVampLycanTip = 'Legt fest ob Vampirismus and Lykanthropie Buffs angezeigt werden.\n\nBenรถtigt: Zeige Passive Buffs' -L.GeneralMinorBuffs = 'Verstecke kleinere Buffs' -L.GeneralMinorBuffsTip = 'Legt fest ob kleinere Buffs angezeigt werden.\n\nz.B. "kleinere Zauberei"' -L.GeneralMajorBuffs = 'Verstecke grรถรere Buffs' -L.GeneralMajorBuffsTip = 'Legt fest ob kleinere Buffs angezeigt werden.\n\nz.B. "grรถรere Zauberei"' - --- --------------------------------------------------- --- Some TRANSLATION FROM HERE ON ARE MISSING ---------- --- --------------------------------------------------- - --- settings: style tabs (2-5) - base - -L.WindowAlpha = 'Fenster Transparenz' -L.WindowAlphaTip = 'Set how opaque this aura window is when visible. A setting of 100 makes the window fully opaque.' -L.WindowScale = 'Fenster Grรถรe' -L.WindowScaleTip = 'Set the size of this aura window as a percentage. A setting of 100 is the default size.' -L.WindowGrowth = 'Aura Erweiterungs Richtung' -L.WindowGrowthTip = 'Set which direction new auras will grow from the anchor point. For the Centered settings, auras will grow either side of the anchor with ordering determined by the Left/Right prefix.\n\nNote that when displayed horizontally, the name and bar are hidden automatically.' -L.WindowPadding = 'Aura Erweiterungs Abstand' -L.WindowPaddingTip = 'Leget den Abstand zwischen jeder angezeigten Aura fest.' -L.WindowSort = 'Aura Reihenfolge' -L.WindowSortTip = 'Set how auras are sorted. Either by alphabetical name or by remaining duration. When sorting by duration, passive and toggled abilities will always show first followed by timed abilities with those that will fade first furthest away from the anchor.' -L.WindowIconOn = 'Zeige Fรคhigkeitsicon rechts' -L.WindowIconOnTip = 'Set whether the aura\'s icon is shown on the right or the left of the name label and statusbar timer when displaying vertically.' -L.WindowShowNameBar = 'Zeige Fรคhigkeitsname & Zeitleiste' -L.WindowShowNameBarTip = 'Set whether the ability name and the statusbar timer should be shown when auras are set to grow vertically.' -L.WindowTooltips = 'Zeige Fรคhigkeitsname im Tooltip' -L.WindowTooltipsTip = 'Set whether to show the ability name in a mouseover tooltip (over the icon) for each aura.' - --- settings: style tabs (2-5) - name -L.WindowNameHeader = 'Fรคhigkeitsnamen Text' -L.WindowNameFont = 'Names Stil' - --- settings: style tabs (2-5) - timer -L.WindowTimerHeader = 'Zeitanzeige Text' -L.WindowTimerShowTP = 'Zeige Zeit fรผr Umschaltbare & Passive' -L.WindowTimerShowTPTip = 'Set whether the timer label is shown for (T)oggled and (P)passive abilities. When disabled, the timer label will be hidden for auras without a duration.' -L.WindowTimerHorz = 'Zeitanzeige Position: Horizontal' -L.WindowTimerHorzTip = 'Set the timer\'s position for each aura when displaying horizontally. A setting of Hidden will stop the timer label showing for any auras.' -L.WindowTimerVert = 'Zeitanzeige Position: Vertikal' -L.WindowTimerVertTip = 'Set the timer\'s position for each aura when displaying vertically. A setting of Hidden will stop the timer label showing for any auras.' -L.WindowTimerFont = 'Zeitanzeige Stil' - --- settings: style tabs (2-5) - bar -L.WindowBarHeader = 'Zeitanzeigen Leiste' -L.WindowBarGloss = 'Glรคnzende Leisten' -L.WindowBarGlossTip = 'Set whether the timer bar\'s should be glossy when displayed.' -L.WindowBarWidth = 'Leisten Breite' -L.WindowBarWidthTip = 'Set how wide the timer bar\'s should be when displayed.' -L.WindowBarTimed = 'Farbe: Zeitliche Auren' -L.WindowBarTimedTip = 'Set the timer bar colours for auras with a set duration. The left colour choice determines the start of the bar (when it begins counting down) and the second the finish of the bar (when it has almost expired).\n\nThis is the colour that will also be used for auras with a cast time before they apply.' -L.WindowBarToggle = 'Farbe: Umschaltbare Auren' -L.WindowBarToggleTip = 'Set the timer bar colours for toggled auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' -L.WindowBarPassive = 'Farbe: Passive Auren' -L.WindowBarPassiveTip = 'Set the timer bar colours for passive auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' - --- settings: profiles tab (7) -L.ProfileCharacterList = 'Vorhande Einstellungen' -L.ProfileCharacterListTip = 'Liste von Charactern die aktuell S\'rendarr Einstellungen besitzen.' -L.ProfileCopyFrom = 'Einstellungen Kopieren' -L.ProfileCopyFromTip = 'Kopiert die Einstellungen des ausgewรคhlten Characters auf die des aktuell eingeloggten Characters.' -L.ProfileCopyFromWarn = 'Das klicken auf den Button wird das Interface neu laden und alle Srendarr Einstellungen des Character mit den \'s Einstellungen mit denen des ausgewรคhlten Characters รผberschreiben\n\nKann nicht rรผckgรคngig gemacht werden!' +L.Srendarr = '|c67b1e9S|c4779ce\'rendarr|r (BETA)' +L.Srendarr_Basic = 'S\'rendarr (BETA)' +L.Usage = '|c67b1e9S|c4779ce\'rendarr|r - Usage: /srendarr lock|unlock to toggle display window movement.' + + + +L.Prominent_AuraAddSuccess = 'wurde zur Prominenten Whitelist hinzugefรผgt.' +L.Prominent_AuraAddFail = 'wurde nicht gefunden und konnte nicht hinzugefรผgt werden.' +L.Prominent_AuraRemoved = 'wurde von der Prominenten Whitelist entfernt.' + +L.Blacklist_AuraAddSuccess = 'wurde zur Blacklist hinzugefรผgt und wird nicht lรคnger dargestellt.' +L.Blacklist_AuraAddFail = 'wurde nicht gefunden und konnte nicht hinzugefรผgt werden.' +L.Blacklist_AuraRemoved = 'wurde von der Blacklist entfernt.' + +L.Time_Tenths = '%.1fs' +L.Time_Seconds = '%ds' +L.Time_Minutes = '%dm' +L.Time_Hours = '%dh' +L.Time_Days = '%dd' +L.Time_Toggle = 'U' +L.Time_Passive = 'P' +L.Time_Cast = 'Cast' + +L.Group_Displayed_Here = 'Angezeigte Leisten' +L.Group_Displayed_None = 'keine' + +L.Group_Player_Short = 'Deine kurzen Buffs' +L.Group_Player_Long = 'Deine langen Buffs' +L.Group_Player_Toggled = 'Deine umschaltb. Buffs' +L.Group_Player_Passive = 'Deine Passiven Effekte' +L.Group_Player_Debuff = 'Deine Debuffs' +L.Group_Player_Ground = 'Deine Bodeneffekte' +L.Group_Player_Major = 'Deine grรถรeren Buffs' +L.Group_Player_Minor = 'Deine kleineren Buffs' +L.Group_Target_Buff = 'Ziel Buffs' +L.Group_Target_Debuff = 'Ziel Debuffs' +L.Group_Prominent = 'Prominente Buffs' + +L.TabButton1 = 'Allgemein' +L.TabButton2 = 'Filter' +L.TabButton3 = 'Leisten' +L.TabButton4 = 'Profile' + +L.TabHeader1 = 'Allgemein Einstellungen' +L.TabHeader2 = 'Filter Einstellungen' +L.TabHeader4 = 'Profil Einstellungen' +L.TabHeaderDisplay = 'Leisten Einstellungen' + +L.DropGroup_1 = 'In Leiste [|cffd1001|r]' +L.DropGroup_2 = 'In Leiste [|cffd1002|r]' +L.DropGroup_3 = 'In Leiste [|cffd1003|r]' +L.DropGroup_4 = 'In Leiste [|cffd1004|r]' +L.DropGroup_5 = 'In Leiste [|cffd1005|r]' +L.DropGroup_6 = 'In Leiste [|cffd1006|r]' +L.DropGroup_7 = 'In Leiste [|cffd1007|r]' +L.DropGroup_8 = 'In Leiste [|cffd1008|r]' +L.DropGroup_None = 'Nicht anzeigen' + +L.DropStyle_Full = 'Komplett anzeigen' +L.DropStyle_Icon = 'Nur Icon' +L.DropStyle_Mini = 'Nur Text & Timer' + +L.DropGrowth_Up = 'Hoch' +L.DropGrowth_Down = 'Runter' +L.DropGrowth_Left = 'Links' +L.DropGrowth_Right = 'Rechts' +L.DropGrowth_CenterLeft = 'Zentriert (Links)' +L.DropGrowth_CenterRight = 'Zentriert (Rechts)' + +L.DropSort_Name = 'Fรคhigkeits Name' +L.DropSort_Time = 'Verbleibende Zeit' +L.DropSort_Cast = 'Ausgehend' + +L.DropTimer_Above = 'รber Icon' +L.DropTimer_Below = 'Unter Icon' +L.DropTimer_Over = 'Auf Icon' +L.DropTimer_Hidden = 'Versteckt' + +L.Add_Sample_Auras = 'Beispiel Buffs anzeigen' + +L.SampleAura_PlayerTimed = 'Spieler Zeitlich' +L.SampleAura_PlayerToggled = 'Spieler Umgeschaltbar' +L.SampleAura_PlayerPassive = 'Spieler Passive' +L.SampleAura_PlayerDebuff = 'Spieler Debuff' +L.SampleAura_PlayerGround = 'Boden Effect' +L.SampleAura_PlayerMajor = 'Grรถรere Buffs' +L.SampleAura_PlayerMinor = 'Kleinere Buffs' +L.SampleAura_TargetBuff = 'Ziel Buff' +L.SampleAura_TargetDebuff = 'Ziel Debuff' + +L.General_ClickToViewAuras = 'Klick = Auren anzeigen' + +-- settings: general (unlock) +L.General_UnlockDesc = 'Entsperren, um das verschieben von den verschiedenen Leisten mit der Maus zu aktivieren. Der Zurรผcksetzen-Knopf wird alle Fenster wieder auf die Standartposition zurรผcksetzen.' +L.General_UnlockLock = 'Sperren' +L.General_UnlockUnlock = 'Entsperren' +L.General_UnlockReset = 'Zurรผcksetzen' +L.General_UnlockResetAgain = 'Nochmal klicken zum Zurรผcksetzen' +-- settings: general (aura display control) +L.General_ControlHeader = 'Buff/Debuff Anzeige Einstellungen' +L.General_ControlCombat = 'Nur im Kampf anzeigen' +L.General_ControlCombatTip = 'Auf "Ein" stellen wenn die Leisten nur im Kampf angezeigt werden sollen.' +L.General_ControlThreshold = 'Kurzer Buff Grenzwert' +L.General_ControlThresholdTip = 'Set the minimum duration of player buffs (in seconds) that will be considered part of the \'Long Buffs\' group. Any buffs below this threshold will be part of the \'Short Buffs\' group instead.' +L.General_ControlThresholdWarn = 'Display changes from altering this setting will only show after closing options or Adding Sample Auras.' +L.General_ControlAuraFade = 'Buff/Debuff Ausblendezeit' +L.General_ControlAuraFadeTip = 'Set how long an expired aura should take to fade out of view. With a setting of 0, Auras will disappear as soon as they expire without any fadeout.\n\nThe fadeout timer is in milliseconds.' +L.General_ControlBaseTip = 'Set which display window to show this Aura Group in, or hide it from display entirely.' +L.General_ControlShortTip = 'This Aura Group contains all buffs on yourself with an original duration below the \'Short Buff Threshold\'.' +L.General_ControlLongTip = 'This Aura Group contains all buffs on yourself with an original duration above the \'Short Buff Threshold\'.' +L.General_ControlToggledTip = 'This Aura Group contains all toggled buffs that are active on yourself.' +L.General_ControlPassiveTip = 'This Aura Group contains all passive effects that are active on yourself unless specially filtered.' +L.General_ControlDebuffTip = 'This Aura Group contains all hostile debuffs active on yourself cast by other mobs, players or the enviroment.' +L.General_ControlGroundTip = 'This Aura Group contains all ground areas of effect that are cast by yourself.' +L.General_ControlMajorTip = 'This Aura Group contains all beneficial Major Effects that are active on yourself (eg. Major Sorcery), detrimental Major Effects are part of the Debuffs group.' +L.General_ControlMinorTip = 'This Aura Group contains all beneficial Minor Effects that are active on yourself (eg. Minor Sorcery), detrimental Minor Effects are part of the Debuffs group.' +L.General_ControlTargetBuffTip = 'This Aura Group contains all buffs on your target, whether they are timed, passive or toggled, unless specially filtered.' +L.General_ControlTargetDebuffTip = 'This Aura Group contains all debuffs applied to your target. Due to game limitations, only your debuffs will be displayed other than rare exceptions.' +L.General_ControlProminentTip = 'This special Aura Group contains all buffs on yourself, and ground areas of effect, whitelisted to display here instead of their original group.' +-- settings: general (prominent auras) +L.General_ProminentHeader = 'Prominente Buffs' + +L.General_ProminentDesc = 'Buffs auf dir und auf Bodenzielen kรถnnen auf eine Whitelist gesetzt werden um als Prominent zu erscheinen. Dies erlaubt es besondere Effekte einzeln in einem extra Fenster zu beobachten.' +L.General_ProminentAdd = 'Promintenten Buff hinzufรผgen' +L.General_ProminentAddTip = 'The buff or ground target effect you want to make prominent must have its name entered exactly as it appears ingame, Press enter to add the aura to the prominence whitelist and please note only auras with a duration can be set, passives and toggled abilities will be ignored.' +L.General_ProminentAddWarn = 'Adding an aura requires scanning all auras in the game to find the ability\'s internal ID number. This can cause the game to hang for a moment while searching.' +L.General_ProminentList = 'Aktuelle prominente Buffs' +L.General_ProminentListTip = 'List of all auras set to appear as prominent. To remove existing auras, select from the list and use the Remove button below.' +L.General_ProminentRemove = 'Entferne prominenten Buff' +-- settings: filters +L.Filter_Desc = 'Einstellung der Anzeige von bestimmten Buffs/Debuffs basierend auf einer Blacklist (mit Namen) oder durch das Filtern bestimmter Buff/Debuff Kategorien. Das Aktivieren eines Filters verhindert die Anzeige dieser Kategorie.' +L.Filter_BlacklistHeader = 'Buff/Debuff Blacklist' +L.Filter_BlacklistAdd = 'Buff/Debuff zur Blacklist hinzufรผgen' +L.Filter_BlacklistAddTip = 'The aura you want to blacklist must have its name entered exactly as it appears ingame. Press enter to add the aura to the blacklist.' +L.Filter_BlacklistAddWarn = 'Adding an aura requires scanning all auras in the game to find the ability\'s internal ID number. This can cause the game to hang for a moment while searching.' + +L.Filter_BlacklistList = 'Aktuell Blacklist Buffs/Debuffs' +L.Filter_BlacklistListTip = 'List of all auras currently blacklisted. To remove auras from the blacklist, select from the list and use the Remove button below.' +L.Filter_BlacklistRemove = 'Entferne von Blacklist' + +L.Filter_PlayerHeader = 'Buff/Debuff Filter fรผr Spieler' +L.Filter_TargetHeader = 'Buff/Debuff Filter fรผr Ziel' +L.Filter_Block = 'Filter: Blocken' +L.Filter_BlockPlayerTip = 'Set whether to prevent the display of the \'Brace\' toggle while you are blocking.' +L.Filter_BlockTargetTip = 'Set whether to prevent the display of the \'Brace\' toggle when your opponent is blocking.' +L.Filter_Cyrodiil = 'Filter: Cyrodiil Boni' +L.Filter_CyrodiilPlayerTip = 'Set whether to prevent the display of buffs provided during Cyrodiil AvA on yourself.' +L.Filter_CyrodiilTargetTip = 'Set whether to prevent the dispolay of buffs provided during Cyrodiil AvA on your target.' +L.Filter_Disguise = 'Filter: Verkleidungen' +L.Filter_DisguisePlayerTip = 'Set whether to prevent the display of active disguises on yourself.' +L.Filter_DisguiseTargeTtip = 'Set whether to prevent the display of active disguises on your target.' +L.Filter_MajorEffects = 'Filter: Grรถรere Buffs' +L.Filter_MajorEffectsTargetTip = 'Set whether to prevent the display of Major Effects (eg. Major Maim, Major Sorcery) on your target.' +L.Filter_MinorEffects = 'Filter: Kleinere Buffs' +L.Filter_MinorEffectsTargetTip = 'Set whether to prevent the display of Minor Effects (eg. Minor Maim, Minor Sorcery) on your target.' +L.Filter_MundusBoon = 'Filter: Mundussteine' +L.Filter_MundusBoonPlayerTip = 'Set whether to prevent the display of Mundus Stone boons on youself.' +L.Filter_MundusBoonTargetTip = 'Set whether to prevent the display of Mundus Stone boons on your target.' +L.Filter_SoulSummons = 'Filter: Abklingzeit Seelenbeschwรถrung' +L.Filter_SoulSummonsPlayerTip = 'Set whether to prevent the display of the cooldown \'aura\' for Soul Summons on yourself.' +L.Filter_SoulSummonsTargetTip = 'Set whether to prevent the display of the cooldown \'aura\' for Soul Summons on your target.' +L.Filter_VampLycan = 'Filter: Vampir & Werwolf Effekte' +L.Filter_VampLycanPlayerTip = 'Set whether to prevent the display of Vampirism and Lycanthropy buffs on yourself.' +L.Filter_VampLycanTargetTip = 'Set whether to prevent the display of Vampirism and Lycanthropy buffs on your target.' +-- settings: display frames (base) +L.DisplayFrame_Alpha = 'Fenster Transparenz' +L.DisplayFrame_AlphaTip = 'Set how opaque this aura window is when visible. A setting of 100 makes the window fully opaque.' +L.DisplayFrame_Scale = 'Fenster Skalierung' +L.DisplayFrame_ScaleTip = 'Set the size of this aura window as a percentage. A setting of 100 is the default size.' +-- settings: display frames (aura) +L.DisplayFrame_AuraHeader = 'Buff/Debuff Anzeige' +L.DisplayFrame_Style = 'Buff/Debuff Aussehen' +L.DisplayFrame_StyleTip = 'Set the style which this aura window\'s auras will display as.\n\n|cffd100Full Display|r - Show abiltiy name and icon, timer bar and text.\n\n|cffd100Icon Only|r - Show ability icon and timer text only, this style provides more options for Aura Growth Direction than the others.\n\n|cffd100Minimal Display|r - Show ability name, and a smaller timer bar only.' +L.DisplayFrame_Growth = 'Buff/Debuff Errweiterungsrichtung' +L.DisplayFrame_GrowthTip = 'Set which direction new auras will grow from the anchor point. For the centered settings, auras will grow either side of the anchor with ordering determined by the left|right prefix.\n\nAuras can only grow up or down when displaying in the |cffd100Full|r or |cffd100Mini|r styles.' +L.DisplayFrame_Padding = 'Buff/Debuff Abstand' +L.DisplayFrame_PaddingTip = 'Set the spacing between each displayed aura.' +L.DisplayFrame_Sort = 'Buff/Debuff Reihenfolge' +L.DisplayFrame_SortTip = 'Set how auras are sorted. Either by alphabetical name, remaining duration or by the order in which they were cast. When sorting by duration, passive and toggled abilities will always show first followed by timed abilities with those that will fade first furthest away from the anchor.' +L.DisplayFrame_Highlight = 'Umschaltbare Buffs/Debuffs hervorheben' +L.DisplayFrame_HighlightTip = 'Set whether toggled auras have their icon highlighted to help distinguish from passive auras.\n\nNot available in the |cffd100Mini|r style as no icon is shown.' +-- settings: display frames (name) +L.DisplayFrame_NameHeader = 'Fรคhigkeitenanzeige' +L.DisplayFrame_NameFont = 'Text Schrift' +L.DisplayFrame_NameStyle = 'Text Farbe & Aussehen' +L.DisplayFrame_NameSize = 'Text Grรถรe' +-- settings: display frames (timer) +L.DisplayFrame_TimerHeader = 'Zeitanzeige' +L.DisplayFrame_TimerFont = 'Zeit Schriftart' +L.DisplayFrame_TimerStyle = 'Zeit Schrift Farbe & Aussehen' +L.DisplayFrame_TimerSize = 'Zeit Grรถรe' +L.DisplayFrame_TimerLocation = 'Zeit Position' +L.DisplayFrame_TimerLocationTip = 'Set the timer\'s position for each aura with regards to that aura\'s icon. A setting of hidden will stop the timer label showing for all auras displayer here.\n\nOnly certain placement options are available depending on the current style.' +-- settings: display frames (bar) +L.DisplayFrame_BarHeader = 'Zeit Leiste' +L.DisplayFrame_BarReverse = 'Countdown Richtung umkehren' +L.DisplayFrame_BarReverseTip = 'Set whether to reverse the countdown direction of the timer bar making the timer decrease towards the right. In the |cffd100Full|r style this will also position the Aura icon to the right of the bar instead of the left.' +L.DisplayFrame_BarGloss = 'Glรคnzende Leisten' +L.DisplayFrame_BarGlossTip = 'Set whether the timer bar\'s should be glossy when displayed.' +L.DisplayFrame_BarWidth = 'Leisten Breite' +L.DisplayFrame_BarWidthTip = 'Set how wide the timer bar\'s should be when displayed.' +L.DisplayFrame_BarTimed = 'Farbe: Zeitliche Buffs/Debuffs' +L.DisplayFrame_BarTimedTip = 'Set the timer bar colours for auras with a set duration. The left colour choice determines the start of the bar (when it begins counting down) and the second the finish of the bar (when it has almost expired).' +L.DisplayFrame_BarToggled = 'Farbe: Umschaltbare Buffs/Debuffs' +L.DisplayFrame_BarToggledTip = 'Set the timer bar colours for toggled auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' +L.DisplayFrame_BarPassive = 'Farbe: Passive Buffs/Debuffs' +L.DisplayFrame_BarPassiveTip = 'Set the timer bar colours for passive auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' +-- settings: profiles +L.Profile_Desc = 'Setting profiles can be managed here including the option to enable an account wide profile that will apply the same settings to ALL character\'s on this account. Due to the permanency of these options, management must first be enabled using the checkbox at the bottom of the panel.' +L.Profile_UseGlobal = 'Accountweites Profil benutzen' +L.Profile_UseGlobalWarn = 'Switching between local and global profiles will reload the interface.' +L.Profile_Copy = 'Profil zum Kopieren auswรคhlen' +L.Profile_CopyTip = 'Select a profile to copy its settings to the currently actrive profile. The active profile will be for either the logged in character or the account wide profile if enabled. The existing profile settings will be permanently overwritten.\n\nThis cannot be undone!' +L.Profile_CopyButton = 'Profil kopieren' +L.Profile_CopyButtonWarn = 'Kopieren eines Profiles wird das Interface neu laden.' +L.Profile_CopyCannotCopy = 'Unable to copy selected profile. Please try again or select another profile.' +L.Profile_Delete = 'Profil zum Lรถschen auswรคhlen' +L.Profile_DeleteTip = 'Select a profile to delete its settings from the database. If that character is logged in later, and you are not using the account wide profile, new default settings will be created.\n\nDeleting a profile is permanent!' +L.Profile_DeleteButton = 'Profil Lรถschen' +L.Profile_Guard = 'Profilverwaltung aktivieren' if (GetCVar('language.2') == 'de') then -- overwrite GetLocale for new language for k, v in pairs(Srendarr:GetLocale()) do if (not L[k]) then -- no translation for this string, use default - L[k] = v + L[k] = v end end - + function Srendarr:GetLocale() -- set new locale return return L end diff --git a/Locales/Local_en.lua b/Locales/Local_en.lua index bcd5eb5..d16e48a 100644 --- a/Locales/Local_en.lua +++ b/Locales/Local_en.lua @@ -1,757 +1,287 @@ -local Srendarr = _G['Srendarr'] -- grab addon table from global -local L = {} +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = {} + +L.Srendarr = '|c67b1e9S|c4779ce\'rendarr|r' +L.Srendarr_Basic = 'S\'rendarr' +L.Usage = '|c67b1e9S|c4779ce\'rendarr|r - Usage: /srendarr lock|unlock to toggle display window movement.' +L.CastBar = 'Cast Bar' +L.Sound_DefaultProc = 'Srendarr (Default Proc)' + +-- time format +L.Time_Tenths = '%.1fs' +L.Time_Seconds = '%ds' +L.Time_Minutes = '%dm' +L.Time_Hours = '%dh' +L.Time_Days = '%dd' + +-- aura grouping +L.Group_Displayed_Here = 'Displayed Groups' +L.Group_Displayed_None = 'None' +L.Group_Player_Short = 'Your Short Buffs' +L.Group_Player_Long = 'Your Long Buffs' +L.Group_Player_Toggled = 'Your Toggled Buffs' +L.Group_Player_Passive = 'Your Passives' +L.Group_Player_Debuff = 'Your Debuffs' +L.Group_Player_Ground = 'Your Ground Targets' +L.Group_Player_Major = 'Your Major Buffs' +L.Group_Player_Minor = 'Your Minor Buffs' +L.Group_Target_Buff = 'Target\'s Buffs' +L.Group_Target_Debuff = 'Target\'s Debuffs' +L.Group_Prominent = 'Prominent Buffs' + +-- whitelist & blacklist control +L.Prominent_AuraAddSuccess = 'has been added to the Prominence Whitelist.' +L.Prominent_AuraAddFail = 'was not found and could not be added.' +L.Prominent_AuraRemoved = 'has been removed from the Prominence Whitelist.' +L.Blacklist_AuraAddSuccess = 'has been added to the Blacklist and will no longer be displayed.' +L.Blacklist_AuraAddFail = 'was not found and could not be added to the Blacklist.' +L.Blacklist_AuraRemoved = 'has been removed from the Blacklist.' + +-- settings: base +L.Show_Example_Auras = 'Example Auras' +L.Show_Example_Castbar = 'Example Castbar' + +L.SampleAura_PlayerTimed = 'Player Timed' +L.SampleAura_PlayerToggled = 'Player Toggled' +L.SampleAura_PlayerPassive = 'Player Passive' +L.SampleAura_PlayerDebuff = 'Player Debuff' +L.SampleAura_PlayerGround = 'Ground Effect' +L.SampleAura_PlayerMajor = 'Major Effect' +L.SampleAura_PlayerMinor = 'Minor Effect' +L.SampleAura_TargetBuff = 'Target Buff' +L.SampleAura_TargetDebuff = 'Target Debuff' + +L.TabButton1 = 'General' +L.TabButton2 = 'Filters' +L.TabButton3 = 'Cast Bar' +L.TabButton4 = 'Aura Display' +L.TabButton5 = 'Profiles' + +L.TabHeader1 = 'General Settings' +L.TabHeader2 = 'Filter Settings' +L.TabHeader3 = 'Cast Bar Settings' +L.TabHeader5 = 'Profile Settings' +L.TabHeaderDisplay = 'Display Window Settings' + +-- settings: generic +L.GenericSetting_ClickToViewAuras = 'Click To View Auras' +L.GenericSetting_NameFont = 'Name Text Font' +L.GenericSetting_NameStyle = 'Name Text Font Colour & Style' +L.GenericSetting_NameSize = 'Name Text Size' +L.GenericSetting_TimerFont = 'Timer Text Font' +L.GenericSetting_TimerStyle = 'Timer Text Font Colour & Style' +L.GenericSetting_TimerSize = 'Timer Text Size' + +-- settings: dropdown entries +L.DropGroup_1 = 'In Display Window [|cffd1001|r]' +L.DropGroup_2 = 'In Display Window [|cffd1002|r]' +L.DropGroup_3 = 'In Display Window [|cffd1003|r]' +L.DropGroup_4 = 'In Display Window [|cffd1004|r]' +L.DropGroup_5 = 'In Display Window [|cffd1005|r]' +L.DropGroup_6 = 'In Display Window [|cffd1006|r]' +L.DropGroup_7 = 'In Display Window [|cffd1007|r]' +L.DropGroup_8 = 'In Display Window [|cffd1008|r]' +L.DropGroup_None = 'Do Not Display' + +L.DropStyle_Full = 'Full Display' +L.DropStyle_Icon = 'Icon Only' +L.DropStyle_Mini = 'Minimal Display' + +L.DropGrowth_Up = 'Up' +L.DropGrowth_Down = 'Down' +L.DropGrowth_Left = 'Left' +L.DropGrowth_Right = 'Right' +L.DropGrowth_CenterLeft = 'Centered (Left)' +L.DropGrowth_CenterRight = 'Centered (Right)' + +L.DropSort_NameAsc = 'Ability Name (Asc)' +L.DropSort_TimeAsc = 'Remaining Time (Asc)' +L.DropSort_CastAsc = 'Casting Order (Asc)' +L.DropSort_NameDesc = 'Ability Name (Desc)' +L.DropSort_TimeDesc = 'Remaining Time (Desc)' +L.DropSort_CastDesc = 'Casting Order (Desc)' + +L.DropTimer_Above = 'Above Icon' +L.DropTimer_Below = 'Under Icon' +L.DropTimer_Over = 'Over Icon' +L.DropTimer_Hidden = 'Hidden' + + +-- ------------------------ +-- SETTINGS: GENERAL +-- ------------------------ +L.General_UnlockDesc = 'Unlock to allow the aura display windows to be dragged using the mouse. The reset button will return all windows to their default location.' +L.General_UnlockLock = 'Lock' +L.General_UnlockUnlock = 'Unlock' +L.General_UnlockReset = 'Reset' +L.General_UnlockResetAgain = 'Click Again To Reset' +L.General_CombatOnly = 'Only Show During Combat' +L.General_CombatOnlyTip = 'Set whether all aura windows are only visible when engaged in combat.' +L.General_AuraFakeEnabled = 'Enable Display Of Simulated Auras' +L.General_AuraFakeEnabledTip = 'Certain abilities with a duration do not provide the right details to addons when used. Enabling simulated auras is a way of displaying a useful aura for these abilities, but due to the lack of proper information they may not be entirely accurate.' +L.General_AuraFadeout = 'Aura Fadeout Time' +L.General_AuraFadeoutTip = 'Set how long an expired aura should take to fade out of view. With a setting of 0, Auras will disappear as soon as they expire without any fadeout.\n\nThe fadeout timer is in milliseconds.' +L.General_ShortThreshold = 'Short Buffs Threshold' +L.General_ShortThresholdTip = 'Set the minimum duration of player buffs (in seconds) that will be considered part of the \'Long Buffs\' group. Any buffs below this threshold will be part of the \'Short Buffs\' group instead.' +L.General_ShortThresholdWarn = 'Display changes from altering this setting will only show after closing options or Adding Sample Auras.' +L.General_ProcEnableAnims = 'Enable Proc Animations' +L.General_ProcEnableAnimsTip = 'Set whether to show an animation on the ActionBar for abilities that have proc\'d and now have a special action to perform. Abilites that can have procs include:\n Crystal Fragments\n Grim Focus & It\'s Morphs\n Flame Lash\n Deadly Cloak' +L.General_ProcenableAnimsWarn = 'If you are using a mod that modifies or hides the default ActionBar, animations may not display.' +L.General_ProcPlaySound = 'Play Sound On Proc' +L.General_ProcPlaySoundTip = 'Set a sound to play when an ability procs. A settings of None will prevent any audio alert of your procs.' +-- settings: general (aura control: display groups) +L.General_ControlHeader = 'Aura Control - Display Groups' +L.General_ControlBaseTip = 'Set which display window to show this Aura Group in, or hide it from display entirely.' +L.General_ControlShortTip = 'This Aura Group contains all buffs on yourself with an original duration below the \'Short Buff Threshold\'.' +L.General_ControlLongTip = 'This Aura Group contains all buffs on yourself with an original duration above the \'Short Buff Threshold\'.' +L.General_ControlToggledTip = 'This Aura Group contains all toggled buffs that are active on yourself.' +L.General_ControlPassiveTip = 'This Aura Group contains all passive effects that are active on yourself unless specially filtered.' +L.General_ControlDebuffTip = 'This Aura Group contains all hostile debuffs active on yourself cast by other mobs, players or the enviroment.' +L.General_ControlGroundTip = 'This Aura Group contains all ground areas of effect that are cast by yourself.' +L.General_ControlMajorTip = 'This Aura Group contains all beneficial Major Effects that are active on yourself (eg. Major Sorcery), detrimental Major Effects are part of the Debuffs group.' +L.General_ControlMinorTip = 'This Aura Group contains all beneficial Minor Effects that are active on yourself (eg. Minor Sorcery), detrimental Minor Effects are part of the Debuffs group.' +L.General_ControlTargetBuffTip = 'This Aura Group contains all buffs on your target, whether they are timed, passive or toggled, unless specially filtered.' +L.General_ControlTargetDebuffTip = 'This Aura Group contains all debuffs applied to your target. Due to game limitations, only your debuffs will be displayed other than rare exceptions.' +L.General_ControlProminentTip = 'This special Aura Group contains all buffs on yourself, and ground areas of effect, whitelisted to display here instead of their original group.' +-- settings: general (prominent auras) +L.General_ProminentHeader = 'Prominent Buffs' +L.General_ProminentDesc = 'Buffs on yourself as well as ground targets can be whitelisted to appear as prominent. This will allow them to be seperated out into a different window for easier monitoring of critical effects.' +L.General_ProminentAdd = 'Add A Prominent Buff' +L.General_ProminentAddTip = 'The buff or ground target effect you want to make prominent must have its name entered exactly as it appears ingame, Press enter to add the aura to the prominence whitelist and please note only auras with a duration can be set, passives and toggled abilities will be ignored.' +L.General_ProminentAddWarn = 'Adding an aura requires scanning all auras in the game to find the ability\'s internal ID number. This can cause the game to hang for a moment while searching.' +L.General_ProminentList = 'Current Prominent Buffs' +L.General_ProminentListTip = 'List of all auras set to appear as prominent. To remove existing auras, select from the list and use the Remove button below.' +L.General_ProminentRemove = 'Remove Prominent Aura' + + +-- ------------------------ +-- SETTINGS: FILTERS +-- ------------------------ +L.Filter_Desc = 'Control the display of certain auras based on either a blacklist for a given aura (by name) or through filters for certain categories of aura. For filters, enabling one prevents the display of that category.' +L.Filter_BlacklistHeader = 'Aura Blacklist' +L.Filter_BlacklistAdd = 'Add An Aura To The Blacklist' +L.Filter_BlacklistAddTip = 'The aura you want to blacklist must have its name entered exactly as it appears ingame. Press enter to add the aura to the blacklist.' +L.Filter_BlacklistAddWarn = 'Adding an aura requires scanning all auras in the game to find the ability\'s internal ID number. This can cause the game to hang for a moment while searching.' + +L.Filter_BlacklistList = 'Current Blacklisted Auras' +L.Filter_BlacklistListTip = 'List of all auras currently blacklisted. To remove auras from the blacklist, select from the list and use the Remove button below.' +L.Filter_BlacklistRemove = 'Remove From Blacklist' + +L.Filter_PlayerHeader = 'Aura Filters For Player' +L.Filter_TargetHeader = 'Aura Filters For Target' +L.Filter_Block = 'Filter Block' +L.Filter_BlockPlayerTip = 'Set whether to prevent the display of the \'Brace\' toggle while you are blocking.' +L.Filter_BlockTargetTip = 'Set whether to prevent the display of the \'Brace\' toggle when your opponent is blocking.' +L.Filter_Cyrodiil = 'Filter Cyrodiil Bonuses' +L.Filter_CyrodiilPlayerTip = 'Set whether to prevent the display of buffs provided during Cyrodiil AvA on yourself.' +L.Filter_CyrodiilTargetTip = 'Set whether to prevent the dispolay of buffs provided during Cyrodiil AvA on your target.' +L.Filter_Disguise = 'Filter Disguises' +L.Filter_DisguisePlayerTip = 'Set whether to prevent the display of active disguises on yourself.' +L.Filter_DisguiseTargeTtip = 'Set whether to prevent the display of active disguises on your target.' +L.Filter_MajorEffects = 'Filter Major Effects' +L.Filter_MajorEffectsTargetTip = 'Set whether to prevent the display of Major Effects (eg. Major Maim, Major Sorcery) on your target.' +L.Filter_MinorEffects = 'Filter Minor Effects' +L.Filter_MinorEffectsTargetTip = 'Set whether to prevent the display of Minor Effects (eg. Minor Maim, Minor Sorcery) on your target.' +L.Filter_MundusBoon = 'Filter Mundus Boons' +L.Filter_MundusBoonPlayerTip = 'Set whether to prevent the display of Mundus Stone boons on youself.' +L.Filter_MundusBoonTargetTip = 'Set whether to prevent the display of Mundus Stone boons on your target.' +L.Filter_SoulSummons = 'Filter Soul Summons Cooldown' +L.Filter_SoulSummonsPlayerTip = 'Set whether to prevent the display of the cooldown \'aura\' for Soul Summons on yourself.' +L.Filter_SoulSummonsTargetTip = 'Set whether to prevent the display of the cooldown \'aura\' for Soul Summons on your target.' +L.Filter_VampLycan = 'Filter Vampire & Werewolf Effects' +L.Filter_VampLycanPlayerTip = 'Set whether to prevent the display of Vampirism and Lycanthropy buffs on yourself.' +L.Filter_VampLycanTargetTip = 'Set whether to prevent the display of Vampirism and Lycanthropy buffs on your target.' +L.Filter_VampLycanBite = 'Filter Vampire & Werewolf Bite Timers' +L.Filter_VampLycanBitePlayerTip = 'Set whether to prevent the display of the Vampire and Werewolf bite cooldown timers on yourself.' +L.Filter_VampLycanBiteTargetTip = 'Set whether to prevent the display of the Vampire and Werewolf bite cooldown timers on your target.' + + +-- ------------------------ +-- SETTINGS: CAST BAR +-- ------------------------ +L.CastBar_Enable = 'Enable Cast & Channel Bar' +L.CastBar_EnableTip = 'Set whether to enable a movable casting bar to show progress on abilities that have a cast or channel time before activation.' +L.CastBar_Alpha = 'Transparency' +L.CastBar_AlphaTip = 'Set how opaque the cast bar is when visible. A setting of 100 makes the bar fully opaque.' +L.CastBar_Scale = 'Scale' +L.CastBar_ScaleTip = 'Set the size of the cast bar as a percentage. A setting of 100 is the default size.' +-- settings: cast bar (name) +L.CastBar_NameHeader = 'Casted Ability Name Text' +L.CastBar_NameShow = 'Show Ability Name Text' +-- settings: cast bar (timer) +L.CastBar_TimerHeader = 'Cast Timer Text' +L.CastBar_TimerShow = 'Show Cast Timer Text' +-- settings: cast bar (bar) +L.CastBar_BarHeader = 'Cast Timer Bar' +L.CastBar_BarReverse = 'Reverse Countdown Direction' +L.CastBar_BarReverseTip = 'Set whether to reverse the countdown direction of the cast timer bar making the timer decrease towards the right. In either case, channelled abilities will increase in the opposite direction.' +L.CastBar_BarGloss = 'Glossy Bar' +L.CastBar_BarGlossTip = 'Set whether the cast timer bar should be glossy when displayed.' +L.CastBar_BarWidth = 'Bar Width' +L.CastBar_BarWidthTip = 'Set how wide the cast timer bar should be when displayed.\n\nPlease note, depending on position, you may need to move the bar after adjusting the width.' +L.CastBar_BarColour = 'Bar Colour' +L.CastBar_BarColourTip = 'Set the cast timer bar colours. The left colour choice determines the start of the bar (when it begins counting down) and the second the finish of the bar (when it has almost expired).' + + +-- ------------------------ +-- SETTINGS: DISPLAY FRAMES +-- ------------------------ +L.DisplayFrame_Alpha = 'Window Transparency' +L.DisplayFrame_AlphaTip = 'Set how opaque this aura window is when visible. A setting of 100 makes the window fully opaque.' +L.DisplayFrame_Scale = 'Window Scale' +L.DisplayFrame_ScaleTip = 'Set the size of this aura window as a percentage. A setting of 100 is the default size.' +-- settings: display frames (aura) +L.DisplayFrame_AuraHeader = 'Aura Display' +L.DisplayFrame_Style = 'Aura Style' +L.DisplayFrame_StyleTip = 'Set the style which this aura window\'s auras will display as.\n\n|cffd100Full Display|r - Show abiltiy name and icon, timer bar and text.\n\n|cffd100Icon Only|r - Show ability icon and timer text only, this style provides more options for Aura Growth Direction than the others.\n\n|cffd100Minimal Display|r - Show ability name, and a smaller timer bar only.' +L.DisplayFrame_Growth = 'Aura Growth Direction' +L.DisplayFrame_GrowthTip = 'Set which direction new auras will grow from the anchor point. For the centered settings, auras will grow either side of the anchor with ordering determined by the left|right prefix.\n\nAuras can only grow up or down when displaying in the |cffd100Full|r or |cffd100Mini|r styles.' +L.DisplayFrame_Padding = 'Aura Growth Padding' +L.DisplayFrame_PaddingTip = 'Set the spacing between each displayed aura.' +L.DisplayFrame_Sort = 'Aura Sorting Order' +L.DisplayFrame_SortTip = 'Set how auras are sorted. Either by alphabetical name, remaining duration or by the order in which they were cast; whether this order is ascending or descending can also be set.\n\nWhen sorting by duration, any passives or toggled abilities will be sorted by name and shown closest to the anchor (ascending), or furthest from the anchor (descending), with timed abilities coming before (or after) them.' +L.DisplayFrame_Highlight = 'Toggled Aura Icon Highlight' +L.DisplayFrame_HighlightTip = 'Set whether toggled auras have their icon highlighted to help distinguish from passive auras.\n\nNot available in the |cffd100Mini|r style as no icon is shown.' +-- settings: display frames (name) +L.DisplayFrame_NameHeader = 'Ability Name Text' +-- settings: display frames (timer) +L.DisplayFrame_TimerHeader = 'Timer Text' +L.DisplayFrame_TimerLocation = 'Timer Text Location' +L.DisplayFrame_TimerLocationTip = 'Set the timer\'s position for each aura with regards to that aura\'s icon. A setting of hidden will stop the timer label showing for all auras displayer here.\n\nOnly certain placement options are available depending on the current style.' +-- settings: display frames (bar) +L.DisplayFrame_BarHeader = 'Timer Bar' +L.DisplayFrame_BarReverse = 'Reverse Countdown Direction' +L.DisplayFrame_BarReverseTip = 'Set whether to reverse the countdown direction of the timer bar making the timer decrease towards the right. In the |cffd100Full|r style this will also position the Aura icon to the right of the bar instead of the left.' +L.DisplayFrame_BarGloss = 'Glossy Bars' +L.DisplayFrame_BarGlossTip = 'Set whether the timer bar\'s should be glossy when displayed.' +L.DisplayFrame_BarWidth = 'Bar Width' +L.DisplayFrame_BarWidthTip = 'Set how wide the timer bar\'s should be when displayed.' +L.DisplayFrame_BarTimed = 'Colour: Timed Auras' +L.DisplayFrame_BarTimedTip = 'Set the timer bar colours for auras with a set duration. The left colour choice determines the start of the bar (when it begins counting down) and the second the finish of the bar (when it has almost expired).' +L.DisplayFrame_BarToggled = 'Colour: Toggled Auras' +L.DisplayFrame_BarToggledTip = 'Set the timer bar colours for toggled auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' +L.DisplayFrame_BarPassive = 'Colour: Passive Auras' +L.DisplayFrame_BarPassiveTip = 'Set the timer bar colours for passive auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' + + +-- ------------------------ +-- SETTINGS: PROFILES +-- ------------------------ +L.Profile_Desc = 'Setting profiles can be managed here including the option to enable an account wide profile that will apply the same settings to ALL character\'s on this account. Due to the permanency of these options, management must first be enabled using the checkbox at the bottom of the panel.' +L.Profile_UseGlobal = 'Use Account Wide Profile' +L.Profile_UseGlobalWarn = 'Switching between local and global profiles will reload the interface.' +L.Profile_Copy = 'Select A Profile To Copy' +L.Profile_CopyTip = 'Select a profile to copy its settings to the currently actrive profile. The active profile will be for either the logged in character or the account wide profile if enabled. The existing profile settings will be permanently overwritten.\n\nThis cannot be undone!' +L.Profile_CopyButton = 'Copy Profile' +L.Profile_CopyButtonWarn = 'Copying a profile will reload the interface.' +L.Profile_CopyCannotCopy = 'Unable to copy selected profile. Please try again or select another profile.' +L.Profile_Delete = 'Select A Profile To Delete' +L.Profile_DeleteTip = 'Select a profile to delete its settings from the database. If that character is logged in later, and you are not using the account wide profile, new default settings will be created.\n\nDeleting a profile is permanent!' +L.Profile_DeleteButton = 'Delete Profile' +L.Profile_Guard = 'Enable Profile Management' -L.Srendarr = '|c67b1e9S|c4779ce\'rendarr|r' -L.Usage = '|c67b1e9S|c4779ce\'rendarr|r - Usage: /srendarr lock or unlock to toggle UI movement.' --- timer strings -L.Time_Seconds = '%ds' -L.Time_Minutes = '%dm' -L.Time_Hours = '%dh' -L.Time_Toggle = 'T' -L.Time_Passive = 'P' -L.Time_Cast = 'Cast' --- drag overlay labels -L.DragLabel_BuffShort = 'SHORT' -L.DragLabel_BuffLong = 'LONG' -L.DragLabel_BuffAll = 'BUFF' -L.DragLabel_Debuff = 'DEBUFF' -L.DragLabel_Target = 'TARGET' -L.DragLabel_Target_Debuff = 'TARGET_DEBUFF' - --- --------------------------------------------------- --- AURA DATA ----------------------------------------- --- --------------------------------------------------- - --- --------------------------------------------------- --- WEAPONS ------------------------------------------- --- --------------------------------------------------- - --- TWO HANDED --------------- -L.Aura_Cleave = 20919 -L.Aura_Brawler = 38754 -L.Aura_Carve = 38745 -L.Aura_Stampede = 21055 -L.Aura_Uppercut = 28279 -L.Aura_Dizzying_Swing = 38814 -L.Aura_Wrecking_Blow = 38807 -L.Aura_Momentum = 28297 -L.Aura_Forward_Momentum = 38794 -L.Aura_Rally = 38802 - --- ONE HANDED AND SHIELD ---- -L.Aura_Puncture = 28306 -L.Aura_Pierce_Armor = 38250 -L.Aura_Ransack = 38256 -L.Aura_Low_Slash = 28304 -L.Aura_Crippling_Slash = 38264 -L.Aura_Deep_Slash = 38268 -L.Aura_Shield_Charge = 28719 -L.Aura_Invasion = 38405 -L.Aura_Shielded_Assault = 38401 -L.Aura_Power_Bash = 28365 -L.Aura_Power_Slam = 38452 -L.Aura_Reverberating_Bash = 38455 - --- DUAL WEILD --------------- -L.Aura_Twin_Slashes = 28379 -L.Aura_Blood_Craze = 38845 -L.Aura_Rending_Slashes = 38839 -L.Aura_Rapid_Strikes = 38857 -L.Aura_Whirling_Blades = 38891 -L.Aura_Blade_Cloak = 28613 -L.Aura_Quick_Cloak = 38901 -L.Aura_Deadly_Cloak = 38906 -L.Aura_Hidden_Blade = 21157 -L.Aura_Flying_Blade = 38910 -L.Aura_Shrouded_Daggers = 38914 - --- BOW ---------------------- -L.Aura_Poison_Arrow = 28869 -L.Aura_Poison_Injection = 38660 -L.Aura_Venom_Arrow = 38645 -L.Aura_Volley = 28876 -L.Aura_Scorched_Earth = 38689 -L.Aura_Arrow_Barrage = 38695 -L.Aura_Scatter_Shot = 28879 -L.Aura_Draining_Shot = 38669 -L.Aura_Magnum_Shot = 38672 -L.Aura_Arrow_Spray = 31271 -L.Aura_Acid_Spray = 38701 -L.Aura_Bombard = 38705 -L.Aura_Snipe = 28882 -L.Aura_Focused_Aim = 38687 -L.Aura_Lethal_Arrow = 38685 - --- DESTRUCTION STAFF -------- -L.Aura_Destructive_Touch = 29091 -- added by silentgecko -L.Aura_Shock_Touch = 40970 -- added by silentgecko -L.Aura_Frost_Touch = 40967 -- added by silentgecko -L.Aura_Flame_Touch = 40965 -- added by silentgecko -L.Aura_Destructive_Clench = 38984 -- added by silentgecko -L.Aura_Flame_Clench = 38985 -- added by silentgecko -L.Aura_Shock_Clench = 41016 -- added by silentgecko -L.Aura_Frost_Clench = 41013 -- added by silentgecko -L.Aura_Destructive_Reach = 38937 -- added by silentgecko -L.Aura_Shock_Reach = 38978 -- added by silentgecko -L.Aura_Flame_Reach = 38944 -- added by silentgecko -L.Aura_Frost_Reach = 38970 -- added by silentgecko -L.Aura_Wall_of_Elements = 28858 -L.Aura_Wall_of_Fire = 28807 -L.Aura_Wall_of_Frost = 28849 -L.Aura_Wall_of_Storms = 28854 -L.Aura_Wall_of_Cinders = 50228 -L.Aura_Unstable_Wall_of_Elements = 39052 -L.Aura_Unstable_Wall_of_Fire = 39053 -L.Aura_Unstable_Wall_of_Frost = 39067 -L.Aura_Unstable_Wall_of_Storms = 39073 -L.Aura_Unstable_Wall_of_Cinders = 50240 -L.Aura_Elemental_Blockade = 39011 -L.Aura_Blockade_of_Fire = 39012 -L.Aura_Blockade_of_Frost = 39028 -L.Aura_Blockade_of_Storms = 39018 -L.Aura_Blockade_of_Cinders = 50236 -L.Aura_Weakness_To_Elements = 29173 -L.Aura_Elemental_Drain = 39095 -L.Aura_Elemental_Susceptibility = 39089 -L.Aura_Greater_Distribution = 62792 -- debuff from elemental drain -L.Aura_Elemental_Ring = 39143 -L.Aura_Fire_Ring = 39145 -L.Aura_Frost_Ring = 39146 -L.Aura_Shock_Ring = 39147 -L.Aura_Pulsar = 39161 -L.Aura_Fiery_Pulsar = 39162 -L.Aura_Icy_Pulsar = 39163 -L.Aura_Electric_Pulsar = 39167 - --- RESTORATION STAFF -------- -L.Aura_Grand_Healing = 28385 -L.Aura_Healing_Springs = 40060 -L.Aura_Illustrious_Healing = 40058 -L.Aura_Regeneration = 28536 -L.Aura_Mutagen = 40079 -L.Aura_Rapid_Regeneration = 40076 -L.Aura_Blessing_Of_Protection = 37243 -L.Aura_Blessing_Of_Restoration = 40103 -L.Aura_Combat_Prayer = 40094 -L.Aura_Steadfast_Ward = 31639 -L.Aura_Healing_Ward = 40126 -L.Aura_Ward_Ally = 40130 -L.Aura_Force_Siphon = 31531 -L.Aura_Quick_Siphon = 40116 -L.Aura_Siphon_Spirit = 40109 - --- -------------------------- --- ARMOUR ------------------- --- -------------------------- - --- LIGHT ARMOUR ------------- -L.Aura_Annulment = 29338 -L.Aura_Dampen_Magic = 39186 -L.Aura_Harness_Magicka = 39182 - --- MEDIUM ARMOUR ------------ -L.Aura_Evasion = 29556 -L.Aura_Elude = 39192 -L.Aura_Shuffle = 39195 - --- HEAVY ARMOUR ------------- -L.Aura_Immovable = 29552 -L.Aura_Immovable_Brute = 39205 -L.Aura_Unstoppable = 39197 - --- -------------------------- --- GUILDS ------------------- --- -------------------------- - --- FIGHTERS GUILD ----------- -L.Aura_Expert_Hunter = 35762 -L.Aura_Evil_Hunter = 40194 -L.Aura_Camouflaged_Hunter = 40195 -L.Aura_Circle_of_Protection = 35737 -L.Aura_Turn_Undead = 40181 -L.Aura_Ring_of_Preservation = 40169 -L.Aura_Beast_Trap = 40384 -L.Aura_Rearming_Trap = 40385 -L.Aura_LightweightBeast_Trap = 40372 - --- MAGES GUILD -------------- -L.Aura_Meteor = 42461 -L.Aura_Ice_Comet = 42470 -L.Aura_Shooting_Star = 42482 -L.Aura_Entropy = 28567 -L.Aura_Degeneration = 40457 -L.Aura_Structured_Entropy = 40452 -L.Aura_Equilibrium = 31642 -L.Aura_Spell_Symmetry = 40445 -L.Aura_Balance = 40444 - --- UNDAUNTED ---------------- -L.Aura_Inner_Fire = 39475 -L.Aura_Inner_Rage = 42056 -L.Aura_Inner_Beast = 42060 -L.Aura_Bone_Shield = 39369 -L.Aura_Bone_Surge = 42176 -L.Aura_Spiked_Bone_Shield = 42138 - --- -------------------------- --- WORLD -------------------- --- -------------------------- - --- SOUL MAGIC --------------- -L.Aura_Soul_Strike = 39270 -L.Aura_Shatter_Soul = 40414 -L.Aura_Soul_Assault = 40420 -L.Aura_Soul_Trap = 26768 -L.Aura_Consuming_Trap = 40317 -L.Aura_Soul_Splitting_Trap = 40328 - --- WEREWOLF ----------------- -L.Aura_Hircines_Rage = 58317 -L.Aura_Hircines_Fortitude = 58325 -L.Aura_Roar = 32633 -L.Aura_Ferocious_Roar = 39113 -L.Aura_Rousing_Roar = 39114 -L.Aura_Piercing_Howl = 58405 -L.Aura_Howl_of_Despair = 58742 -L.Aura_Howl_of_Agony = 58798 -L.Aura_Infectious_Claws = 58855 -L.Aura_Claws_of_Anguish = 58864 -L.Aura_Claws_of_Life = 58879 - --- VAMPIRE ------------------ -L.Aura_Bat_Swarm = 32624 -L.Aura_Clouding_Swarm = 38932 -L.Aura_Devouring_Swarm = 38931 -L.Aura_Drain_Essence = 32893 -L.Aura_Invigorating_Drain = 38949 -L.Aura_Midnight_Drain = 38956 -L.Aura_Mist_Form = 32986 -L.Aura_Elusive_Mist = 38963 -L.Aura_Poison_Mist = 38965 - --- -------------------------- --- ALLIANCE WAR ------------- --- -------------------------- - --- ASSAULT ------------------ -L.Aura_War_Horn = 38563 -L.Aura_Aggressive_Horn = 40223 -L.Aura_Sturdy_Horn = 40220 -L.Aura_Rapid_Maneuver = 38566 -L.Aura_Charging_Maneuver = 40215 -L.Aura_Retreating_Maneuver = 40211 -L.Aura_Caltrops = 33376 -L.Aura_Anti_Cavalry_Caltrops = 40255 -L.Aura_Razor_Caltrops = 40242 - --- SUPPORT ------------------ -L.Aura_Barrier = 38573 -L.Aura_Replenishing_Barrier = 40239 -L.Aura_Reviving_Barrier = 40237 -L.Aura_Siege_Shield = 38570 -L.Aura_Propelling_Shield = 40226 -L.Aura_Siege_Weapon_Shield = 40229 -L.Aura_Purge = 38571 -L.Aura_Cleanse = 40234 -L.Aura_Efficient_Purge = 40232 -L.Aura_Magicka_Detonation = 61487 -L.Aura_Inevitable_Detonation = 61491 -L.Aura_Proximity_Detonation = 61500 -L.Aura_Vigor = 61503 -L.Aura_Echoing_Vigor = 61505 -L.Aura_Resolving_Vigor = 61507 - --- -------------------------- --- CLASS: DRAGONKNIGHT ------ --- -------------------------- - --- ARDENT FLAME ------------- -L.Aura_Dragonknight_Standard = 28988 -L.Aura_Shifting_Standard = 32958 -L.Aura_Standard_of_Might = 32947 -L.Aura_Fiery_Grip = 20492 -L.Aura_Extended_Chains = 20496 -L.Aura_Empowering_Chains = 20499 -L.Aura_Searing_Strike = 20657 -L.Aura_Unstable_Flame = 20668 -L.Aura_Burning_Embers = 20660 -L.Aura_Fiery_Breath = 20917 -L.Aura_Burning_Breath = 20944 -L.Aura_Engulfing_Flames = 20930 -L.Aura_Lava_Whip = 20803 -L.Aura_Molten_Whip = 20805 -L.Aura_Flame_Lash = 20816 -L.Aura_Power_Lash = 20824 - --- DRACONIC POWER ----------- -L.Aura_Ferocious_Leap = 32715 -L.Aura_Spiked_Armor = 20319 -L.Aura_Volatile_Armor = 20323 -L.Aura_Hardened_Armor = 20328 -L.Aura_Dark_Talons = 20245 -L.Aura_Burning_Talons = 20252 -L.Aura_Choking_Talons = 20251 -L.Aura_Dragon_Blood = 29004 -L.Aura_Green_Dragon_Blood = 32744 -L.Aura_Coagulating_Blood = 32722 -L.Aura_Reflective_Scale = 21007 -L.Aura_Reflective_Plate = 21014 -L.Aura_Dragon_Fire_Scale = 21017 - --- EARTHEN HEART ------------ -L.Aura_Magma_Armor = 15957 -L.Aura_Magma_Shell = 17874 -L.Aura_Corrosive_Armor = 17878 -L.Aura_Stonefist = 29032 -L.Aura_Obsidian_Shard = 31820 -L.Aura_Stone_Giant = 31816 -L.Aura_Molten_Weapons = 29043 -L.Aura_Igneous_Weapons = 31874 -L.Aura_Molten_Armaments = 31888 -L.Aura_Obsidian_Shield = 29071 -L.Aura_Fragmented_Shield = 32673 -L.Aura_Igneous_Shield = 29224 -L.Aura_Petrify = 29037 -L.Aura_Fossilize = 32685 -L.Aura_Shattering_Rocks = 32678 -L.Aura_Ash_Cloud = 29059 -L.Aura_Cinder_Storm = 20779 -L.Aura_Eruption = 32710 - --- -------------------------- --- CLASS: SORCERER ---------- --- -------------------------- - --- DAEDRIC SUMMONING -------- -L.Aura_Summon_Storm_Atronach = 23634 -L.Aura_Greater_Storm_Atronach = 23492 -L.Aura_Summon_Charged_Atronach = 23495 -L.Aura_Daedric_Curse = 24326 -L.Aura_Daedric_Prey = 63210 --24328 -L.Aura_Velocious_Curse = 24330 -L.Aura_Conjured_Ward = 28418 -L.Aura_Empowered_Ward = 29482 -L.Aura_Hardened_Ward = 29489 - --- DARK MAGIC --------------- -L.Aura_Negate_Magic = 27706 -L.Aura_Absorption_Field = 28348 -L.Aura_Suppression_Field = 28341 -L.Aura_Crystal_Shard = 43714 -L.Aura_Crystal_Blast = 46331 -L.Aura_Crystal_Fragments = 46324 -L.Aura_Encase = 28025 -L.Aura_Restraining_Prison = 28311 -L.Aura_Shattering_Prison = 28308 -L.Aura_Rune_Prison = 24371 -L.Aura_Rune_Cage = 24578 -L.Aura_Weakening_Prison = 24574 -L.Aura_Dark_Exchange = 24584 -L.Aura_Dark_Conversion = 24589 -L.Aura_Dark_Deal = 24595 -L.Aura_Daedric_Mines = 24828 -L.Aura_Daedric_Minefield = 24834 -L.Aura_Daedric_Tomb = 24842 - --- STORM CALLING ------------ -L.Aura_Mages_Fury = 18718 -L.Aura_Endless_Fury = 19109 -L.Aura_Mages_Wrath = 19123 -L.Aura_Lightning_Form = 23210 -L.Aura_Boundless_Storm = 30255 -L.Aura_Thundering_Presence = 23231 -L.Aura_Lightning_Splash = 23182 -L.Aura_Liquid_Lightning = 23200 -L.Aura_Lightning_Flood = 23205 -L.Aura_Surge = 23670 -L.Aura_Critical_Surge = 23678 -L.Aura_Power_Surge = 23674 -L.Aura_Bolt_Escape = 23234 -L.Aura_Ball_of_Lightning = 23277 -L.Aura_Streak = 23236 - --- -------------------------- --- CLASS: NIGHTBLADE -------- --- -------------------------- - --- ASSASSINATION ------------ -L.Aura_Teleport_Strike = 18342 -L.Aura_Ambush = 25484 -L.Aura_Lotus_Fan = 25493 -L.Aura_Blur = 33375 -L.Aura_Double_Take = 35419 -L.Aura_Mirage = 35414 -L.Aura_Mark_Target = 33357 -L.Aura_Piercing_Mark = 36968 -L.Aura_Reapers_Mark = 36967 -L.Aura_Grim_Focus = 61902 -L.Aura_Relentless_Focus = 61927 -L.Aura_Merciless_Resolve = 61919 -L.Aura_Death_Stroke = 33398 -L.Aura_Incapacitating_Strike = 36508 -L.Aura_Soul_Harvest = 36514 - --- SHADOW ------------------- -L.Aura_Consuming_Darkness = 25411 -L.Aura_Bolstering_Darkness = 36493 -L.Aura_Veil_of_Blades = 36485 -L.Aura_Shadow_Cloak = 25375 -L.Aura_Shadowy_Disguise = 25380 -L.Aura_Dark_Cloak = 25377 -L.Aura_Veiled_Strike = 25255 -L.Aura_Concealed_Weapon = 25267 -L.Aura_Surprise_Attack = 25260 -L.Aura_Path_of_Darkness = 33195 -L.Aura_Refreshing_Path = 36028 -L.Aura_Twisting_Path = 36049 -L.Aura_Aspect_of_Terror = 25352 -L.Aura_Mass_Hysteria = 37470 -L.Aura_Manifestation_of_Terror = 37475 -L.Aura_Summon_Shade = 33211 -L.Aura_Dark_Shades = 35434 -L.Aura_Shadow_Image = 35441 - --- SIPHONING ---------------- -L.Aura_Soul_Shred = 25091 -L.Aura_Soul_Siphon = 35508 -L.Aura_Soul_Tether = 35460 -L.Aura_Strife = 33291 -L.Aura_Funnel_Health = 34838 -L.Aura_Swallow_Soul = 34835 -L.Aura_Agony = 33308 -L.Aura_Malefic_Wreath = 34727 -L.Aura_Prolonged_Suffering = 34721 -L.Aura_Cripple = 33326 -L.Aura_Crippling_Grasp = 36957 -L.Aura_Debilitate = 36943 -L.Aura_Drain_Power = 33316 -L.Aura_Power_Extraction = 36901 -L.Aura_Sap_Essence = 36891 - --- -------------------------- --- CLASS: TEMPLAR ----------- --- -------------------------- - --- AEDRIC SPEAR ------------- -L.Aura_Radial_Sweep = 22138 -L.Aura_Empowering_Sweep = 22144 -L.Aura_Crescent_Sweep = 22139 -L.Aura_Biting_Jabs = 26792 -L.Aura_Binding_Javelin = 26804 -L.Aura_Focused_Charge = 22149 -L.Aura_Explosive_Charge = 22161 -L.Aura_Toppling_Charge = 15540 -L.Aura_Spear_Shards = 26188 -L.Aura_Luminous_Shards = 26858 -L.Aura_Blazing_Spear = 26869 -L.Aura_Sun_Shield = 22178 -L.Aura_Radiant_Ward = 22182 -L.Aura_Blazing_Shield = 22180 - --- DAWNS WRATH -------------- -L.Aura_Nova = 21752 -L.Aura_Solar_Prison = 21755 -L.Aura_Solar_Disturbance = 21758 -L.Aura_Sun_Fire = 21726 -L.Aura_Vampires_Bane = 21729 -L.Aura_Reflective_Light = 21732 -L.Aura_Solar_Flare = 22057 -L.Aura_Dark_Flare = 22110 -L.Aura_Solar_Barrage = 22095 -L.Aura_Backlash = 21761 -L.Aura_Purifying_Light = 21765 -L.Aura_Power_of_the_Light = 21763 -L.Aura_Eclipse = 21776 -L.Aura_Total_Dark = 22006 -L.Aura_Unstable_Core = 22004 -L.Aura_Radiant_Destruction = 63029 -L.Aura_Radiant_Glory = 63044 -L.Aura_Radiant_Oppresion = 63046 - --- RESTORING LIGHT ---------- -L.Aura_Rite_Of_Passage = 22223 -L.Aura_Remembrance = 22229 -L.Aura_Practiced_Incantation = 22226 -L.Aura_Honor_The_Dead = 22253 -L.Aura_Lingering_Ritual = 22314 -L.Aura_Restoring_Aura = 26209 -L.Aura_Radiant_Aura = 26807 -L.Aura_Cleansing_Ritual = 22265 -L.Aura_Extended_Ritual = 22262 -L.Aura_Purifying_Ritual = 22259 -L.Aura_Rune_Focus = 22234 -L.Aura_Channeled_Focus = 22240 -L.Aura_Restoring_Focus = 22237 - --- --------------------------------------------------- --- TOGGLED EFFECTS ----------------------------------- --- --------------------------------------------------- - -L.Toggled_Inferno = 25954 -L.Toggled_Flames_Of_Oblivion = 32853 -L.Toggled_Sea_Of_Flames = 32881 -L.Toggled_Unstable_Familiar = 23304 -L.Toggled_Unstable_Clannfear = 23319 -L.Toggled_Volatile_Familiar = 23316 -L.Toggled_Summon_Winged_Twilight = 24613 -L.Toggled_Summon_Restoring_Twilight = 24636 -L.Toggled_Summon_Twilight_Matriarch = 24639 -L.Toggled_Bound_Armor = 24158 -L.Toggled_Bound_Armaments = 24165 -L.Toggled_Bound_Aegis = 24163 -L.Toggled_Siphoning_Strikes = 33319 -L.Toggled_Leeching_Strikes = 36908 -L.Toggled_Siphoning_Attacks = 36935 -L.Toggled_Magelight = 30920 -L.Toggled_Inner_Light = 40478 -L.Toggled_Radiant_Magelight = 40483 - --- --------------------------------------------------- --- DAMAGE SHIELDS ------------------------------------ --- --------------------------------------------------- - -L.DamageShield_Shielded_Assault = 38401 -L.DamageShield_Brawler = 38754 -L.DamageShield_Steadfast_Ward = 31639 -L.DamageShield_Ward_Ally = 40130 -L.DamageShield_Healing_Ward = 40126 -L.DamageShield_Annulment = 29338 -L.DamageShield_Dampen_Magic = 39186 -L.DamageShield_Harness_Magicka = 39182 -L.DamageShield_Bone_Shield = 39369 -L.DamageShield_Bone_Surge = 42176 -L.DamageShield_Spiked_Bone_Shield = 42138 -L.DamageShield_Barrier = 38573 -L.DamageShield_Replenishing_Barrier = 40239 -L.DamageShield_Reviving_Barrier = 40237 -L.DamageShield_Siege_Shield = 38570 -L.DamageShield_Propelling_Shield = 40226 -L.DamageShield_Siege_Weapon_Shield = 40229 -L.DamageShield_Hardened_Armor = 20328 -L.DamageShield_Obsidian_Shield = 29071 -L.DamageShield_Fragmented_Shield = 32673 -L.DamageShield_Igneous_Shield = 29224 -L.DamageShield_Conjured_Ward = 28418 -L.DamageShield_Empowered_Ward = 29482 -L.DamageShield_Hardened_Ward = 29489 -L.DamageShield_Sun_Shield = 22178 -L.DamageShield_Radiant_Ward = 22182 -L.DamageShield_Blazing_Shield = 22180 - --- --------------------------------------------------- --- VAMP & LYCAN EFFECTS ------------------------------ --- --------------------------------------------------- - -L.VampLycan_Fed_on_ally = 40359 -L.VampLycan_Bit_an_ally = 40525 -L.VampLycan_Dark_Stalker = 33090 -L.VampLycan_Supernatural_Recovery = 33095 -L.VampLycan_Stage_1_Vampirism = 35771 -L.VampLycan_Stage_2_Vampirism = 35772 -L.VampLycan_Stage_3_Vampirism = 35779 -L.VampLycan_Stage_4_Vampirism = 35786 -L.VampLycan_Vampirism = 40360 -L.VampLycan_Lycanthropy = 35658 -L.VampLycan_Call_of_the_Pack = 14271 -L.VampLycan_Sanies_Lupinus = 31068 - - --- --------------------------------------------------- --- TRIGGERED EFFECTS --------------------------------- --- --------------------------------------------------- - -L.Trigger_Crystal_Fragments_Passive = 64159 -L.Trigger_Assassins_Will = 61907 -L.Trigger_Power_Lash = 23903 -L.Trigger_Deadly_Throw = 62549 - --- --------------------------------------------------- --- PASSIVE COMPARE ----------------------------------- --- --------------------------------------------------- - -L.Passive_Mundus = 'Boon:' -L.Passive_HomeKeepBonus = 'Home Keep Bonus' -L.Passive_EnemyKeepBonus = 'Enemy Keep Bonus' -L.Passive_ScrollBonus = 'Scroll Bonus' -L.Passive_Emperorship = 39671 -L.Passive_Battle_Spirit = 12033 -L.Passive_Blessing_of_War = 66282 -L.Passive_SoulSummons = 39269 ---alchemy -L.Passive_MedicinalUse = 45573 ---champion points -L.Passive_SpellShield = 62760 -L.Passive_Nourishing = 59953 ---night blade -L.Passive_SoulSiphoner = 36603 ---light armor -L.Passive_Concentration = 45562 -L.Passive_ESO_Plus_Member = 63601 - --- --------------------------------------------------- --- ADDITIONAL MAGES GUILD ABILITIES ------------------ --- --------------------------------------------------- - -L.MagesGuild_Fire_Rune = 31632 -L.MagesGuild_Volcanic_Rune = 40470 -L.MagesGuild_Scalding_Rune = 40465 - --- --------------------------------------------------- --- POTION TYPES -------------------------------------- --- --------------------------------------------------- - -L.Potion_Sip = "Sip of" -L.Potion_Tincture = "Tincture" -L.Potion_Serum = "Serum" -L.Potion_Dram = "Dram of" -L.Potion_Effusion = "Effusion" -L.Potion_Potion = "Potion" -L.Potion_Draught = "Draught" -L.Potion_Solution = "Solution" -L.Potion_Philter = "Philter" -L.Potion_Elixir = "Elixir" -L.Potion_Panacea = "Panacea" -- v5 -L.Potion_Distillate = "Distillate" -- v10 -L.Potion_Essence = "Essence" -- v15 - --- --------------------------------------------------- --- SETTINGS ------------------------------------------ --- --------------------------------------------------- - --- dropdown menus -L.DropGrowth1 = 'Up' -L.DropGrowth2 = 'Down' -L.DropGrowth3 = 'Left' -L.DropGrowth4 = 'Left (Centered)' -L.DropGrowth5 = 'Right' -L.DropGrowth6 = 'Right (Centered)' -L.DropSort1 = 'Remaining Time' -L.DropSort2 = 'Ability Name' -L.DropTimer1 = 'Over Icon' -L.DropTimer2 = 'Under Icon' -L.DropTimer3 = 'Above Icon' -L.DropTimer4 = 'Hidden' --- tabs -L.TabButton1 = 'General' -L.TabButton2 = 'Short Buffs' -L.TabButton3 = 'Long Buffs' -L.TabButton4 = 'Debuffs' -L.TabButton5 = 'Target Buffs' -L.TabButton6 = 'Target DeBuffs' -L.TabButton7 = 'Profiles' -L.TabHeader1 = 'General Settings' -L.TabHeader2 = 'Short & Combined Buff Window Settings' -L.TabHeader3 = 'Long Buff Window Settings' -L.TabHeader4 = 'Debuff Window Settings' -L.TabHeader5 = 'Target Buffs Window Settings' -L.TabHeader6 = 'Target Debuffs Window Settings' -L.TabHeader7 = 'Profile Settings' --- example aura names -L.ExampleAura1 = 'Buff' -L.ExampleAura2 = 'Another Buff' -L.ExampleAura3 = 'Yet Another Buff' -L.ExampleAura4 = 'Debuff' -L.ExampleAura5 = 'Another Debuff' -L.ExampleAura6 = 'Yet Another Debuff' -L.ExampleAura7 = 'Timed Aura (Long)' -L.ExampleAura8 = 'Toggled Aura' -L.ExampleAura9 = 'Passive Aura' --- settings: general tab (1) -L.GeneralAnchorDesc = 'Unlock to allow the aura anchors to be dragged using the mouse. The reset button will return all anchors to their default positions.' -L.GeneralAnchorLock = 'Lock' -L.GeneralAnchorUnlock = 'Unlock' -L.GeneralAnchorReset = 'Reset' -L.GeneralOnlyCombat = 'Only Show During Combat' -L.GeneralOnlyCombatTip = 'Set whether all aura windows are only visible when engaged in combat.' -L.GeneralCombine = 'Combine Buffs' -L.GeneralCombineTip = 'Set whether short term and long term buffs should be combined under a single window or split into two.\n\nWhen split, the buffs that will go into the second (Long) window will be passives, toggles and buffs with selected duration or longer.' -L.GeneralThreshold = 'Short Buffs Threshold' -L.GeneralThresholdTip = 'Game itself reports all buffs with duration of 30 seconds or longer as long term buffs. You can change this threshold here.' -L.GeneralTarget = 'Show Target Auras' -L.GeneralTargetTip = 'Set whether to show your current target\'s long-term buffs, toggles and passives in a seperate window.' -L.GeneralTargetDebuff = 'Show Target Debuffs' -L.GeneralTargetDebuffTip = 'Set whether to show your current target\'s debuffs or not' -L.GeneralDebuff = 'Show Debuffs' -L.GeneralDebuffTip = 'Set whether your debuffs (outgoing and incoming) are displayed in a seperate window. Please note that due to the information presented to mods, the timers for the incoming debuffs can be inaccurate.' -L.GeneralDebuffWarn = 'May not be entirely accurate due to API limitations.' -L.GeneralHeaderFiltersPlayer = 'Aura Filters: Player' -L.GeneralHeaderFiltersTarget = 'Aura Filters: Target' -L.GeneralSoulSummons = 'Show Soul Summons Cooldown' -L.GeneralSoulSummonsTip = 'Set whether the cooldown \'aura\' for Soul Summons is displayed or not.' -L.GeneralToggle = 'Show Toggled Buffs' -L.GeneralToggleTip = 'Set whether toggled buffs with no set duration are displayed or not.\n\nEg: Unstable Familiar' -L.GeneralPassive = 'Show Passive Buffs' -L.GeneralPassiveTip = 'Set whether passive buffs are displayed or not.\n\nEg: Mundus Boons' -L.GeneralCyrodiil = 'Show Cyrodiil Bonuses' -L.GeneralCyrodiilTip = 'Set whether buffs provided during Cyrodiil AvA are shown.\n\nRequires: Show Passive Buffs' -L.GeneralDisguise = 'Show Disguises' -L.GeneralDisguiseTip = 'Set whether active disguises are shown.\n\nRequires: Show Passive Buffs' -L.GeneralAllEffects = 'Show All Effects' -L.GeneralAllEffectsTip = 'Set whether less important effects are shown.\Eg: ESO Plus Member\n\nRequires: Show Passive Buffs' -L.GeneralMundus = 'Show Mundus Boons' -L.GeneralMundusTip = 'Set whether Mundus Stone boons are shown.\n\nRequires: Show Passive Buffs' -L.GeneralVampLycan = 'Show Vampire / Werewolf' -L.GeneralVampLycanTip = 'Set whether to show Vampirism and Lycanthropy buffs.\n\nRequires: Show Passive Buffs' -L.GeneralMinorBuffs = 'Hide Minor Buffs' -L.GeneralMinorBuffsTip = 'Set wether to hide Minor Buffs.\n\ne.g. "Minor Sorcery"' -L.GeneralMajorBuffs = 'Hide Major Buffs' -L.GeneralMajorBuffsTip = 'Set wether to hide Major Buffs.\n\ne.g. "Major Sorcery"' --- settings: style tabs (2-4) - base -L.WindowAlpha = 'Window Transparency' -L.WindowAlphaTip = 'Set how opaque this aura window is when visible. A setting of 100 makes the window fully opaque.' -L.WindowScale = 'Window Scale' -L.WindowScaleTip = 'Set the size of this aura window as a percentage. A setting of 100 is the default size.' -L.WindowGrowth = 'Aura Growth Direction' -L.WindowGrowthTip = 'Set which direction new auras will grow from the anchor point. For the Centered settings, auras will grow either side of the anchor with ordering determined by the Left/Right prefix.\n\nNote that when displayed horizontally, the name and bar are hidden automatically.' -L.WindowPadding = 'Aura Growth Padding' -L.WindowPaddingTip = 'Set the spacing between each displayed aura.' -L.WindowSort = 'Aura Sorting Order' -L.WindowSortTip = 'Set how auras are sorted. Either by alphabetical name or by remaining duration. When sorting by duration, passive and toggled abilities will always show first followed by timed abilities with those that will fade first furthest away from the anchor.' -L.WindowIconOn = 'Show Ability Icon On The Right' -L.WindowIconOnTip = 'Set whether the aura\'s icon is shown on the right or the left of the name label and statusbar timer when displaying vertically.' -L.WindowShowNameBar = 'Show Ability Name & Timer Bar' -L.WindowShowNameBarTip = 'Set whether the ability name and the statusbar timer should be shown when auras are set to grow vertically.' -L.WindowTooltips = 'Show Ability Name In Tooltips' -L.WindowTooltipsTip = 'Set whether to show the ability name in a mouseover tooltip (over the icon) for each aura.' --- settings: style tabs (2-4) - name -L.WindowNameHeader = 'Ability Name Text' -L.WindowNameFont = 'Name Style' --- settings: style tabs (2-4) - timer -L.WindowTimerHeader = 'Timer Text' -L.WindowTimerShowTP = 'Show Timer For Toggles & Passives' -L.WindowTimerShowTPTip = 'Set whether the timer label is shown for (T)oggled and (P)passive abilities. When disabled, the timer label will be hidden for auras without a duration.' -L.WindowTimerHorz = 'Timer Position: Horizontal' -L.WindowTimerHorzTip = 'Set the timer\'s position for each aura when displaying horizontally. A setting of Hidden will stop the timer label showing for any auras.' -L.WindowTimerVert = 'Timer Position: Vertical' -L.WindowTimerVertTip = 'Set the timer\'s position for each aura when displaying vertically. A setting of Hidden will stop the timer label showing for any auras.' -L.WindowTimerFont = 'Timer Style' --- settings: style tabs (2-4) - bar -L.WindowBarHeader = 'Timer Bar' -L.WindowBarGloss = 'Glossy Bars' -L.WindowBarGlossTip = 'Set whether the timer bar\'s should be glossy when displayed.' -L.WindowBarWidth = 'Bar Width' -L.WindowBarWidthTip = 'Set how wide the timer bar\'s should be when displayed.' -L.WindowBarTimed = 'Colour: Timed Auras' -L.WindowBarTimedTip = 'Set the timer bar colours for auras with a set duration. The left colour choice determines the start of the bar (when it begins counting down) and the second the finish of the bar (when it has almost expired).\n\nThis is the colour that will also be used for auras with a cast time before they apply.' -L.WindowBarToggle = 'Colour: Toggled Auras' -L.WindowBarToggleTip = 'Set the timer bar colours for toggled auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' -L.WindowBarPassive = 'Colour: Passive Auras' -L.WindowBarPassiveTip = 'Set the timer bar colours for passive auras with no set duration. The left colour choice determines the start of the bar (the furthest side from the icon) and the second the finish of the bar (nearest the icon).' --- settings: profiles tab (6) -L.ProfileCharacterList = 'Existing Settings' -L.ProfileCharacterListTip = 'List of characters that currently have S\'rendarr settings.' -L.ProfileCopyFrom = 'Copy Settings' -L.ProfileCopyFromTip = 'Copy the settings of the selected character to the currently logged in character.' -L.ProfileCopyFromWarn = 'Clicking this button will reload the UI and permanently overwrite this character\'s settings with those of the selected character.\n\nThis cannot be undone.' - ---replace ability IDs with names -for k, v in pairs(L) do - if type(v) == "number" then - L[k] = GetAbilityName(v) - end -end function Srendarr:GetLocale() -- default locale, will be the return unless overwritten - return L -end \ No newline at end of file + return L +end diff --git a/Locales/Local_fr.lua b/Locales/Local_fr.lua index 5b9452c..a97968c 100644 --- a/Locales/Local_fr.lua +++ b/Locales/Local_fr.lua @@ -1,172 +1,286 @@ --- French (fr) - Translations provided by Lumber (http://www.esoui.com/forums/member.php?u=4670) and Yombee (http://www.esoui.com/forums/member.php?u=10180) -local Srendarr = _G['Srendarr'] -- grab addon table from global - -local L = {} - -L.Srendarr = "|c67b1e9S|c4779ce'rendarr|r" -L.Usage = "|c67b1e9S|c4779ce'rendarr|r - Usage: /srendarr lock or unlock to toggle UI movement." --- timer strings -L.Time_Seconds = '%ds' -L.Time_Minutes = '%dm' -L.Time_Hours = '%dh' -L.Time_Toggle = 'T' -L.Time_Passive = 'P' -L.Time_Cast = 'Cast' --- drag overlay labels -L.DragLabel_BuffShort = 'COURT' -L.DragLabel_BuffLong = 'LONG' -L.DragLabel_BuffAll = 'BUFF' -L.DragLabel_Debuff = 'DEBUFF' -L.DragLabel_Target = 'CIBLE' - --- --------------------------------------------------- --- PASSIVE COMPARE ----------------------------------- --- --------------------------------------------------- - -L.Passive_Mundus = 'Bรฉnรฉdiction :' -L.Passive_HomeKeepBonus = 'Bonus des fort' -L.Passive_EnemyKeepBonus = 'Bonus de forts' -L.Passive_ScrollBonus = 'Bonus de Parchemin' - --- --------------------------------------------------- --- POTION TYPES -------------------------------------- --- --------------------------------------------------- - -L.Potion_Sip = 'Gorgรฉe' -L.Potion_Tincture = 'Teinture' -L.Potion_Serum = 'Sรฉrum' -L.Potion_Dram = 'Goutte' -L.Potion_Effusion = 'Effusion' -L.Potion_Potion = 'Potion' -L.Potion_Draught = 'Lampรฉe' -L.Potion_Solution = 'Solution' -L.Potion_Philter = 'Philtre' -L.Potion_Elixir = 'รlixir' -L.Potion_Panacea = 'Panacรฉe' - --- --------------------------------------------------- --- SETTINGS ------------------------------------------ --- --------------------------------------------------- - --- dropdown menus -L.DropGrowth1 = 'Haut' -L.DropGrowth2 = 'Bas' -L.DropGrowth3 = 'Gauche' -L.DropGrowth4 = 'Gauche (Centrรฉ)' -L.DropGrowth5 = 'Droite' -L.DropGrowth6 = 'Droite (Centrรฉ)' -L.DropSort1 = 'Temps Restant' -L.DropSort2 = 'Alphabรฉtique' -L.DropTimer1 = "Sur l'icรดne" -L.DropTimer2 = "Sous l'icรดne" -L.DropTimer3 = "Au dessus de l'icรดne" -L.DropTimer4 = 'Cachรฉ' --- tabs -L.TabButton1 = 'Gรฉnรฉral' -L.TabButton2 = 'Buffs Courts' -L.TabButton3 = 'Buffs Longs' -L.TabButton4 = 'Debuffs' -L.TabButton5 = 'Buffs de la cible' -L.TabButton6 = 'Profils' -L.TabHeader1 = 'Rรฉglages Gรฉnรฉraux' -L.TabHeader2 = 'Fenรชtre de rรฉglage des buffs courts et combinรฉs' -L.TabHeader3 = 'Fenรชtre de rรฉglage des buffs longs' -L.TabHeader4 = 'Fenรชtre de rรฉglage des Debuffs' -L.TabHeader5 = 'Fenรชtre de rรฉglage des buffs de la cible' -L.TabHeader6 = 'Rรฉglage du profil' --- example aura names -L.ExampleAura1 = 'Buff' -L.ExampleAura2 = 'Autre Buff' -L.ExampleAura3 = 'Encore un Autre Buff' -L.ExampleAura4 = 'Debuff' -L.ExampleAura5 = 'Autre Debuff' -L.ExampleAura6 = 'Encore un Autre Debuff' -L.ExampleAura7 = 'Aura Chronomรฉtrรฉe(Longue)' -L.ExampleAura8 = 'Aura Activรฉe' -L.ExampleAura9 = 'Aura Passive' --- settings: general tab (1) -L.GeneralAnchorDesc = 'Dรฉverrouiller pour pouvoir bouger les ancres avec la souris. Le bouton rรฉinitialiser replacera toutes les ancres ร leur position initiales' -L.GeneralAnchorLock = 'Verrouiller' -L.GeneralAnchorUnlock = 'Dรฉverrouiller' -L.GeneralAnchorReset = 'Reinitialiser' -L.GeneralOnlyCombat = 'Afficher uniquement en combat' -L.GeneralOnlyCombatTip = "Dรฉfinit si les fenรชtres d'auras ne s'affichent que lorsque le combat est engagรฉ." -L.GeneralCombine = 'Combiner les buffs' -L.GeneralCombineTip = 'Dรฉfinit si les buffs courts et longs doivent รชtre combinรฉs dans une seule fenรชtre ou sรฉparรฉs dans deux fenรชtres distinctes.\n\nSi vous choisissez la sรฉparation, les buffs (Longs) qui iront dans la deuxiรจme fenรชtre seront les buffs passifs, activรฉs et les buffs avec une durรฉe infรฉrieure ร une minute.' -L.GeneralThreshold = 'Seuil de durรฉe des Buffs courts' -L.GeneralThresholdTip = 'Le jeu considรจre de lui mรชme tous les buffs avec une durรฉe supรฉrieur ร 30 secondes comme des buffs longs. Vous pouvez changer cette durรฉe ici.' -L.GeneralTarget = 'Afficher les auras de la cible' -L.GeneralTargetTip = 'Permet d\'afficher les buffs longs, activรฉs et passifs de votre cible actuelle dans une fenรชtre sรฉparรฉe.' -L.GeneralDebuff = 'Afficher les Debuffs' -L.GeneralDebuffTip = 'Permet d\'afficher vos debuffs dans une fenรชtre sรฉparรฉe. Notez que d\'aprรจs les infos disponibles pour les mods, ces timers peuvent รชtre inexact et ne prendront pas en compte les cibles mortes ou ayant purgรฉ le debuff. Il doit รชtre utilisรฉ comme guide uniquement.' -L.GeneralDebuffWarn = "Peut ne pas รชtre exact ร cause des limitations de l'API." -L.GeneralHeaderFiltersPlayer = 'Filtre d\'Aura : Joueur' -L.GeneralHeaderFiltersTarget = 'Filtre d\'Aura : Cible' -L.GeneralSoulSummons = 'Afficher le temps de recharge d\'Invocation d\'รขme' -L.GeneralSoulSummonsTip = "Dรฉfinit si le temps de recharge pour Invocation d'รขme est affichรฉ ou pas" -L.GeneralToggle = 'Afficher les buffs activables' -L.GeneralToggleTip = 'Dรฉfinit si les buffs activables sans limitation de durรฉe sont affichรฉs ou pas.\n\nEx: Familier instable' -L.GeneralPassive = 'Afficher les buffs passifs' -L.GeneralPassiveTip = 'Dรฉfinit si les buffs passifs sont affichรฉs ou pas.\n\nEx: Bรฉnรฉdictions de Mundus' -L.GeneralCyrodiil = 'Afficher les bonus de Cyrodiil' -L.GeneralCyrodiilTip = 'Dรฉfinit si les buffs obtenus durant la guerre en Cyrodiil sont affichรฉs.\n\nNรฉcessite: Afficher les buffs passifs' -L.GeneralDisguise = 'Afficher les dรฉguisements' -L.GeneralDisguiseTip = 'Dรฉfinit si les dรฉguisements actifs sont affichรฉs ou non.\n\nNรฉcessite : Afficher les buffs passifs' -L.GeneralMundus = 'Afficher les bรฉnรฉdictions de Mundus' -L.GeneralMundusTip = 'Dรฉfinit si les bรฉnรฉdictions de Mundus sont affichรฉes.\n\nNรฉcessite : Afficher les buffs passifs' -L.GeneralVampLycan = 'Afficher Vampire / Loup-Garou' -L.GeneralVampLycanTip = 'Dรฉfinit si les buffs de vampirisme et de lycanthropie sont affichรฉs.\n\nNรฉcessite : Afficher les buffs passifs' -L.GeneralMinorBuffs = 'Hide Minor Buffs' -L.GeneralMinorBuffsTip = 'Set wether to hide Minor Buffs.\n\ne.g. "Minor Sorcery"' -L.GeneralMajorBuffs = 'Hide Major Buffs' -L.GeneralMajorBuffsTip = 'Set wether to hide Major Buffs.\n\ne.g. "Major Sorcery"' --- settings: style tabs (2-4) - base -L.WindowAlpha = 'Transparence de la fenรชtre' -L.WindowAlphaTip = 'Dรฉfinit l\'opacitรฉ de cette fenรชtre lorsqu\'elle est visible. Un rรฉglage ร 100 rend la fenรชtre totalement opaque.' -L.WindowScale = 'Echelle de la fenรชtre' -L.WindowScaleTip = 'Dรฉfinit la taille de cette fenbรชtre d\'aura en pourcentage. Un rรฉglage ร 100 correspond au rรฉglage par dรฉfaut.' -L.WindowGrowth = 'Direction du dรฉployement des auras' -L.WindowGrowthTip = 'Dรฉfinit la direction dans laquelle les nouvelles auras se dรฉvelopperont depuis le point d\'ancrage. Pour le rรฉglage centrรฉ, les auras iront de part et d\'autre de l\'ancre de faรงon dรฉfinie par le prรฉfixe gauche/droite.\n\nNotez que lorsque affichรฉs horizontalement le nom et la barre sont cachรฉs automatiquement.' -L.WindowPadding = 'Espacement des auras' -L.WindowPaddingTip = 'Dรฉfinit l\'espacement entre chaque aura affichรฉe.' -L.WindowSort = 'Ordre d\'affichage des auras' -L.WindowSortTip = 'Dรฉfinit la faรงon dont les auras sont affichรฉes. Soit par ordre alphabรฉtique, soit par durรฉes restantes. Lorsque affichรฉes par durรฉe, les compรฉtences passives et activables sont toujours affichรฉes en premier, suivies par les compรฉtences chronomรฉtrรฉes avec celles durant le moins longtemps รฉtant les plus รฉloignรฉes de l\'ancre.' -L.WindowIconOn = 'Afficher les icรดnes de compรฉtences sur la droite' -L.WindowIconOnTip = 'Dรฉfinit si l\'icรดne d\'aura est affichรฉ sur la droite ou sur la gauche du nom de la compรฉtence et de la barre de durรฉe lorsque affichรฉ verticalement.' -L.WindowShowNameBar = 'Afficher le nom de la compรฉtence et la barre de durรฉe' -L.WindowShowNameBarTip = 'Dรฉfinit si le nom de la compรฉtence et la barre de durรฉe doivent รชtre affichรฉes lorsque les auras se dรฉveloppent verticalement.' -L.WindowTooltips = 'Afficher le nom de la compรฉtence dans les infobulles' -L.WindowTooltipsTip = "Dรฉfinit si le nom des auras est affichรฉ dans une info-bulle au survol de la souris (au dessus de l'icone).\n\nNote : Cette option doit รชtre dรฉsactivรฉe pour pouvoir dรฉplacer les ancres" --- settings: style tabs (2-4) - name -L.WindowNameHeader = 'Texte du nom de la compรฉtence' -L.WindowNameFont = 'Style du nom' --- settings: style tabs (2-4) - timer -L.WindowTimerHeader = 'Texte du Timer' -L.WindowTimerShowTP = 'Afficher pour Passif et Activรฉ' -L.WindowTimerShowTPTip = 'Dรฉfinit si le texte est affichรฉ pour les auras passives (P) et activรฉs (T). Lorsque cette option est dรฉsactivรฉe, le texte sera cachรฉ pour les auras sans durรฉe fixe.' -L.WindowTimerHorz = 'Position du Timer : Horizontale' -L.WindowTimerHorzTip = 'Dรฉfinit la position du timer pour chaque aura affichรฉe horizontalement. Un rรฉglage sur -Cachรฉ- empechera l\'affichage de l\'รฉtiquette pour toutes les auras.' -L.WindowTimerVert = 'Position du Timer : Vertical' -L.WindowTimerVertTip = 'Dรฉfinit la position du timer pour chaque aura affichรฉe verticalement. Un rรฉglage sur -Cachรฉ- empechera l\'affichage de l\'รฉtiquette pour toutes les auras.' -L.WindowTimerFont = 'Style de Timer' --- settings: style tabs (2-4) - bar -L.WindowBarHeader = 'Barre de Timer' -L.WindowBarGloss = 'Barres brillantes' -L.WindowBarGlossTip = 'Dรฉfinit si les barres de durรฉe doivent รชtre affichรฉes avec un effet brillant.' -L.WindowBarWidth = 'Longueur de Barre' -L.WindowBarWidthTip = 'Dรฉfinit la longueur que doit avoir la barre de timer lorsqu\'elle est affichรฉe.' -L.WindowBarTimed = 'Couleur: Auras Chronomรฉtrรฉes' -L.WindowBarTimedTip = 'Dรฉfinit les couleurs des barres de timer pour les auras d\'une durรฉe spรฉcifique. Le choix de la couleur de gauche dรฉtermine le dรฉbut de la barre (lorsque le dรฉcompte commence) et la seconde la fin de la barre (lorsqu\'il est presque terminรฉe).\n\nCette couleur sera รฉgalement utilisรฉe pour les auras avec un temps de cast avant qu\'elles ne soient appliquรฉes.' -L.WindowBarToggle = 'Couleur: Auras Activรฉes' -L.WindowBarToggleTip = 'Dรฉfinit les couleurs des barres de timer pour les auras activรฉes sans durรฉe spรฉcifique. La couleur gauche correspond au dรฉbut de la barre et la seconde la fin de la barre (la plus proche de l\'icรดne).' -L.WindowBarPassive = 'Couleur: Auras Passives' -L.WindowBarPassiveTip = 'Dรฉfinit les couleurs des barres de timer pour les auras passives sans durรฉe spรฉcifiques. La couleur gauche correspond au dรฉbut de la barre et la seconde la fin de la barre (la plus proche de l\'icรดne).' --- settings: profiles tab (6) -L.ProfileCharacterList = 'Rรฉglages existants' -L.ProfileCharacterListTip = 'Liste des personnages utilisant S\'rendarr.' -L.ProfileCopyFrom = 'Copier les rรฉglages' -L.ProfileCopyFromTip = 'Permet de copier les rรฉglages du personnage sรฉlรฉctionnรฉ vers le personnage actuellement connectรฉ en jeu.' -L.ProfileCopyFromWarn = 'Cliquer sur ce bouton rechargera l\'interface, en remplaรงant les rรฉglages par ceux du personnage sรฉlรฉctionnรฉ.\n\nVous ne pourrez pas revenir sur cette action, les nouveaux rรฉglages รฉcraseront les rรฉglages actuels.' +-- French (fr) - By Ayantir +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = {} + +L.Srendarr = '|c67b1e9S|c4779ce\'rendarr|r' +L.Srendarr_Basic = 'S\'rendarr' +L.Usage = '|c67b1e9S|c4779ce\'rendarr|r - Usage : /srendarr lock/unlock : Verrouille/Dรฉverrouille les fenรชtres pour dรฉfinir leur positionnement.' +L.CastBar = 'Barre de cast' +L.Sound_DefaultProc = 'Srendarr (Procs par dรฉfaut)' + +-- time format +L.Time_Tenths = '%.1fs' +L.Time_Seconds = '%ds' +L.Time_Minutes = '%dm' +L.Time_Hours = '%dh' +L.Time_Days = '%dj' + +-- aura grouping +L.Group_Displayed_Here = 'Groupes affichรฉs' +L.Group_Displayed_None = 'Aucun' +L.Group_Player_Short = 'Vos buffs courts' +L.Group_Player_Long = 'Vos buffs longs' +L.Group_Player_Toggled = 'Vos buffs continus' +L.Group_Player_Passive = 'Vos passifs' +L.Group_Player_Debuff = 'Vos debuffs' +L.Group_Player_Ground = 'Vos cibles au sol' +L.Group_Player_Major = 'Vos buffs "Majeurs"' +L.Group_Player_Minor = 'Vos buffs "Mineurs"' +L.Group_Target_Buff = 'Les buffs de la cible' +L.Group_Target_Debuff = 'Les dรฉbuffs de la cible' +L.Group_Prominent = 'Effets principaux' + +-- whitelist & blacklist control +L.Prominent_AuraAddSuccess = 'a รฉtรฉ ajoutรฉ ร la liste des effets principaux.' +L.Prominent_AuraAddFail = 'n\'a pas รฉtรฉ trouvรฉ et ne peut รชtre ajoutรฉ.' +L.Prominent_AuraRemoved = 'a รฉtรฉ supprimรฉ des effets principaux.' +L.Blacklist_AuraAddSuccess = 'a รฉtรฉ ajoutรฉ ร la liste noire et ne sera plus affichรฉ.' +L.Blacklist_AuraAddFail = 'n\'a pas รฉtรฉ trouvรฉ et ne peux รชtre ajoutรฉ.' +L.Blacklist_AuraRemoved = 'a รฉtรฉ supprimรฉ de la liste noire.' + +-- settings: base +L.Show_Example_Auras = 'Ex. d\'effets' +L.Show_Example_Castbar = 'Ex. de barre de cast' + +L.SampleAura_PlayerTimed = 'Effets temporaires' +L.SampleAura_PlayerToggled = 'Effets continus' +L.SampleAura_PlayerPassive = 'Passifs du joueur' +L.SampleAura_PlayerDebuff = 'Dรฉbuffs du joueur' +L.SampleAura_PlayerGround = 'Effet au sol' +L.SampleAura_PlayerMajor = 'Effet "Majeur"' +L.SampleAura_PlayerMinor = 'Effet "Mineur"' +L.SampleAura_TargetBuff = 'Buff de la cible' +L.SampleAura_TargetDebuff = 'Dรฉbuff de la cible' + +L.TabButton1 = 'Gรฉnรฉral' +L.TabButton2 = 'Filtres' +L.TabButton3 = 'Barre de cast' +L.TabButton4 = 'Effets' +L.TabButton5 = 'Profils' + +L.TabHeader1 = 'Paramรจtres gรฉnรฉraux' +L.TabHeader2 = 'Paramรจtres de filtres' +L.TabHeader3 = 'Paramรจtres de la barre de cast' +L.TabHeader5 = 'Paramรจtres des profils' +L.TabHeaderDisplay = 'Paramรจtres de la fenรชtre : ' + +-- settings: generic +L.GenericSetting_ClickToViewAuras = 'Cliquer pour voir les effets' +L.GenericSetting_NameFont = 'Police du nom de la compรฉtence' +L.GenericSetting_NameStyle = 'Couleur & Style du nom de la compรฉtence' +L.GenericSetting_NameSize = 'Taille de la police du nom de la compรฉtence' +L.GenericSetting_TimerFont = 'Police du timer' +L.GenericSetting_TimerStyle = 'Couleur & Style de la police du timer' +L.GenericSetting_TimerSize = 'Taille de la police du timer' + +-- settings: dropdown entries +L.DropGroup_1 = 'Dans la fenรชtre [|cffd1001|r]' +L.DropGroup_2 = 'Dans la fenรชtre [|cffd1002|r]' +L.DropGroup_3 = 'Dans la fenรชtre [|cffd1003|r]' +L.DropGroup_4 = 'Dans la fenรชtre [|cffd1004|r]' +L.DropGroup_5 = 'Dans la fenรชtre [|cffd1005|r]' +L.DropGroup_6 = 'Dans la fenรชtre [|cffd1006|r]' +L.DropGroup_7 = 'Dans la fenรชtre [|cffd1007|r]' +L.DropGroup_8 = 'Dans la fenรชtre [|cffd1008|r]' +L.DropGroup_None = 'Ne pas afficher' + +L.DropStyle_Full = 'Affichage dรฉtaillรฉ' +L.DropStyle_Icon = 'Icรดne seulement' +L.DropStyle_Mini = 'Minimal' + +L.DropGrowth_Up = 'Haut' +L.DropGrowth_Down = 'Bas' +L.DropGrowth_Left = 'Gauche' +L.DropGrowth_Right = 'Droite' +L.DropGrowth_CenterLeft = 'Centrรฉ (Gauche)' +L.DropGrowth_CenterRight = 'Centrรฉ (Droite)' + +L.DropSort_NameAsc = 'Nom de la compรฉtence (Asc)' +L.DropSort_TimeAsc = 'Temps restant (Asc)' +L.DropSort_CastAsc = 'Ordre de cast (Asc)' +L.DropSort_NameDesc = 'Nom de la compรฉtence (Desc)' +L.DropSort_TimeDesc = 'Temps restant (Desc)' +L.DropSort_CastDesc = 'Ordre de cast (Desc)' + +L.DropTimer_Above = 'Au dessus de l\'icรดne' +L.DropTimer_Below = 'Sous l\'icรดne' +L.DropTimer_Over = 'Par dessus l\'icone' +L.DropTimer_Hidden = 'Masquรฉ' + + +-- ------------------------ +-- SETTINGS: GENERAL +-- ------------------------ +L.General_UnlockDesc = 'Dรฉverrouiller pour autoriser le positionnement ร la souris des fenรชtres d\'effets. La bouton Rรฉinitialiser restaurera les fenรชtres ร leur emplacement par dรฉfaut.' +L.General_UnlockLock = 'Verrouiller' +L.General_UnlockUnlock = 'Dรฉverrouiller' +L.General_UnlockReset = 'Rรฉinitialiser' +L.General_UnlockResetAgain = 'Cliquez une nouvelle fois pour rรฉinitialiser' +L.General_CombatOnly = 'N\'afficher qu\'en combat' +L.General_CombatOnlyTip = 'Sรฉlectionnez si les fenรชtres d\'aura ne doivent รชtre affichรฉes qu\'en combat.' +L.General_AuraFakeEnabled = 'Activer l\'affichage des effets simulรฉes' +L.General_AuraFakeEnabledTip = 'Certaines compรฉtences sur la durรฉe ne communiquent pas correctement leurs dรฉtails aux addons lors de leur utilisation. Activer le simulateur d\'aura permet de palier au mieux ร ce problรจme.' +L.General_AuraFadeout = 'Dรฉlai de disparition des effets' +L.General_AuraFadeoutTip = 'Dรฉfinissez le temps donnรฉ pour la disparition d\'affichage d\'un effet ร l\'รฉcran. Un paramรจtre ร 0 fera disparaitre l\'aura sans transition.\n\nLe timer est en millisecondes.' +L.General_ShortThreshold = 'Seuil des buffs courts' +L.General_ShortThresholdTip = 'Dรฉfinissez le seuil en secondes de diffรฉrence entre les buffs dits "Courts" et les buffs dits "Longs".' +L.General_ShortThresholdWarn = 'La modification de ce rรฉglage ne sera prise en compte qu\'ร la fermeture du panneau d\'options.' +L.General_ProcEnableAnims = 'Crรฉer une animation lors des procs' +L.General_ProcEnableAnimsTip = 'Choisissez de crรฉer une animation sur la barre d\'action pour les compรฉtences qui ont proquรฉ et possรฉdant une action spรฉciale ร rรฉaliser. Les compรฉtences possรฉdant un proc sont :\n Fragments de cristal (Sorc)\n Dรฉchaรฎnement meurtrier & morphs (NB)\n Langue de feu (DK)\n Cape Mortelle (Deux armes)' +L.General_ProcenableAnimsWarn = 'Si vous utilisez un addon modifiant ou masquant la barre d\'action, les animations pourront ne pas รชtre affichรฉes.' +L.General_ProcPlaySound = 'Jouer un son lors d\'un proc' +L.General_ProcPlaySoundTip = 'Sรฉlectionnez le son ร jouer lors d\'un proc d\'une compรฉtence. Sรฉlectionner "None" ne jouera aucun son.' +-- settings: general (aura control: display groups) +L.General_ControlHeader = 'Gestion des effets - Groupes d\'affichage' +L.General_ControlBaseTip = 'Dรฉfinissez dans quel groupe de fenรชtre afficher vos effets ou les masquer totalement.' +L.General_ControlShortTip = 'Ce groupe contient tous les buffs lancรฉs sur vous-mรชme avec une durรฉe infรฉrieure au seuil des buffs courts.' +L.General_ControlLongTip = 'Ce groupe contient tous les buffs lancรฉs sur vous-mรชme avec une durรฉe supรฉrieure au seuil des buffs courts.' +L.General_ControlToggledTip = 'Ce groupe contient tous les buffs continus (sans durรฉe dรฉfinie) qui sont actifs sur vous mรชme.' +L.General_ControlPassiveTip = 'Ce groupe contient tous les effets passifs qui sont actifs sur vous mรชme.' +L.General_ControlDebuffTip = 'Ce groupe contient tous les effets nรฉgatifs qui sont actifs sur vous mรชme.' +L.General_ControlGroundTip = 'Ce groupe contient tous les effets au sol que vous avez lancรฉ.' +L.General_ControlMajorTip = 'Ce groupe contient tous les effets "majeurs" (ex: Intellect majeur) qui sont actifs sur vous mรชme. Les effets majeurs nรฉgatifs (ex: Brรจche majeure) sont slistรฉs dans les dรฉbuffs' +L.General_ControlMinorTip = 'Ce groupe contient tous les effets "mineurs" (ex: Dynamisation majeure) qui sont actifs sur vous mรชme. Les effets mineurs nรฉgatifs (ex: Profanation mineure) sont slistรฉs dans les dรฉbuffs' +L.General_ControlTargetBuffTip = 'Ce groupe contient tous les effets positifs appliquรฉs ร votre cible.' +L.General_ControlTargetDebuffTip = 'Ce groupe contient tous les effets nรฉgatifs appliquรฉs ร votre cible. En raisons de limitation intrinsรจques au jeu, seuls vos dรฉbuffs apparaitront ici ร de trรจs rares exceptions prรจs' +L.General_ControlProminentTip = 'Ce groupe contient tous les effets que vous avez dรฉfini comme principaux.' +-- settings: general (prominent auras) +L.General_ProminentHeader = 'Effets principaux' +L.General_ProminentDesc = 'Les buffs sur vous-mรชme ou les effets au sol peuvent รชtre dรฉfinis comme principaux. Ils seront affichรฉs dans une fenรชtre distincte pour une gestion plus efficace.' +L.General_ProminentAdd = 'Ajouter un buff principal' +L.General_ProminentAddTip = 'Le buff ou l\'effet au sol que vous souhaitez dรฉfinir comme principal doit รชtre รฉcrit exactement tel qu\'il apparait en jeu, Validez par Entrรฉe pour ajouter l\'effet ร la liste des effets principaux et veuillez noter que seuls les effets avec une durรฉe peuvent รชtre dรฉfinis, les passifs et les compรฉtences continues seront ignorรฉes.' +L.General_ProminentAddWarn = 'Ajouter un effet par son nom requiert de scanner toutes les compรฉtences existantes. Cette opรฉration peut ralentir votre jeu quelques instants le temps de l\'opรฉration.' +L.General_ProminentList = 'Effets principaux actuels' +L.General_ProminentListTip = 'Liste de tous les effets dรฉfinis comme principaux. Pour supprimer un effet, sรฉlectionnez le dans la liste et cliquez sur le bouton au dessous.' +L.General_ProminentRemove = 'Supprimer un effet' + + +-- ------------------------ +-- SETTINGS: FILTERS +-- ------------------------ +L.Filter_Desc = 'Contrรดle l\'affichage des effets basรฉs sur des filtres prรฉdรฉfinis selon leur nom ou selon des critรจres dรฉfinis ci-dessous. Activer un filtre masquera l\'affichage de l\'effet ร l\'รฉcran.' +L.Filter_BlacklistHeader = 'Blacklist des effets' +L.Filter_BlacklistAdd = 'Ajouter un effet ร blacklister' +L.Filter_BlacklistAddTip = 'L\'effet que vous souhaitez blacklister doit รชtre รฉcrit exactement tel qu\'il apparait en jeu. Validez par Entrรฉe pour ajouter l\'effet ร la liste des effets blacklistรฉs.' +L.Filter_BlacklistAddWarn = 'Ajouter un effet par son nom requiert de scanner toutes les compรฉtences existantes. Cette opรฉration peut ralentir votre jeu quelques instants le temps de l\'opรฉration.' + +L.Filter_BlacklistList = 'Effets actuellement blacklistรฉes' +L.Filter_BlacklistListTip = 'Liste de tous les effets actuellement blacklistรฉs. Pour supprimer un effet de la blacklis, sรฉlectionnez le et cliquez sur le bouton Supprimer de la liste.' +L.Filter_BlacklistRemove = 'Supprimer de la liste' + +L.Filter_PlayerHeader = 'Filtre d\'effets pour vous' +L.Filter_TargetHeader = 'Filtres d\'effets pour la cible' +L.Filter_Block = 'Filtrer le blocage' +L.Filter_BlockPlayerTip = 'Choisissez de masquer l\'affichage du buff de blocage lorsque vous bloquez.' +L.Filter_BlockTargetTip = 'Choisissez de masquer l\'affichage du buff de blocage lorsque votre cible bloque.' +L.Filter_Cyrodiil = 'Filtrer les bonus de Cyrodiil' +L.Filter_CyrodiilPlayerTip = 'Choisissez de masquer l\'affichage des buffs AvA de Cyrodiil appliquรฉs ร vous-mรชme.' +L.Filter_CyrodiilTargetTip = 'Choisissez de masquer l\'affichage des buffs AvA de Cyrodiil appliquรฉs ร votre cible.' +L.Filter_Disguise = 'Filtrer les dรฉguisements' +L.Filter_DisguisePlayerTip = 'Choisissez de masquer l\'affichage du buff de dรฉguisement appliquรฉ ร vous-mรชme.' +L.Filter_DisguiseTargeTtip = 'Choisissez de masquer l\'affichage du buff de dรฉguisement appliquรฉ ร votre cible.' +L.Filter_MajorEffects = 'Filtrer les effets majeurs' +L.Filter_MajorEffectsTargetTip = 'Choisissez de masquer les effets "Majeurs" (ex. Prophรฉtie Majeure, Brutalitรฉ Majeure) appliquรฉ ร votre cible.' +L.Filter_MinorEffects = 'Filtrer les effets mineurs' +L.Filter_MinorEffectsTargetTip = 'Choisissez de masquer les effets "Majeurs" (ex. Sorcellerie mineure, Evitement mineur) appliquรฉ ร votre cible.' +L.Filter_MundusBoon = 'Filtrer les pierres de Mundus' +L.Filter_MundusBoonPlayerTip = 'Choisissez de masquer l\'affichage du bonus de la pierre de Mundus appliquรฉ ร vous-mรชme.' +L.Filter_MundusBoonTargetTip = 'Choisissez de masquer l\'affichagedu bonus de la pierre de Mundus appliquรฉ ร votre cible.' +L.Filter_SoulSummons = 'Filtrer le timer du rez gratuit' +L.Filter_SoulSummonsPlayerTip = 'Choisissez de masquer l\'affichage du timer de rez gratuit de la ligne Magie des Ames appliquรฉ ร vous-mรชme.' +L.Filter_SoulSummonsTargetTip = 'Choisissez de masquer l\'affichage du timer de rez gratuit de la ligne Magie des Ames appliquรฉ ร votre cible.' +L.Filter_VampLycan = 'Filtrer le timer Vampire & Loup-Garou' +L.Filter_VampLycanPlayerTip = 'Choisissez de masquer l\'affichage des buffs de vampirisme et de lycanthropie appliquรฉ ร vous-mรชme.' +L.Filter_VampLycanTargetTip = 'Choisissez de masquer l\'affichage des buffs de vampirisme et de lycanthropie appliquรฉ ร votre cible.' +L.Filter_VampLycanBite = 'Filtrer le timer de morsure Vampire & Loup-Garou' +L.Filter_VampLycanBitePlayerTip = 'Choisissez de masquer l\'affichage des buffs de morsure vampire et lycanthropique appliquรฉ ร vous-mรชme.' +L.Filter_VampLycanBiteTargetTip = 'Choisissez de masquer l\'affichage des buffs de morsure vampire et lycanthropique appliquรฉ ร votre cible.' + + +-- ------------------------ +-- SETTINGS: CAST BAR +-- ------------------------ +L.CastBar_Enable = 'Activer la barre de cast & de canalisation' +L.CastBar_EnableTip = 'Sรฉlectionnez si vous voulez activer une barre de cast dรฉplaรงable pour afficher les temps d\'incantation ou de canalisation de vos compรฉtences.' +L.CastBar_Alpha = 'Opacitรฉ' +L.CastBar_AlphaTip = 'Dรฉfinissez la transparence de la barre de cast lorsqu\'elle est visible. Un paramรจtre ร 100 rends la fenรชtre totalement opaque.' +L.CastBar_Scale = 'Echelle' +L.CastBar_ScaleTip = 'Dรฉfinissez la taille de la barre de cast en pourcentage' +-- settings: cast bar (name) +L.CastBar_NameHeader = 'Nom de la compรฉtence castรฉe' +L.CastBar_NameShow = 'Afficher le nom de la compรฉtence castรฉe' +-- settings: cast bar (timer) +L.CastBar_TimerHeader = 'Timer de la barre de cast' +L.CastBar_TimerShow = 'Afficher le timer de la compรฉtence castรฉe' +-- settings: cast bar (bar) +L.CastBar_BarHeader = 'Barre de timer' +L.CastBar_BarReverse = 'Inverser les directions du timer' +L.CastBar_BarReverseTip = 'Dรฉfinissez si vous souhaitez inverser le timer de la barre de cast.' +L.CastBar_BarGloss = 'Activer la brillance' +L.CastBar_BarGlossTip = 'Dรฉfinissez si vous souhaitez que la barre du timer possรจde une brillance amรฉliorรฉe' +L.CastBar_BarWidth = 'Largeur de la barre' +L.CastBar_BarWidthTip = 'Dรฉfinissez la largeur de la barre de cast lorsqu\' elle est affichรฉe.' +L.CastBar_BarColour = 'Couleur de la barre' +L.CastBar_BarColourTip = 'Dรฉfinissez les couleurs de la barre de cast. La premiรจre couleur est la couleur primaire en dรฉbut de cast, la seconde sera celle affichรฉe ร la fin du timer.' + + +-- ------------------------ +-- SETTINGS: DISPLAY FRAMES +-- ------------------------ +L.DisplayFrame_Alpha = 'Transparence de la fenรชtre' +L.DisplayFrame_AlphaTip = 'Dรฉfinissez la transparence de la fenรชtre des effets lorsqu\'elle est visible. Un paramรจtre ร 100 rends la fenรชtre totalement opaque.' +L.DisplayFrame_Scale = 'Echelle de la fenรชtre' +L.DisplayFrame_ScaleTip = 'Dรฉfinissez la taille de la fenรชtre des effets en pourcentage.' +-- settings: display frames (aura) +L.DisplayFrame_AuraHeader = 'Affichage' +L.DisplayFrame_Style = 'Style' +L.DisplayFrame_StyleTip = 'Dรฉfinissez le style qui sera appliquรฉ ร cette fenรชtre d\'effets.\n\n|cffd100Affichage dรฉtaillรฉ|r - Affiche le nom de la compรฉtence, son icรดne, la barre de timer et le texte associรฉ.\n\n|cffd100Icรดne seulement|r - Affiche l\'icรดne de la compรฉtence et le texte du timer seulement, ce style permet plus d\'options pour le sens de l\'empilage du temps des effets.\n\n|cffd100Minimal|r - Affiche le nom de la compรฉtence et une barre de timer plus petite.' +L.DisplayFrame_Growth = 'Sens de l\'empilage du temps des effets' +L.DisplayFrame_GrowthTip = 'Dรฉfinissez dans quel sens les nouveaux effets doivent s\'empiler depuis le point d\'origine. Pour les paramรจtres "centrรฉs", les effets iront dans le sens prรฉcisรฉ dans la liste.\n\nLes effets ne peuvent s\'empiler que lorsqu\'ils sont affichรฉs en mode |cffd100Dรฉtaillรฉ|r or |cffd100Minimal|r styles.' +L.DisplayFrame_Padding = 'Espacement entre les piles d\'effets' +L.DisplayFrame_PaddingTip = 'Dรฉfinissez l\'espacement entre chaque effet.' +L.DisplayFrame_Sort = 'Ordre de tri des effets' +L.DisplayFrame_SortTip = 'Dรฉfinissez comment les effets sont triรฉs. Soit par ordre alphabรฉtique, soit par durรฉe restante ou dans l\'ordre oรน ils ont atรฉs castรฉs.\n\nLorsque vous triez par durรฉe, tous les passifs et effets continus seront triรฉs par nom et seront affichรฉs en dรฉbut ou en fin de pile selon l\'ordre de tri, avec les compรฉtences temporaires listรฉes ensuite ou avant.' +L.DisplayFrame_Highlight = 'Mise en surbrillance des icones d\'effet continu' +L.DisplayFrame_HighlightTip = 'Dรฉfinir si les effets continus doivent รชtre mis en surbrillance pour mieux les distinguer des effets passifs.\n\nNon disponible dans le mode |cffd100Minimal|r.' +-- settings: display frames (name) +L.DisplayFrame_NameHeader = 'Nom de la compรฉtence' +-- settings: display frames (timer) +L.DisplayFrame_TimerHeader = 'Texte du Timer' +L.DisplayFrame_TimerLocation = 'Emplacement du texte du timer' +L.DisplayFrame_TimerLocationTip = 'Dรฉfinir la position des timers pour chaque effet par rapport ร son icone.' +-- settings: display frames (bar) +L.DisplayFrame_BarHeader = 'Barre du timer' +L.DisplayFrame_BarReverse = 'Inverser les directions du timer' +L.DisplayFrame_BarReverseTip = 'Dรฉfinissez si vous souhaitez inverser le timer de l\'effet. Dans le mdoe |cffd100Dรฉtaillรฉ|r cela inversera รฉgalement la position de l\'icรดne.' +L.DisplayFrame_BarGloss = 'Activer la brillance' +L.DisplayFrame_BarGlossTip = 'Dรฉfinissez si vous souhaitez que la barre du timer possรจde une brillance amรฉliorรฉe.' +L.DisplayFrame_BarWidth = 'Largeur de la barre' +L.DisplayFrame_BarWidthTip = 'Dรฉfinissez la largeur de la du timer lorsqu\'elle est affichรฉe.' +L.DisplayFrame_BarTimed = 'Couleur: Effets temporaires' +L.DisplayFrame_BarTimedTip = 'Dรฉfinir les couleurs des effets temporaires. La premiรจre couleur est la couleur primaire en dรฉbut d\'effet, la seconde sera celle affichรฉe ร la fin du timer.' +L.DisplayFrame_BarToggled = 'Couleur: Effets continus' +L.DisplayFrame_BarToggledTip = 'Dรฉfinir les couleurs des effets temporaires. La premiรจre couleur est la couleur primaire en dรฉbut de barre, la seconde sera celle affichรฉe ร la fin de la barre.' +L.DisplayFrame_BarPassive = 'Couleur: Effets passives' +L.DisplayFrame_BarPassiveTip = 'Dรฉfinir les couleurs des effets temporaires. La premiรจre couleur est la couleur primaire en dรฉbut de barre, la seconde sera celle affichรฉe ร la fin de la barre.' + + +-- ------------------------ +-- SETTINGS: PROFILES +-- ------------------------ +L.Profile_Desc = 'Les profils de prรฉfรฉrences peuvent รชtre gรฉrรฉs ici vous permettant de sรฉlectionner entre une configuration par compte ou par personnage. Vous devez d\'abord activer la gestion des profils pour modifier les valeurs ci-dessous.' +L.Profile_UseGlobal = 'Utiliser une configuration par compte' +L.Profile_UseGlobalWarn = 'Switcher entre la configuration par personnage et par compte rechargera votre UI.' +L.Profile_Copy = 'Sรฉlectionnez un profil ร copier' +L.Profile_CopyTip = 'Select a profile to copy its settings to the currently actrive profile. The active profile will be for either the logged in character or the account wide profile if enabled. The existing profile settings will be permanently overwritten.\n\nThis cannot be undone!' +L.Profile_CopyButton = 'Copier le profil' +L.Profile_CopyButtonWarn = 'Copier un profil rechargera votre UI.' +L.Profile_CopyCannotCopy = 'Impossible de copier le profil sรฉlectionnรฉ. Veuillez rรฉessayer ou sรฉlectionner un autre profil.' +L.Profile_Delete = 'Sรฉlectionnez un profil ร supprimer' +L.Profile_DeleteTip = 'Sรฉlectionnez un profil ร supprimer de la base des paramรจtres. Si le personnage concernรฉ est reconnectรฉ par la suite, et que vous n\'utilisez pas une configuration par compte, celui-ci hรฉritera de la configuration par dรฉfaut' +L.Profile_DeleteButton = 'Supprimer le profil' +L.Profile_Guard = 'Activer la gestion des profils' + if (GetCVar('language.2') == 'fr') then -- overwrite GetLocale for new language for k, v in pairs(Srendarr:GetLocale()) do @@ -178,4 +292,4 @@ if (GetCVar('language.2') == 'fr') then -- overwrite GetLocale for new language function Srendarr:GetLocale() -- set new locale return return L end -end \ No newline at end of file +end diff --git a/Locales/Local_ru.lua b/Locales/Local_ru.lua index d17a5de..224f01f 100644 --- a/Locales/Local_ru.lua +++ b/Locales/Local_ru.lua @@ -1,149 +1,286 @@ -- Russian (ru) - Translations provided by @KiriX (http://www.esoui.com/forums/member.php?u=105) -local Srendarr = _G['Srendarr'] -- grab addon table from global - -local L = {} +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = {} L.Srendarr = '|c67b1e9S|c4779ce\'rendarr|r' + L.Usage = '|c67b1e9S|c4779ce\'rendarr|r - รcรฏoรฌรถรงoรกaรฎรจe: /srendarr รกรชรฌรดรนรจรฒรถ/oรฒรชรฌรดรนรจรฒรถ รกoรงรญoรฆรฎocรฒรถ รฏepeรครกรจรขaรฒรถ รซรฌeรญeรฎรฒรฟ รจรฎรฒepยณeรฉca aรครคoรฎa รฏo รซรชpaรฎรณ.' --- timer strings + + + +-- time format + L.Time_Seconds = '%dc' L.Time_Minutes = '%dรญ' L.Time_Hours = '%dรน' -L.Time_Toggle = 'T' -L.Time_Passive = 'P' -L.Time_Cast = 'Cast' --- drag overlay labels -L.DragLabel_BuffShort = 'รOPOรรรE' -L.DragLabel_BuffLong = 'รรรรEรรรลธE' -L.DragLabel_BuffAll = 'รAยฒยฒ' -L.DragLabel_Debuff = 'รEรAยฒยฒ' -L.DragLabel_Target = 'ลEรร' - --- --------------------------------------------------- --- SETTINGS ------------------------------------------ --- --------------------------------------------------- - --- dropdown menus -L.DropGrowth1 = 'รรกepx' -L.DropGrowth2 = 'รรฎรจรง' -L.DropGrowth3 = 'รรฌeรกo' -L.DropGrowth4 = 'รรฌeรกo (Oรฒลeรฎรฒpoรกaรฎo)' -L.DropGrowth5 = 'รรฏpaรกo' -L.DropGrowth6 = 'รรฏpaรกo (Oรฒลeรฎรฒpoรกaรฎo)' -L.DropSort1 = 'Ocรฒaรกรบeecรผ รกpeรญรผ' -L.DropSort2 = 'รaรงรกaรฎรจe cรฏocoร รฎocรฒรจ' -L.DropTimer1 = 'รa รจรชoรฎรชe' -L.DropTimer2 = 'รoรค รจรชoรฎรชoรฉ' -L.DropTimer3 = 'รaรค รจรชoรฎรชoรฉ' -L.DropTimer4 = 'Cรชpรฟรฒo' --- tabs -L.TabButton1 = 'Oร รปรจe' -L.TabButton2 = 'รopoรฒรชรจe ร aยณยณรฟ' -L.TabButton3 = 'รรฌรจรฒeรฌรถรฎรฟe ร aยณยณรฟ' -L.TabButton4 = 'รeร aยณยณรฟ' -L.TabButton5 = 'รaยณยณรฟ ลeรฌรจ' -L.TabButton6 = 'รpoยณรจรฌรจ' -L.TabHeader1 = 'Oร รปรจe รฎacรฒpoรฉรชรจ' -L.TabHeader2 = 'รacรฒpoรฉรชรจ รชopoรฒรชรจx รจ รชoรญร รจรฎรจpoรกaรฎรฎรฟx ร aยณยณoรก' -L.TabHeader3 = 'รacรฒpoรฉรชรจ รครฌรจรฒeรฌรถรฎรฟx ร aยณยณoรก' -L.TabHeader4 = 'รacรฒpoรฉรชรจ รคeร aยณยณoรก' -L.TabHeader5 = 'รacรฒpoรฉรชรจ ร aยณยณoรก ลeรฌรจ' -L.TabHeader6 = 'รacรฒpoรฉรชรจ รฏpoยณรจรฌeรฉ' --- example aura names -L.ExampleAura1 = 'รaยณยณ' -L.ExampleAura2 = 'รpรณรขoรฉ ร aยณยณ' -L.ExampleAura3 = 'Eรปe oรครจรฎ ร aยณยณ' -L.ExampleAura4 = 'รeร aยณยณ' -L.ExampleAura5 = 'รpรณรขoรฉ รคeร aยณยณ' -L.ExampleAura6 = 'Eรปe oรครจรฎ รคeร aยณยณ' -L.ExampleAura7 = 'รpeรญeรฎรฎรฟe aรณpรฟ (รรฌรจรฒeรฌรถรฎรฟe)' -L.ExampleAura8 = 'รรชรฌรดรนaeรญรฟe aรณpรฟ' -L.ExampleAura9 = 'รaccรจรกรฎรฟe aรณpรฟ' --- settings: general tab (1) -L.GeneralAnchorDesc = 'Paรงร รฌoรชรจpรณรฉรฒe, รนรฒoร รฟ รฏepeรญeรปaรฒรถ รฏo รซรชpaรฎรณ รญรฟรบรถรด รฒaรฉรญepรฟ aรณp. รรฎoรฏรชa Cร poc รกepรฎeรฒ รกce รฎa รฏoรงรจลรจรจ รฏo รณรญoรฌรนaรฎรจรด.' -L.GeneralAnchorLock = 'รaร รฌoรชรจpoรกaรฒรถ' -L.GeneralAnchorUnlock = 'Paรงร รฌoรชรจpoรกaรฒรถ' -L.GeneralAnchorReset = 'Cร poc' -L.GeneralOnlyCombat = 'รoรฌรถรชo รก ร oรด' -L.GeneralOnlyCombatTip = 'รoรชaรงรฟรกaรฒรถ รกce รซยณยณeรชรฒรฟ รฒoรฌรถรชo รกo รกpeรญรผ ร oรผ.' -L.GeneralCombine = 'รoรญร รจรฎรจpoรกaรฒรถ ร aยณยณรฟ' -L.GeneralCombineTip = 'Oรฏpeรคeรฌรผeรฒ, รคoรฌรฆรฎรฟ รฌรจ รชopoรฒรชรจe รจ รครฌรจรฒeรฌรถรฎรฟe ร aยณยณรฟ รฎaxoรครจรฒรถcรผ รก oรครฎoรญ oรชรฎe, รจรฌรจ รคoรฌรฆรฎรฟ ร รฟรฒรถ paรงรคeรฌeรฎรฟ รฎa รครกa oรฒรคeรฌรถรฎรฟx oรชรฎa.\n\nEcรฌรจ paรงรคeรฌรจรฒรถ, ร aยณยณรฟ, รชoรฒopรฟe ร รณรครณรฒ รกo รกรฒopoรญ (รรฌรจรฒeรฌรถรฎoรญ) oรชรฎe, ร รณรครณรฒ รฏaccรจรกรฎรฟรญรจ, รกรชรฌรดรนaeรญรฟรญรจ รจ ร aยณยณaรญรจ c รครฌรจรฒeรฌรถรฎocรฒรถรด oรฒ รญรจรฎรณรฒรฟ รจ รคoรฌรบรถe.' -L.GeneralThreshold = 'รpaรฎรจลa รชopoรฒรชรจx ร aรฑรฑoรก' -L.GeneralThresholdTip = 'รo รณรญoรฌรนaรฎรจรด รจรขpa oรฏpeรคeรฌรผeรฒ ร aรฑรฑรฟ c รครฌรจรฒeรฌรถรฎocรฒรถรด รก 30 ceรชรณรฎรค รจ ร oรฌee รชaรช รครฌรจรฒeรฌรถรฎรฟe. รรคecรถ รกรฟ รญoรฆeรฒe รจรงรญeรฎรจรฒรถ รซรฒรณ รขpaรฎรจลรณ oรฏpeรคeรฌeรฎรจรผ.' -L.GeneralTarget = 'รoรชaรงรฟรกaรฒรถ aรณpรฟ ลeรฌรจ' -L.GeneralTargetTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รฌรจ รครฌรจรฒeรฌรถรฎรฟe, รกรชรฌรดรนaeรญรฟe รจ รฏaccรจรกรฟรฎe ร aยณยณรฟ รกaรปeรฉ รฒeรชรณรปeรฉ ลeรฌรจ รก oรฒรคeรฌรถรฎoรญ oรชรฎe.' -L.GeneralDebuff = 'รoรชaรงรฟรกaรฒรถ รคeร aยณยณรฟ' -L.GeneralDebuffTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รฌรจ รฎaรฌoรฆeรฎรฎรฟe รกaรญรจ รคeร aยณยณรฟ รก oรฒรคeรฌรถรฎoรญ oรชรฎe. รoรฆaรฌรณรฉcรฒa, รฏoรญรฎรจรฒe, รนรฒo รจรฎยณopรญaลรจรผ, รฏpeรคocรฒaรกรฌรผeรญaรผ รซรฒรจรญ รญoรคoรญ, รฏoรชaรงaรฎรฎรฟe รฒaรฉรญepรฟ, รญoรขรณรฒ ร รฟรฒรถ รฎeรฒoรนรฎรฟ รจ รฎe รญoรขรณรฒ oรฒcรฌeรครจรฒรถ cรญepรฒรถ ลeรฌรจ รจรฌรจ oรนรจcรฒรชรณ ลeรฌรจ oรฒ รฎeรขaรฒรจรกรฎรฟx รซยณยณeรชรฒoรก, oรฏรจpaรฉรฒecรถ รฎa รคaรฎรฎรฟe aรครคoรฎa รฒoรฌรถรชo รชaรช รฎa รฎeรชoรฒopรณรด รฏoรคcรชaรงรชรณ.' -L.GeneralDebuffWarn = 'รe รญoรฆeรฒ ร รฟรฒรถ รฏoรฌรฎoลeรฎรฎo peaรฌรจรงoรกaรฎo รจรง-รงa oรขpaรฎรจรนeรฎรจรฉ API.' -L.GeneralHeaderFiltersPlayer = 'ยฒรจรฌรถรฒpรฟ aรณp: รรขpoรช' -L.GeneralHeaderFiltersTarget = 'ยฒรจรฌรถรฒpรฟ aรณp: ลeรฌรถ' -L.GeneralSoulSummons = 'รoรชaรงรฟรกaรฒรถ aรณpรณ Soul Summons' -L.GeneralSoulSummonsTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รจรฌรจ รฎeรฒ รครฌรจรฒeรฌรถรฎocรฒรถ \'aรณpรฟ\' Soul Summons.' -L.GeneralToggle = 'รoรชaรงรฟรกaรฒรถ รกรชรฌรดรนaeรญรฟe ร aยณยณรฟ' -L.GeneralToggleTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รจรฌรจ รฎeรฒ รกรชรฌรดรนaeรญรฟe ร aยณยณรฟ ร eรง รครฌรจรฒeรฌรถรฎocรฒรจ.\n\nรaรฏp.: Unstable Familiar' -L.GeneralPassive = 'รoรชaรงรฟรกaรฒรถ รฏaccรจรกรฎรฟe ร aยณยณรฟ' -L.GeneralPassiveTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รจรฌรจ รฎeรฒ รฏaccรจรกรฎรฟe ร aยณยณรฟ.\n\nรaรฏp: รยณยณeรชรฒรฟ รชaรญรฎeรฉ รรณรฎรครณca' -L.GeneralCyrodiil = 'รoรชaรงรฟรกaรฒรถ ร oรฎรณcรฟ Cรจpoรครจรฌa' -L.GeneralCyrodiilTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รจรฌรจ รฎeรฒ ร oรฎรณcรฎรฟe ร aยณยณรฟ รงa AvA รชaรญรฏaรฎรจรด รก Cรจpoรครจรฌe.\n\nรpeร รณeรฒcรผ: รoรชaรงรฟรกaรฒรถ รฏaccรจรกรฎรฟe ร aยณยณรฟ' -L.GeneralDisguise = 'รoรชaรงรฟรกaรฒรถ รญacรชรจpoรกรชรณ' -L.GeneralDisguiseTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รจรฌรจ รฎeรฒ aรชรฒรจรกรฎรณรด รญacรชรจpoรกรชรณ.\n\nรpeร รณeรฒcรผ: รoรชaรงรฟรกaรฒรถ รฏaccรจรกรฎรฟe ร aยณยณรฟ' -L.GeneralAllEffects = 'รce รซรฑรฑeรชรฒรฟ' -L.GeneralAllEffectsTip = 'Oรฒoร paรฆaeรฒ รคaรฆe รญeรฎee รกaรฆรฎรฟe รซรฑรฑeรชรฒรฟ.\รaรฏp: ESO Plus Member\n\nรpeร oรกaรฎรจe: รoรชaรงรฟรกaรฒรถ รฏaccรจรกรฎรฟe ร aยณยณรฟ' -L.GeneralMundus = 'รoรชaรงรฟรกaรฒรถ รซยณยณeรชรฒรฟ รชaรญรฎeรฉ รรณรฎรครณca' -L.GeneralMundusTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รจรฌรจ รฎeรฒ รซยณยณeรชรฒรฟ รชaรญรฎeรฉ รรณรฎรครณca.\n\nรpeร รณeรฒcรผ: รoรชaรงรฟรกaรฒรถ รฏaccรจรกรฎรฟe ร aยณยณรฟ' -L.GeneralVampLycan = 'รoรชaรงรฟรกaรฒรถ ยณopรญรฟ รaรญรฏรจpa/Oร opoรฒรฎรผ' -L.GeneralVampLycanTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รจรฌรจ รฎeรฒ ร aยณยณรฟ รกaรญรฏรจpรจรงรญa รจ รฌรจรชaรฎรฒpoรฏรจรจ.\n\nรpeร รณeรฒcรผ: รoรชaรงรฟรกaรฒรถ รฏaccรจรกรฎรฟe ร aยณยณรฟ' -L.GeneralMinorBuffs = 'Hide Minor Buffs' -L.GeneralMinorBuffsTip = 'Set wether to hide Minor Buffs.\n\ne.g. "Minor Sorcery"' -L.GeneralMajorBuffs = 'Hide Major Buffs' -L.GeneralMajorBuffsTip = 'Set wether to hide Major Buffs.\n\ne.g. "Major Sorcery"' --- settings: style tabs (2-4) - base -L.WindowAlpha = 'รpoรงpaรนรฎocรฒรถ' -L.WindowAlphaTip = 'Oรฏpeรคeรฌรผeรฒ รฏpoรงpaรนรฎocรฒรถ oรชรฎa aรณp. 100 - รฏoรฌรฎocรฒรถรด รกรจรครจรญoe, รฎeรฏpoรงpaรนรฎoe.' -L.WindowScale = 'Paรงรญep' -L.WindowScaleTip = 'Paรงรญep oรชรฎa aรณp รก รฏpoลeรฎรฒax. 100 - paรงรญep รฏo รณรญoรฌรนaรฎรจรด.' -L.WindowGrowth = 'รaรฏpaรกรฌeรฎรจe รงaรฏoรฌรฎeรฎรจรผ oรชรฎa' -L.WindowGrowthTip = 'Oรฏpeรคeรฌรผeรฒ, รก รชaรชoรญ รฎaรฏpaรกรฌeรฎรจรจ oรฒ รผรชopรผ ร รณรครณรฒ รฏoรผรกรฌรผรฒรถcรผ รฎoรกรฟe aรณpรฟ. รรฌรผ oรฒลeรฎรฒpรจpoรกaรฎรฎรฟx รฎacรฒpoeรช, aรณpรฟ ร รณรครณรฒ รคoร aรกรฌรผรฒรถcรผ รฏo oร e cรฒopoรฎรฟ รผรชopรผ รก รฏopรผรครชe, รงaรคaรฎรฎoรญ รฏpeยณรจรชcoรญ (รรฌeรกo/รรฏpaรกo).\n\nรoรญรฎรจรฒe, รนรฒo รชoรขรคa รกรฟร paรฎo รขopรจรงoรฎรฒaรฌรถรฎoe oรฒoร paรฆeรฎรจe, รฎaรงรกaรฎรจe aรณpรฟ รจ รฏoรฌรงรณรฎoรช รกpeรญeรฎรจ aรกรฒoรญaรฒรจรนecรชรจ cรชpรฟรกaรดรฒcรผ.' -L.WindowPadding = 'Paccรฒoรผรฎรจe รญeรฆรครณ aรณpaรญรจ' -L.WindowPaddingTip = 'Oรฏpeรคeรฌรผeรฒ รฏpocรฒpaรฎcรฒรกo รญeรฆรครณ รชaรฆรคoรฉ oรฒoร paรฆeรฎรฎoรฉ aรณpoรฉ.' -L.WindowSort = 'รopรผรคoรช copรฒรจpoรกรชรจ' -L.WindowSortTip = 'รaรคaeรฒ รฏopรผรคoรช copรฒรจpoรกรชรจ aรณp. ร aรฌยณaรกรจรฒรฎoรญ รฏopรผรครชe รฏo รฎaรงรกaรฎรจรด รจรฌรจ รฏo รครฌรจรฒeรฌรถรฎocรฒรจ. Ecรฌรจ รกรฟร paรฎa copรฒรจpoรกรชa รฏo รครฌรจรฒeรฌรถรฎocรฒรจ, รฏaccรจรกรฎรฟe รจ รกรชรฌรดรนaeรญรฟe cรฏocoร รฎocรฒรจ รกceรขรคa ร รณรครณรฒ รฏepรกรฟรญรจ oรฒ รผรชopรผ, cรฌeรคoรญ ร รณรครณรฒ pacรฏoรฌaรขaรฒรถcรผ aรณpรฟ รก รฏopรผรครชe รณรญeรฎรถรบeรฎรจรผ รครฌรจรฒeรฌรถรฎocรฒรจ รจx รคeรฉcรฒรกรจรผ, รฒaรช caรญรฟe รชopoรฒรชรจe aรณpรฟ รฏpoรฏaรคaรดรฒ ร รฟcรฒpee รคpรณรขรจx รจ รฎaxoรครผรฒcรผ รคaรฌรถรบe รกceรขo oรฒ รผรชopรผ.' -L.WindowIconOn = 'รรชoรฎรชa cรฏpaรกa' -L.WindowIconOnTip = 'Oรฏpeรคeรฌรผeรฒ, รขรคe ร รณรคeรฒ pacรฏoรฌaรขaรฒรถcรผ รจรชoรฎรชa aรณpรฟ, cรฏpaรกa รจรฌรจ cรฌeรกa oรฒ รฎaรงรกaรฎรจรผ รจ รฏoรฌรงรณรฎรชa รกpeรญeรฎรจ, รชoรขรคa รกรฟร paรฎo รกepรฒรจรชaรฌรถรฎoe oรฒoร paรฆeรฎรจe.' -L.WindowShowNameBar = 'รoรชaรงรฟรกaรฒรถ รฎaรงรกaรฎรจe รจ รฏoรฌรงรณรฎoรช' -L.WindowShowNameBarTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รฌรจ รฎaรงรกaรฎรจe aรณpรฟ รจ รฏoรฌรงรณรฎoรช, รชoรขรคa aรณpรฟ รกรฟcรฒpoeรฎรฟ รกepรฒรจรชaรฌรถรฎo.' -L.WindowTooltips = 'รaรงรกaรฎรจe cรฏocoร รฎocรฒรจ รก รฏoรคcรชaรงรชe' -L.WindowTooltipsTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รฌรจ รฎaรงรกaรฎรจe รครฌรผ รชaรฆรคoรฉ aรณpรฟ รกo รกcรฏรฌรฟรกaรดรปeรฉ รฏoรคcรชaรงรชe, รฏpรจ รฎaรกeรคeรฎรจรจ รชรณpcopa รฎa รจรชoรฎรชรณ.' --- settings: style tabs (2-4) - name -L.WindowNameHeader = 'รaรงรกaรฎรจe cรฏocoร รฎocรฒeรฉ' -L.WindowNameFont = 'Cรฒรจรฌรถ รฎaรงรกaรฎรจรผ' --- settings: style tabs (2-4) - timer -L.WindowTimerHeader = 'รaรฉรญep' -L.WindowTimerShowTP = 'รoรชaรงรฟรกaรฒรถ รฒaรฉรญep รครฌรผ รกรชรฌรดรนaeรญรฟx รจ รฏaccรจรกรฎรฟx' -L.WindowTimerShowTPTip = 'Oรฏpeรคeรฌรผeรฒ, รฏoรชaรงรฟรกaรฒรถ รฌรจ รฒaรฉรญep รครฌรผ รกรชรฌรดรนaeรญรฟx(T) รจ รฏaccรจรกรฎรฟx(P) cรฏocoร รฎocรฒeรฉ. Ecรฌรจ รกรฟรชรฌรดรนeรฎo, รฒaรฉรญep ร รณรคeรฒ cรชpรฟรฒ รครฌรผ aรณp ร eรง รครฌรจรฒeรฌรถรฎocรฒรจ.' -L.WindowTimerHorz = 'รoรฌoรฆeรฎรจe รฒaรฉรญep: รopรจรงoรฎรฒaรฌรถรฎo' -L.WindowTimerHorzTip = 'Oรฏpeรคeรฌรผeรฒ รฏoรฌoรฆeรฎรจe รฒaรฉรญepa รครฌรผ รชaรฆรคoรฉ aรณpรฟ, รชoรขรคa aรณpรฟ oรฒoร paรฆaรดรฒcรผ รขopรจรงoรฎรฒaรฌรถรฎo. รcรฒaรฎoรกรชa Cรชpรฟรฒo oรฒรชรฌรดรนรจรฒ oรฒoร paรฆeรฎรจe รฒaรฉรญepa รครฌรผ รกcex aรณp.' -L.WindowTimerVert = 'รoรฌoรฆeรฎรจe รฒaรฉรญep: รepรฒรจรชaรฌรถรฎo' -L.WindowTimerVertTip = 'Oรฏpeรคeรฌรผeรฒ รฏoรฌoรฆeรฎรจe รฒaรฉรญepa รครฌรผ รชaรฆรคoรฉ aรณpรฟ, รชoรขรคa aรณpรฟ oรฒoร paรฆaรดรฒcรผ รกepรฒรจรชaรฌรถรฎo. รcรฒaรฎoรกรชa Cรชpรฟรฒo oรฒรชรฌรดรนรจรฒ oรฒoร paรฆeรฎรจe รฒaรฉรญepa รครฌรผ รกcex aรณp.' -L.WindowTimerFont = 'Cรฒรจรฌรถ รฒaรฉรญepa' --- settings: style tabs (2-4) - bar -L.WindowBarHeader = 'รoรฌรงรณรฎoรช รกpeรญeรฎรจ' -L.WindowBarGloss = 'Oรฒร รฌecรช' -L.WindowBarGlossTip = 'รoร aรกรฌรผeรฒ รซยณยณeรชรฒ oรฒร รฌecรชa รฎa รฏoรฌรงรณรฎoรช.' -L.WindowBarWidth = 'รรฌรจรฎa รฏoรฌรงรณรฎรชa' -L.WindowBarWidthTip = 'Oรฏpeรคeรฌรผeรฒ รครฌรจรฎรณ รฏoรฌรงรณรฎรชa, ecรฌรจ oรฎ oรฒoร paรฆaeรฒcรผ.' -L.WindowBarTimed = 'ลรกeรฒa: รpeรญeรฎรฎรฟe aรณpรฟ' -L.WindowBarTimedTip = 'Oรฏpeรคeรฌรผeรฒ ลรกeรฒa รฏoรฌรงรณรฎรชa รครฌรผ aรณp c รครฌรจรฒeรฌรถรฎocรฒรถรด. รeรกรฟรฉ ลรกeรฒ รงaรคaeรฒ ลรกeรฒ รฎaรนaรฌa รฏoรฌรงรณรฎรชa (oรฒรชรณรคa รฎaรนรจรฎaeรฒcรผ oรฒcรนeรฒ), a รกรฒopoรฉ oรฏpeรคeรฌรผeรฒ ลรกeรฒ รชoรฎลa รฏoรฌรงรณรฎรชa (รชoรขรคa aรณpa รฏoรนรฒรจ รจcรฒeรชรฌa).\n\nรรฒรจ รฆe ลรกeรฒa ร รณรครณรฒ รจcรฏoรฌรถรงoรกaรฒรถcรผ รครฌรผ cรฏocoร รฎocรฒeรฉ, รจรญeร รปรจx รกpeรญรผ รฏpรจรญeรฎeรฎรจรผ.' -L.WindowBarToggle = 'ลรกeรฒa: รรชรฌรดรนaeรญรฟe aรณpรฟ' -L.WindowBarToggleTip = 'Oรฏpeรคeรฌรผeรฒ ลรกeรฒa รฏoรฌรงรณรฎรชa รครฌรผ รกรชรฌรดรนaeรญรฟx aรณp. รeรกรฟรฉ ลรกeรฒ รงaรคaeรฒ ลรกeรฒ รฎaรนaรฌa รฏoรฌรงรณรฎรชa (รฎaรจร oรฌรถรบee paccรฒoรผรฎรจe oรฒ รจรชoรฎรชรจ), a รกรฒopoรฉ oรฏpeรคeรฌรผeรฒ ลรกeรฒ รชoรฎลa รฏoรฌรงรณรฎรชa (ร รฌรจรฆaรฉรบรจรฉ รช รจรชoรฎรชe).' -L.WindowBarPassive = 'ลรกeรฒa: รaccรจรกรฎรฟe aรณpรฟ' -L.WindowBarPassiveTip = 'Oรฏpeรคeรฌรผeรฒ ลรกeรฒa รฏoรฌรงรณรฎรชa รครฌรผ รฏaccรจรกรฎรฟx aรณp. รeรกรฟรฉ ลรกeรฒ รงaรคaeรฒ ลรกeรฒ รฎaรนaรฌa รฏoรฌรงรณรฎรชa (รฎaรจร oรฌรถรบee paccรฒoรผรฎรจe oรฒ รจรชoรฎรชรจ), a รกรฒopoรฉ oรฏpeรคeรฌรผeรฒ ลรกeรฒ รชoรฎลa รฏoรฌรงรณรฎรชa (ร รฌรจรฆaรฉรบรจรฉ รช รจรชoรฎรชe).' --- settings: profiles tab (6) -L.ProfileCharacterList = 'Cรณรปecรฒรกรณรดรปรจe รฎacรฒpoรฉรชรจ' -L.ProfileCharacterListTip = 'Cรฏรจcoรช รฏepcoรฎaรฆeรฉ, รชoรฒopรฟe รจรญeรดรฒ cรกoรจ รฎacรฒpoรฉรชรจ S\'rendarr.' -L.ProfileCopyFrom = 'รoรฏรจpoรกaรฒรถ รฎacรฒpoรฉรชรจ' -L.ProfileCopyFromTip = 'รoรฏรจpoรกaรฒรถ รฎacรฒpoรฉรชรจ รกรฟร paรฎรฎoรขo รฏepcoรฎaรฆa รฏepcoรฎaรฆรณ, รชoรฒopรฟรญ รกรฟ ceรฉรนac รงaรบรฌรจ.' -L.ProfileCopyFromWarn = 'รaรฆaรฎรจe รซรฒoรฉ รชรฎoรฏรชรจ รฏepeรงaรขpรณรงรจรฒ UI รจ รฎaรกceรขรคa รฏepeรงaรฏรจรบeรฒ รฎacรฒpoรฉรชรจ รซรฒoรขo รฏepcoรฎaรฆa รฎacรฒpoรฉรชaรญรจ รกรฟร paรฎรฎoรขo รฏepcoรฎaรฆa.\n\nรรฒo รฎeoร paรฒรจรญoe รคeรฉcรฒรกรจe.' + + +-- aura grouping + + + + + + + + + + + + + + +-- whitelist & blacklist control + + + + + + + +-- settings: base + + + + + + + + + + + + + + + + + + + + + + + + + +-- settings: generic + + + + + + + + +-- settings: dropdown entries + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-- ------------------------ +-- SETTINGS: GENERAL +-- ------------------------ + + + + + + + + + + + + + + + + + + + +-- settings: general (aura control: display groups) + + + + + + + + + + + + + +-- settings: general (prominent auras) + + + + + + + + + + +-- ------------------------ +-- SETTINGS: FILTERS +-- ------------------------ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-- ------------------------ +-- SETTINGS: CAST BAR +-- ------------------------ + + + + + + +-- settings: cast bar (name) + + +-- settings: cast bar (timer) + + +-- settings: cast bar (bar) + + + + + + + + + + + +-- ------------------------ +-- SETTINGS: DISPLAY FRAMES +-- ------------------------ + + + + +-- settings: display frames (aura) + + + + + + + + + + + +-- settings: display frames (name) + +-- settings: display frames (timer) + + + +-- settings: display frames (bar) + + + + + + + + + + + + + + + +-- ------------------------ +-- SETTINGS: PROFILES +-- ------------------------ + + + + + + + + + + + + + if (GetCVar('language.2') == 'ru') then -- overwrite GetLocale for new language for k, v in pairs(Srendarr:GetLocale()) do @@ -155,4 +292,4 @@ if (GetCVar('language.2') == 'ru') then -- overwrite GetLocale for new language function Srendarr:GetLocale() -- set new locale return return L end -end \ No newline at end of file +end diff --git a/MinorMajorBuffs.lua b/MinorMajorBuffs.lua deleted file mode 100644 index 3fbe65e..0000000 --- a/MinorMajorBuffs.lua +++ /dev/null @@ -1,77 +0,0 @@ -local Srendarr = _G['Srendarr'] -- grab addon table from global - --- --------------------------------------------------- --- Minor Buffs --------------------------------------- --- --------------------------------------------------- - -local Minor = {} -Minor.Minor_Berserk = { 61744, 62636, 62639, 62642, 62645, 64047, 64048, 64050, 64051, 64052, 64053, 64054, 64055, 64056, 64057, 64058, 64178 } -Minor.Minor_Breach = { 68589, 68592, 61742, 64256, 68591 } -Minor.Minor_Brutality = { 61662, 61798, 61799, 64259 } -Minor.Minor_Defile = { 61726 } -Minor.Minor_Endurance = { 61704, 62056, 62102, 62106, 62110 } -Minor.Minor_Evasion = { 61715 } -Minor.Minor_Expedition = { 61735, 63558, 63561, 63562, 63563 } -Minor.Minor_Force = { 68595, 68596, 68597, 68598, 68628, 68629, 68630, 68631, 68632, 68636, 68638, 68640, 61746 } -Minor.Minor_Fortitude = { 61697 } -Minor.Minor_Fracture = { 68588, 38688, 61740, 62582, 62585, 62588, 64144, 64145, 64146, 64147, 64255 } -Minor.Minor_Gallop = { 63568 } -Minor.Minor_Heroism = { 38746, 61708, 62336, 62337, 62338, 62505, 62508, 62510, 62512 } -Minor.Minor_Intellect = { 36740, 61706 } -Minor.Minor_Maim = { 68359, 29308, 31899, 33228, 37472, 38068, 38072, 38076, 38817, 61723, 61724, 61854, 61855, 61856, 62339, 62340, 62341, 62492, 62493, 62494, 62495, 62500, 62501, 62503, 62504, 62507, 62509, 62511 } -Minor.Minor_Mangle = { 39168, 39180, 39181, 42984, 42986, 42991, 42993, 42998, 43000, 61733 } -Minor.Minor_Mending = { 68685, 68689, 68690, 68691, 61710 } -Minor.Minor_Prophecy = { 61688, 61691, 62319, 62320, 64261 } -Minor.Minor_Protection = { 3929, 28347, 40185, 61721, 62245, 62246, 62247 } -Minor.Minor_Resolve = { 24159, 31818, 37247, 61693, 61768, 61769, 61770, 61817, 61818, 61819, 61822, 62206, 62208, 62210, 62213, 62215, 62218, 62221, 62226, 62232, 62235, 62238, 62475, 62477, 62481, 62483, 62620, 62622, 62624, 62626, 62628, 62630, 62632, 62634, 62637, 62640, 62643, 63532, 63599, 63602, 63606 } -Minor.Minor_Savagery = { 61666, 61882, 61898, 64260 } -Minor.Minor_Sorcery = { 61685, 62799, 62800, 64258 } -Minor.Minor_Vitality = { 32733, 37027, 37031, 37032, 37033, 61549, 61892, 61894, 61896, 63340, 64080, 64081, 64082 } -Minor.Minor_Ward = { 68512, 68513, 68514, 68515, 32761, 61695, 61862, 61863, 61864, 62214, 62216, 62219, 62222, 62619, 62621, 62623, 62625, 62627, 62629, 62631, 62633, 62635, 62638, 62641, 62644, 63571, 63600, 63603, 63607 } -Minor.Minor_Wound = { 70619, 9611, 9612, 10601, 47726, 48346, 54126, 57962 } - -Srendarr.MinorBuffs = {} - -for _, v in pairs( Minor ) do - for _, v2 in pairs( v ) do - Srendarr.MinorBuffs[v2] = true - end -end - --- --------------------------------------------------- --- Major Buffs --------------------------------------- --- --------------------------------------------------- - -local Major = {} -Major.Major_Berserk = { 36973, 37645, 37654, 37663, 48078, 61745, 62195 } -Major.Major_Breach = { 33363, 36972, 36980, 37591, 37599, 37607, 37618, 37627, 37636, 61743, 62485, 62486, 62489, 62491, 63921, 63923, 63925, 64251 } -Major.Major_Brutality = { 68804, 68805, 68806, 68807, 68814, 68815, 68816, 68817, 68845, 68852, 68859, 23673, 33317, 36894, 36903, 37924, 37927, 37930, 37933, 37936, 37939, 37942, 37947, 37952, 45228, 45393, 61665, 61670, 62057, 62058, 62059, 62060, 62063, 62065, 62067, 62147, 62150, 62153, 62156, 62344, 62347, 62350, 62387, 62392, 62396, 62400, 62415, 62425, 62441, 62448, 72936, 63768, 64554, 64555, 68843 } -Major.Major_Defile = { 68163, 68164, 68165, 21927, 24153, 24686, 24702, 24703, 29230, 33399, 36509, 36515, 37511, 37515, 37519, 37523, 37528, 37533, 37538, 37542, 37546, 38686, 38838, 58869, 61727, 62513, 62514, 62515, 62578, 62579, 62580, 63148 } -Major.Major_Endurance = { 68361, 68408, 68797, 68799, 68801, 72935, 32748, 45226, 61705, 61886, 61888, 61889, 62251, 62258, 62265, 62272, 62575, 63681, 63683, 63766, 63789, 68800 } -Major.Major_Evasion = { 69685, 61716, 63015, 63016, 63017, 63018, 63019, 63023, 63026, 63028, 63030, 63036, 63040, 63042 } -Major.Major_Expedition = { 67708, 67714, 67715, 67716, 68793, 68795, 72655, 72657, 72658, 23216, 33210, 33328, 36050, 36946, 36959, 37789, 37793, 37797, 37852, 37859, 37866, 37873, 37881, 37889, 37897, 37906, 37915, 45235, 45399, 61736, 61833, 61838, 61839, 61840, 62181, 62186, 62191, 62249, 62256, 62263, 62270, 62531, 62537, 62540, 62543, 63987, 63993, 63999, 64005, 64012, 64019, 64026, 64566, 64567, 72656 } -Major.Major_Force = { 40225, 61747 } -Major.Major_Fortitude = { 66256, 66702, 68405, 72928, 29011, 40175, 40443, 42285, 42288, 42291, 45222, 61698, 61871, 61872, 61873, 61884, 61885, 61887, 61890, 61891, 61893, 61895, 61897, 62250, 62257, 62264, 62271, 62555, 63670, 63672, 63784 } -Major.Major_Fracture = { 28307, 34734, 36228, 36232, 36236, 48946, 61741, 61909, 61910, 61911, 62470, 62471, 62473, 62474, 62476, 62480, 62482, 62484, 62487, 62488, 62490, 63909, 63912, 63913, 63914, 63915, 63916, 63917, 63918, 63919, 63920, 63922, 63924, 64254 } -Major.Major_Gallop = { 63569 } -Major.Major_Heroism = { 61709, 65133 } -Major.Major_Intellect = { 68133, 68406, 72932, 45224, 61707, 62252, 62259, 62266, 62273, 62577, 63676, 63678, 63771, 63785 } -Major.Major_Maim = { 61725 } -Major.Major_Mangle = { 61734 } -Major.Major_Mending = { 55033, 61711, 61758, 61759, 61760 } -Major.Major_Prophecy = { 40479, 40482, 40486, 42413, 42417, 42421, 42436, 42439, 42442, 42446, 42452, 42458, 47193, 47195, 61689, 61918, 61937, 61940, 61943, 61946, 61950, 61954, 61959, 61963, 61968, 61973, 61978, 62747, 62748, 62749, 62750, 62751, 62752, 62753, 62754, 62755, 62756, 62757, 62758, 63776, 64570, 64572 } -Major.Major_Protection = { 75514, 44854, 44857, 44859, 44860, 44862, 44863, 44864, 44865, 44866, 44867, 44868, 44869, 44871, 44872, 44874, 44876, 61722, 63883, 63899, 63900, 64070, 64071, 64166 } -Major.Major_Resolve = { 66075, 66083, 22236, 44822, 44824, 44826, 44828, 44830, 44832, 44834, 44836, 44839, 44841, 44843, 45234, 45397, 61694, 61815, 61820, 61823, 61825, 61827, 61829, 61831, 61835, 61836, 61841, 61844, 61846, 62159, 62161, 62163, 62165, 62168, 62169, 62171, 62173, 62175, 62179, 62184, 62189, 63084, 63088, 63091, 63116, 63119, 63123, 63127, 63131, 63134, 63137, 63140, 63143, 64564, 64565 } -Major.Major_Savagery = { 26795, 27190, 27194, 27198, 45241, 45466, 61667, 61947, 61951, 61955, 61960, 63242, 63770, 64509, 64568, 64569, 64952 } -Major.Major_Sorcery = { 72933, 45227, 45391, 61687, 62062, 62064, 62066, 62068, 62240, 62241, 62242, 62243, 63223, 63224, 63225, 63226, 63227, 63228, 63229, 63230, 63231, 63232, 63233, 63234, 63774, 64558, 64561 } -Major.Major_Vitality = { 61713, 63533, 63534, 63535, 63536 } -Major.Major_Ward = { 18868, 44820, 44821, 44823, 44825, 44827, 44829, 44831, 44833, 44835, 44838, 44840, 44842, 45076, 45233, 45395, 61696, 61816, 61821, 61824, 61826, 61828, 61830, 61832, 61834, 61837, 61842, 61843, 61845, 62160, 62162, 62164, 62166, 62167, 62170, 62172, 62174, 62176, 62180, 62185, 62190, 63085, 63089, 63092, 63117, 63120, 63124, 63128, 63132, 63135, 63138, 63141, 63144, 64562, 64563 } -Major.Major_Wound = { 46839 } - -Srendarr.MajorBuffs = {} - -for _, v in pairs( Major ) do - for _, v2 in pairs( v ) do - Srendarr.MajorBuffs[v2] = true - end -end \ No newline at end of file diff --git a/Procs.lua b/Procs.lua new file mode 100644 index 0000000..579371b --- /dev/null +++ b/Procs.lua @@ -0,0 +1,98 @@ +local Srendarr = _G['Srendarr'] -- grab addon table from global +local LMP = LibStub('LibMediaProvider-1.0') + +-- UPVALUES -- +local PlaySound = PlaySound + +local procAbilityNames = Srendarr.procAbilityNames +local crystalFragments = Srendarr.crystalFragments -- special case for tracking fragments proc + +local slotData = Srendarr.slotData +local procAnims = {} +local animsEnabled, procSound + + +-- ------------------------ +-- PROC HANDLING +-- ------------------------ +function Srendarr:ProcAnimationStart(slot) + if (animsEnabled and not procAnims[slot].isPlaying) then -- no need to start if already playing + procAnims[slot].loopTexture:SetHidden(false) + procAnims[slot].loop:PlayFromStart() + procAnims[slot].isPlaying = true + + PlaySound(procSound) + end +end + +function Srendarr:ProcAnimationStop(slot) + if (animsEnabled and procAnims[slot].isPlaying) then + procAnims[slot].isPlaying = false + procAnims[slot].loopTexture:SetHidden(true) + procAnims[slot].loop:Stop() + end +end + +function Srendarr:OnCrystalFragmentsProc(onGain) + if (onGain) then + procAbilityNames[crystalFragments] = true + + for slot = 3, 7 do + if (slotData[slot].abilityName == crystalFragments) then + self:ProcAnimationStart(slot) + break + end + end + else + procAbilityNames[crystalFragments] = false + + for slot = 3, 7 do + if (slotData[slot].abilityName == crystalFragments) then + self:ProcAnimationStop(slot) + break + end + end + end +end + + +-- ------------------------ +-- PROC INIT & CONFIG +-- ------------------------ +function Srendarr:ConfigureProcs() + animsEnabled = self.db.procEnableAnims + procSound = LMP:Fetch('sound', self.db.procPlaySound) + + if (not animsEnabled) then -- ensure animations are hidden if not using + for slot = 3, 7 do + procAnims[slot].loopTexture:SetHidden(true) + procAnims[slot].loop:Stop() + end + end +end + +function Srendarr:InitializeProcs() + local button, ctrl + + for slot = 3, 7 do + button = ZO_ActionBar_GetButton(slot) + procAnims[slot] = {} + + ctrl = WINDOW_MANAGER:CreateControl(nil, button.slot, CT_TEXTURE) + ctrl:SetAnchor(TOPLEFT, button.slot:GetNamedChild('FlipCard')) + ctrl:SetAnchor(BOTTOMRIGHT, button.slot:GetNamedChild('FlipCard')) + ctrl:SetTexture([[esoui/art/actionbar/abilityhighlight_mage_med.dds]]) + ctrl:SetBlendMode(TEX_BLEND_MODE_ADD) + ctrl:SetDrawLevel(2) + ctrl:SetHidden(true) + + procAnims[slot].loopTexture = ctrl + + procAnims[slot].loop = ANIMATION_MANAGER:CreateTimelineFromVirtual('UltimateReadyLoop', ctrl) + procAnims[slot].loop:SetHandler('OnStop', function() + procAnims[slot].loopTexture:SetHidden(true) + end) + end + + self:ConfigureProcs() +end diff --git a/Settings.lua b/Settings.lua index 4aa99cd..ae7ad03 100644 --- a/Settings.lua +++ b/Settings.lua @@ -1,930 +1,2098 @@ -local Srendarr = _G['Srendarr'] -- grab addon table from global -local LAM = LibStub('LibAddonMenu-2.0') -local LMP = LibStub('LibMediaProvider-1.0') -local L = Srendarr:GetLocale() +local Srendarr = _G['Srendarr'] -- grab addon table from global +local L = Srendarr:GetLocale() +local LAM = LibStub('LibAddonMenu-2.0') +local LMP = LibStub('LibMediaProvider-1.0') + +-- CONSTS -- +local AURA_STYLE_FULL = Srendarr.AURA_STYLE_FULL +local AURA_STYLE_ICON = Srendarr.AURA_STYLE_ICON +local AURA_STYLE_MINI = Srendarr.AURA_STYLE_MINI + +local AURA_GROW_UP = Srendarr.AURA_GROW_UP +local AURA_GROW_DOWN = Srendarr.AURA_GROW_DOWN +local AURA_GROW_LEFT = Srendarr.AURA_GROW_LEFT +local AURA_GROW_RIGHT = Srendarr.AURA_GROW_RIGHT +local AURA_GROW_CENTERLEFT = Srendarr.AURA_GROW_CENTERLEFT +local AURA_GROW_CENTERRIGHT = Srendarr.AURA_GROW_CENTERRIGHT + +local AURA_TYPE_TIMED = Srendarr.AURA_TYPE_TIMED +local AURA_TYPE_TOGGLED = Srendarr.AURA_TYPE_TOGGLED +local AURA_TYPE_PASSIVE = Srendarr.AURA_TYPE_PASSIVE + +local AURA_SORT_NAMEASC = Srendarr.AURA_SORT_NAMEASC +local AURA_SORT_TIMEASC = Srendarr.AURA_SORT_TIMEASC +local AURA_SORT_CASTASC = Srendarr.AURA_SORT_CASTASC +local AURA_SORT_NAMEDESC = Srendarr.AURA_SORT_NAMEDESC +local AURA_SORT_TIMEDESC = Srendarr.AURA_SORT_TIMEDESC +local AURA_SORT_CASTDESC = Srendarr.AURA_SORT_CASTDESC + +local AURA_TIMERLOC_HIDDEN = Srendarr.AURA_TIMERLOC_HIDDEN +local AURA_TIMERLOC_OVER = Srendarr.AURA_TIMERLOC_OVER +local AURA_TIMERLOC_ABOVE = Srendarr.AURA_TIMERLOC_ABOVE +local AURA_TIMERLOC_BELOW = Srendarr.AURA_TIMERLOC_BELOW + +local GROUP_PLAYER_SHORT = Srendarr.GROUP_PLAYER_SHORT +local GROUP_PLAYER_LONG = Srendarr.GROUP_PLAYER_LONG +local GROUP_PLAYER_TOGGLED = Srendarr.GROUP_PLAYER_TOGGLED +local GROUP_PLAYER_PASSIVE = Srendarr.GROUP_PLAYER_PASSIVE +local GROUP_PLAYER_DEBUFF = Srendarr.GROUP_PLAYER_DEBUFF +local GROUP_PLAYER_GROUND = Srendarr.GROUP_PLAYER_GROUND +local GROUP_PLAYER_MAJOR = Srendarr.GROUP_PLAYER_MAJOR +local GROUP_PLAYER_MINOR = Srendarr.GROUP_PLAYER_MINOR +local GROUP_TARGET_BUFF = Srendarr.GROUP_TARGET_BUFF +local GROUP_TARGET_DEBUFF = Srendarr.GROUP_TARGET_DEBUFF +local GROUP_PROMINENT = Srendarr.GROUP_PROMINENT -- UPVALUES -- -local WM = GetWindowManager() -local CM = CALLBACK_MANAGER -local tinsert = table.insert -local tsort = table.sort - --- DROPDOWN SETINGS -- -local dropGrowth = {L.DropGrowth1, L.DropGrowth2, L.DropGrowth3, L.DropGrowth4, L.DropGrowth5, L.DropGrowth6} -local dropGrowthRef = {[L.DropGrowth1] = 'UP', [L.DropGrowth2] = 'DOWN', [L.DropGrowth3] = 'LEFT', [L.DropGrowth4] = 'LEFTCENTER', [L.DropGrowth5] = 'RIGHT', [L.DropGrowth6] = 'RIGHTCENTER', - ['UP'] = L.DropGrowth1, ['DOWN'] = L.DropGrowth2, ['LEFT'] = L.DropGrowth3, ['LEFTCENTER'] = L.DropGrowth4, ['RIGHT'] = L.DropGrowth5, ['RIGHTCENTER'] = L.DropGrowth6} -local dropSort = {L.DropSort1, L.DropSort2} -local dropSortRef = {[L.DropSort1] = 'TIME', [L.DropSort2] = 'NAME', ['TIME'] = L.DropSort1, ['NAME'] = L.DropSort2} -local dropTimerHorz = {L.DropTimer1, L.DropTimer2, L.DropTimer3, L.DropTimer4} -local dropTimerVert = {L.DropTimer1, L.DropTimer4} -local dropTimerRef = {[L.DropTimer1] = 'OVER', [L.DropTimer2] = 'BELOW', [L.DropTimer3] = 'ABOVE', [L.DropTimer4] = 'HIDE', - ['OVER'] = L.DropTimer1, ['BELOW'] = L.DropTimer2, ['ABOVE'] = L.DropTimer3, ['HIDE'] = L.DropTimer4} - -local playerSettingsList = {} -local playerSettingCopyFrom - -local tabButtons = false -local tabPanels = {} -local lastAddedControl = {} -local examplesShown = false -local controlPanel - --- PROFILE FUNCTIONS -- +local WM = GetWindowManager() +local CM = CALLBACK_MANAGER +local tinsert = table.insert +local tremove = table.remove +local tsort = table.sort +local strformat = string.format + +-- DROPDOWN CHOICES -- +local dropProminentAuras = {} + +local dropBlacklistAuras = {} + +local dropGroup = {L.DropGroup_1, L.DropGroup_2, L.DropGroup_3, L.DropGroup_4, L.DropGroup_5, L.DropGroup_6, L.DropGroup_7, L.DropGroup_8, L.DropGroup_None} +local dropGroupRef = {[L.DropGroup_1] = 1, [L.DropGroup_2] = 2, [L.DropGroup_3] = 3, [L.DropGroup_4] = 4, [L.DropGroup_5] = 5, [L.DropGroup_6] = 6, [L.DropGroup_7] = 7, [L.DropGroup_8] = 8, [L.DropGroup_None] = 0} + +local dropStyle = {L.DropStyle_Full, L.DropStyle_Icon, L.DropStyle_Mini} +local dropStyleRef = {[L.DropStyle_Full] = AURA_STYLE_FULL, [L.DropStyle_Icon] = AURA_STYLE_ICON, [L.DropStyle_Mini] = AURA_STYLE_MINI} + +local dropGrowthFullMini = {L.DropGrowth_Up, L.DropGrowth_Down} +local dropGrowthIcon = {L.DropGrowth_Up, L.DropGrowth_Down, L.DropGrowth_Left, L.DropGrowth_Right, L.DropGrowth_CenterLeft, L.DropGrowth_CenterRight} +local dropGrowthRef = {[L.DropGrowth_Up] = AURA_GROW_UP, [L.DropGrowth_Down] = AURA_GROW_DOWN, [L.DropGrowth_Left] = AURA_GROW_LEFT, [L.DropGrowth_Right] = AURA_GROW_RIGHT, [L.DropGrowth_CenterLeft] = AURA_GROW_CENTERLEFT, [L.DropGrowth_CenterRight] = AURA_GROW_CENTERRIGHT} + +local dropSort = {L.DropSort_NameAsc, L.DropSort_TimeAsc, L.DropSort_CastAsc, L.DropSort_NameDesc, L.DropSort_TimeDesc, L.DropSort_CastDesc} +local dropSortRef = {[L.DropSort_NameAsc] = AURA_SORT_NAMEASC, [L.DropSort_TimeAsc] = AURA_SORT_TIMEASC, [L.DropSort_CastAsc] = AURA_SORT_CASTASC, [L.DropSort_NameDesc] = AURA_SORT_NAMEDESC, [L.DropSort_TimeDesc] = AURA_SORT_TIMEDESC, [L.DropSort_CastDesc] = AURA_SORT_CASTDESC} + +local dropTimerFull = {L.DropTimer_Hidden, L.DropTimer_Over} +local dropTimerIcon = {L.DropTimer_Hidden, L.DropTimer_Over, L.DropTimer_Above, L.DropTimer_Below} +local dropTimerRef = {[L.DropTimer_Hidden] = AURA_TIMERLOC_HIDDEN, [L.DropTimer_Over] = AURA_TIMERLOC_OVER, [L.DropTimer_Above] = AURA_TIMERLOC_ABOVE, [L.DropTimer_Below] = AURA_TIMERLOC_BELOW} + +local dropFontStyle = {'none', 'outline', 'thin-outline', 'thick-outline', 'shadow', 'soft-shadow-thin', 'soft-shadow-thick'} + +local tabButtons = {} +local tabPanels = {} +local tabDisplayWidgetRef = {} -- reference to widgets of the DisplayFrame settings for manipulation +local lastAddedControl = {} +local settingsGlobalStr = strformat('%s_%s', Srendarr.name, 'Settings') +local settingsGlobalStrBtns = strformat('%s_%s', settingsGlobalStr, 'TabButtons') +local currentDisplayFrame = 1 -- set that the display frame settings refer to the given display frame ID +local controlPanel, controlPanelWidth, tabButtonsPanel, displayDB, tabPanelData +local prominentAurasWidgetRef, prominentAurasSelectedAura +local blacklistAurasWidgetRef, blacklistAurasSelectedAura + +local profileGuard = false +local profileCopyList = {} +local profileDeleteList = {} +local profileCopyToCopy, profileDeleteToDelete, profileDeleteDropRef + +local sampleAurasActive = false + + +-- ------------------------ +-- SAMPLE AURAS +-- ------------------------ +local sampleAuraData = { + -- player timed + [116001] = {auraName = strformat('%s %d', L.SampleAura_PlayerTimed, 1), unitTag = 'player', duration = 10, icon = [[/esoui/art/icons/ability_destructionstaff_001.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116002] = {auraName = strformat('%s %d', L.SampleAura_PlayerTimed, 2), unitTag = 'player', duration = 20, icon = [[/esoui/art/icons/ability_destructionstaff_002.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116003] = {auraName = strformat('%s %d', L.SampleAura_PlayerTimed, 3), unitTag = 'player', duration = 30, icon = [[/esoui/art/icons/ability_destructionstaff_003.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116004] = {auraName = strformat('%s %d', L.SampleAura_PlayerTimed, 4), unitTag = 'player', duration = 60, icon = [[/esoui/art/icons/ability_destructionstaff_004.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116005] = {auraName = strformat('%s %d', L.SampleAura_PlayerTimed, 5), unitTag = 'player', duration = 120, icon = [[/esoui/art/icons/ability_destructionstaff_005.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116006] = {auraName = strformat('%s %d', L.SampleAura_PlayerTimed, 6), unitTag = 'player', duration = 600, icon = [[/esoui/art/icons/ability_destructionstaff_006.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + -- player toggled + [116007] = {auraName = strformat('%s %d', L.SampleAura_PlayerToggled, 1), unitTag = 'player', duration = 0, icon = [[esoui/art/icons/ability_mageguild_001.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116008] = {auraName = strformat('%s %d', L.SampleAura_PlayerToggled, 2), unitTag = 'player', duration = 0, icon = [[esoui/art/icons/ability_mageguild_002.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + -- player passive + [116009] = {auraName = strformat('%s %d', L.SampleAura_PlayerPassive, 1), unitTag = 'player', duration = 0, icon = [[esoui/art/icons/ability_restorationstaff_001.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116010] = {auraName = strformat('%s %d', L.SampleAura_PlayerPassive, 2), unitTag = 'player', duration = 0, icon = [[esoui/art/icons/ability_restorationstaff_002.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + -- player debuff + [116011] = {auraName = strformat('%s %d', L.SampleAura_PlayerDebuff, 1), unitTag = 'player', duration = 10, icon = [[esoui/art/icons/ability_nightblade_001.dds]], effectType = BUFF_EFFECT_TYPE_DEBUFF, abilityType = ABILITY_TYPE_BONUS}, + [116012] = {auraName = strformat('%s %d', L.SampleAura_PlayerDebuff, 2), unitTag = 'player', duration = 30, icon = [[esoui/art/icons/ability_nightblade_002.dds]], effectType = BUFF_EFFECT_TYPE_DEBUFF, abilityType = ABILITY_TYPE_BONUS}, + -- player ground (co opting the abilityID of ranks 2 and 3 of Path of Darkness to bypass the description check + [37751] = {auraName = strformat('%s %d', L.SampleAura_PlayerGround, 1), unitTag = '', duration = 10, icon = [[/esoui/art/icons/ability_destructionstaff_008.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_AREAEFFECT}, + [37757] = {auraName = strformat('%s %d', L.SampleAura_PlayerGround, 2), unitTag = '', duration = 30, icon = [[/esoui/art/icons/ability_destructionstaff_011.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_AREAEFFECT}, + -- player major|minor buffs (co opting abilityIDs from existing spells to properly filter the samples + [62175] = {auraName = strformat('%s %d', L.SampleAura_PlayerMajor, 1), unitTag = 'player', duration = 30, icon = [[/esoui/art/icons/ability_sorcerer_boundless_storm.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [61898] = {auraName = strformat('%s %d', L.SampleAura_PlayerMinor, 1), unitTag = 'player', duration = 30, icon = [[/esoui/art/icons/ability_sorcerer_boundless_storm.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + -- target buff (2 timeds and 1 passive) + [116015] = {auraName = strformat('%s %d', L.SampleAura_TargetBuff, 1), unitTag = 'reticleover', duration = 10, icon = [[esoui/art/icons/ability_restorationstaff_004.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116016] = {auraName = strformat('%s %d', L.SampleAura_TargetBuff, 2), unitTag = 'reticleover', duration = 30, icon = [[esoui/art/icons/ability_restorationstaff_005.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + [116017] = {auraName = strformat('%s %d', L.SampleAura_TargetBuff, 3), unitTag = 'reticleover', duration = 0, icon = [[/esoui/art/icons/ability_armor_001.dds]], effectType = BUFF_EFFECT_TYPE_BUFF, abilityType = ABILITY_TYPE_BONUS}, + -- target debuff + [116018] = {auraName = strformat('%s %d', L.SampleAura_TargetDebuff, 1), unitTag = 'reticleover', duration = 10, icon = [[esoui/art/icons/ability_nightblade_003.dds]], effectType = BUFF_EFFECT_TYPE_DEBUFF, abilityType = ABILITY_TYPE_BONUS}, + [116019] = {auraName = strformat('%s %d', L.SampleAura_TargetDebuff, 2), unitTag = 'reticleover', duration = 30, icon = [[esoui/art/icons/ability_nightblade_004.dds]], effectType = BUFF_EFFECT_TYPE_DEBUFF, abilityType = ABILITY_TYPE_BONUS}, +} + +local function ShowSampleAuras() + for _, fragment in pairs(Srendarr.displayFramesScene) do + SCENE_MANAGER:AddFragment(fragment) -- make sure displayframes are visible while in the options panel + end + + Srendarr.OnPlayerActivatedAlive() -- reset to a clean slate + + local current = GetGameTimeMilliseconds() / 1000 + + for id, data in pairs(sampleAuraData) do + Srendarr.OnEffectChanged(nil, EFFECT_RESULT_GAINED, nil, data.auraName, data.unitTag, current, current + data.duration, nil, data.icon, nil, data.effectType, data.abilityType, nil, nil, nil, id) + end +end + + +-- ------------------------ +-- PROFILE FUNCTIONS +-- ------------------------ local function CopyTable(src, dest) - if type(dest) ~= 'table' then dest = {} end - if type(src) == 'table' then - for k, v in pairs(src) do - if type(v) == 'table' then - CopyTable(v, dest[k]) - end - - dest[k] = v - end - end + if (type(dest) ~= 'table') then + dest = {} + end + + if (type(src) == 'table') then + for k, v in pairs(src) do + if (type(v) == 'table') then + CopyTable(v, dest[k]) + end + + dest[k] = v + end + end end -local function CopySettingsFrom(src) - local srcData, destData - local dest = GetUnitName('player') +local function CopyProfile() + local usingGlobal = SrendarrDB.Default[GetDisplayName()]['$AccountWide'].useAccountWide + local destProfile = (usingGlobal) and '$AccountWide' or GetUnitName('player') + local sourceData, destData + + for account, accountData in pairs(SrendarrDB.Default) do + for profile, data in pairs(accountData) do + if (profile == profileCopyToCopy) then + sourceData = data -- get source data to copy + end - for account, accountData in pairs(SrendarrDB.Default) do - for character, data in pairs(accountData) do - if (character == src and data.version == 2) then -- source character data - srcData = data - end + if (profile == destProfile) then + destData = data -- get destination to copy to + end + end + end - if (character == dest) then -- dest character data (current character) - destData = data - end - end - end + if (not sourceData or not destData) then -- something went wrong, abort + CHAT_SYSTEM:AddMessage(strformat('%s: %s', L.Srendarr, L.Profile_CopyCannotCopy)) + else + CopyTable(sourceData, destData) + ReloadUI() + end +end - if (not srcData or not destData) then - d(Srendarr.name .. ': Unable to find character settings to copy!') - return - end +local function DeleteProfile() + for account, accountData in pairs(SrendarrDB.Default) do + for profile, data in pairs(accountData) do + if (profile == profileDeleteToDelete) then -- found unwanted profile + accountData[profile] = nil + break + end + end + end - CopyTable(srcData, destData) -- copy settings + for i, profile in ipairs(profileDeleteList) do + if (profile == profileDeleteToDelete) then + tremove(profileDeleteList, i) + break + end + end - ReloadUI() -- reloadui to re-initialize + profileDeleteToDelete = false + profileDeleteDropRef:UpdateChoices() + profileDeleteDropRef:UpdateValue() end -local function GeneratePlayerList() - local current = GetUnitName('player') +local function PopulateProfileLists() + local usingGlobal = SrendarrDB.Default[GetDisplayName()]['$AccountWide'].useAccountWide + local currentPlayer = GetUnitName('player') + local versionDB = Srendarr.versionDB - for account, accountData in pairs(SrendarrDB.Default) do - for player, data in pairs (accountData) do - if (data.version == 2 and player ~= current) then -- only copy 2.X settings, ignore 1.X (and current character) - tinsert(playerSettingsList, player) - end - end - end + for account, accountData in pairs(SrendarrDB.Default) do + for profile, data in pairs(accountData) do + if (data.version == versionDB) then -- only populate current DB version + if (usingGlobal) then + if (profile ~= '$AccountWide') then + tinsert(profileCopyList, profile) -- don't add accountwide to copy selection + tinsert(profileDeleteList, profile) -- don't add accountwide to delete selection + end + else + if (profile ~= currentPlayer) then + tinsert(profileCopyList, profile) -- don't add current player to copy selection - tsort(playerSettingsList) + if (profile ~= '$AccountWide') then + tinsert(profileDeleteList, profile) -- don't add accountwide or current player to delete selection + end + end + end + end + end + end + + tsort(profileCopyList) + tsort(profileDeleteList) end -local function CreateWidgets(id, panelData) - local panel = tabPanels[id] - local isLastHalf = false - local anchorOffset = 0 - - for _, widgetData in pairs(panelData) do - local widgetType = widgetData.type - local widget = LAMCreateControl[widgetType](panel, widgetData) - local isHalf = widgetData.width == "half" - - if isLastHalf and isHalf then - widget:SetAnchor(TOPLEFT, lastAddedControl[id], TOPRIGHT, 10, 0) - anchorOffset = zo_max(0, widget:GetHeight() - lastAddedControl[id]:GetHeight()) - isLastHalf = false - else - widget:SetAnchor(TOPLEFT, lastAddedControl[id], BOTTOMLEFT, 0, 15 + anchorOffset) - anchorOffset = 0 - isLastHalf = isHalf - lastAddedControl[id] = widget - end - end + +-- ------------------------ +-- PANEL CONSTRUCTION +-- ------------------------ +local function PopulateProminentAurasDropdown() + for i in pairs(dropProminentAuras) do + dropProminentAuras[i] = nil -- clean out dropdown + end + + tinsert(dropProminentAuras, L.GenericSetting_ClickToViewAuras) -- insert 'dummy' first entry + + for name in pairs(Srendarr.db.prominentWhitelist) do + tinsert(dropProminentAuras, name) -- add current aura selection + end + + prominentAurasWidgetRef:UpdateChoices() + prominentAurasWidgetRef:UpdateValue() end -local function BuildTabWindow(id) - local panelData = { - -- ---------------------------- - -- Base Window ---------------- - -- ---------------------------- - { - type = "slider", - name = L.WindowAlpha, - tooltip = L.WindowAlphaTip, - min = 5, - max = 100, - step = 5, - getFunc = function() return Srendarr.db.frames[id].alpha * 100 end, - setFunc = function(alpha) - Srendarr.db.frames[id].alpha = alpha / 100 - Srendarr.auraFrames[id]:SetAlpha(alpha / 100) - end, - }, - { - type = "slider", - name = L.WindowScale, - tooltip = L.WindowScaleTip, - min = 50, - max = 200, - step = 5, - getFunc = function() return Srendarr.db.frames[id].scale * 100 end, - setFunc = function(scale) - Srendarr.db.frames[id].scale = scale / 100 - Srendarr.auraAnchors[id]:SetScale(scale / 100) - end, - }, - { - type = "dropdown", - name = L.WindowGrowth, - tooltip = L.WindowGrowthTip, - choices = dropGrowth, - getFunc = function() return dropGrowthRef[Srendarr.db.frames[id].auraGrowth] end, - setFunc = function(arg) - Srendarr.db.frames[id].auraGrowth = dropGrowthRef[arg] - Srendarr.auraAnchors[id]:ConfigureDragOverlay() - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr.auraFrames[id]:ConfigureUpdateDisplay() - Srendarr:ShowExampleAuras() - end, - }, - { - type = "slider", - name = L.WindowPadding, - tooltip = L.WindowPaddingTip, - min = 0, - max = 24, - getFunc = function() return Srendarr.db.frames[id].auraPadding end, - setFunc = function(padding) - Srendarr.db.frames[id].auraPadding = padding - Srendarr.auraFrames[id]:ConfigureUpdateDisplay() - Srendarr:ShowExampleAuras() - end, - }, - { - type = "dropdown", - name = L.WindowSort, - tooltip = L.WindowSortTip, - choices = dropSort, - getFunc = function() return dropSortRef[Srendarr.db.frames[id].auraSort] end, - setFunc = function(arg) - Srendarr.db.frames[id].auraSort = dropSortRef[arg] - Srendarr.auraFrames[id]:ConfigureUpdateDisplay() - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.WindowIconOn, - tooltip = L.WindowIconOnTip, - getFunc = function() return Srendarr.db.frames[id].auraIconOnRight end, - setFunc = function(value) - Srendarr.db.frames[id].auraIconOnRight = value - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - }, - { - type = "checkbox", - name = L.WindowShowNameBar, - tooltip = L.WindowShowNameBarTip, - getFunc = function() return Srendarr.db.frames[id].showNameBar end, - setFunc = function(value) - Srendarr.db.frames[id].showNameBar = value - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - }, - { - type = "checkbox", - name = L.WindowTooltips, - tooltip = L.WindowTooltipsTip, - getFunc = function() return Srendarr.db.frames[id].tooltips end, - setFunc = function(value) - Srendarr.db.frames[id].tooltips = value - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - }, - -- ---------------------------- - -- Name Label ----------------- - -- ---------------------------- - { - type = "header", - name = L.WindowNameHeader, - }, - { - type = "fontblock", - name = L.WindowNameFont, - getFace = function() return Srendarr.db.frames[id].nameFont end, - getSize = function() return Srendarr.db.frames[id].nameSize end, - getOutline = function() return Srendarr.db.frames[id].nameOutline end, - getColor = function() return Srendarr.db.frames[id].nameColour.r, Srendarr.db.frames[id].nameColour.g, Srendarr.db.frames[id].nameColour.b end, - setFace = function(font) - Srendarr.db.frames[id].nameFont = font - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - setSize = function(size) - Srendarr.db.frames[id].nameSize = size - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - setOutline = function(outline) - Srendarr.db.frames[id].nameOutline = outline - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - setColor = function(r, g, b) - Srendarr.db.frames[id].nameColour.r = r - Srendarr.db.frames[id].nameColour.g = g - Srendarr.db.frames[id].nameColour.b = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - }, - -- ---------------------------- - -- Timer Label ---------------- - -- ---------------------------- - { - type = "header", - name = L.WindowTimerHeader, - }, - { - type = "checkbox", - name = L.WindowTimerShowTP, - tooltip = L.WindowTimerShowTPTip, - getFunc = function() return Srendarr.db.frames[id].timerShowTP end, - setFunc = function(value) - Srendarr.db.frames[id].timerShowTP = value - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - }, - { - type = "dropdown", - name = L.WindowTimerHorz, - tooltip = L.WindowTimerHorzTip, - choices = dropTimerHorz, - getFunc = function() return dropTimerRef[Srendarr.db.frames[id].timerShowHorz] end, - setFunc = function(arg) - Srendarr.db.frames[id].timerShowHorz = dropTimerRef[arg] - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - }, - { - type = "dropdown", - name = L.WindowTimerVert, - tooltip = L.WindowTimerVertTip, - choices = dropTimerVert, - getFunc = function() return dropTimerRef[Srendarr.db.frames[id].timerShowVert] end, - setFunc = function(arg) - Srendarr.db.frames[id].timerShowVert = dropTimerRef[arg] - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - }, - { - type = "fontblock", - name = L.WindowTimerFont, - getFace = function() return Srendarr.db.frames[id].timerFont end, - getSize = function() return Srendarr.db.frames[id].timerSize end, - getOutline = function() return Srendarr.db.frames[id].timerOutline end, - getColor = function() return Srendarr.db.frames[id].timerColour.r, Srendarr.db.frames[id].timerColour.g, Srendarr.db.frames[id].timerColour.b end, - setFace = function(font) - Srendarr.db.frames[id].timerFont = font - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - setSize = function(size) - Srendarr.db.frames[id].timerSize = size - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - setOutline = function(outline) - Srendarr.db.frames[id].timerOutline = outline - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - setColor = function(r, g, b) - Srendarr.db.frames[id].timerColour.r = r - Srendarr.db.frames[id].timerColour.g = g - Srendarr.db.frames[id].timerColour.b = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - }, - -- ---------------------------- - -- Status Bar ----------------- - -- ---------------------------- - { - type = "header", - name = L.WindowBarHeader - }, - { - type = "checkbox", - name = L.WindowBarGloss, - tooltip = L.WindowBarGlossTip, - getFunc = function() return Srendarr.db.frames[id].barGloss end, - setFunc = function(value) - Srendarr.db.frames[id].barGloss = value - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - }, - { - type = "slider", - name = L.WindowBarWidth, - tooltip = L.WindowBarWidthTip, - min = 40, - max = 240, - step = 5, - getFunc = function() return Srendarr.db.frames[id].barWidth end, - setFunc = function(width) - Srendarr.db.frames[id].barWidth = width - Srendarr.auraFrames[id]:ConfigureAllAuras() - end, - }, - { - type = "doublecolor", - name = L.WindowBarTimed, - tooltip = L.WindowBarTimedTip, - getFuncA = function() return Srendarr.db.frames[id].barColours.timed.r2, Srendarr.db.frames[id].barColours.timed.g2, Srendarr.db.frames[id].barColours.timed.b2 end, - getFuncB = function() return Srendarr.db.frames[id].barColours.timed.r1, Srendarr.db.frames[id].barColours.timed.g1, Srendarr.db.frames[id].barColours.timed.b1 end, - setFuncA = function(r, g, b) - Srendarr.db.frames[id].barColours.timed.r2 = r - Srendarr.db.frames[id].barColours.timed.g2 = g - Srendarr.db.frames[id].barColours.timed.b2 = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - setFuncB = function(r, g, b) - Srendarr.db.frames[id].barColours.timed.r1 = r - Srendarr.db.frames[id].barColours.timed.g1 = g - Srendarr.db.frames[id].barColours.timed.b1 = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - }, - { - type = "doublecolor", - name = L.WindowBarToggle, - tooltip = L.WindowBarToggleTip, - getFuncA = function() return Srendarr.db.frames[id].barColours.toggle.r2, Srendarr.db.frames[id].barColours.toggle.g2, Srendarr.db.frames[id].barColours.toggle.b2 end, - getFuncB = function() return Srendarr.db.frames[id].barColours.toggle.r1, Srendarr.db.frames[id].barColours.toggle.g1, Srendarr.db.frames[id].barColours.toggle.b1 end, - setFuncA = function(r, g, b) - Srendarr.db.frames[id].barColours.toggle.r2 = r - Srendarr.db.frames[id].barColours.toggle.g2 = g - Srendarr.db.frames[id].barColours.toggle.b2 = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - setFuncB = function(r, g, b) - Srendarr.db.frames[id].barColours.toggle.r1 = r - Srendarr.db.frames[id].barColours.toggle.g1 = g - Srendarr.db.frames[id].barColours.toggle.b1 = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - }, - { - type = "doublecolor", - name = L.WindowBarPassive, - tooltip = L.WindowBarPassiveTip, - getFuncA = function() return Srendarr.db.frames[id].barColours.passive.r2, Srendarr.db.frames[id].barColours.passive.g2, Srendarr.db.frames[id].barColours.passive.b2 end, - getFuncB = function() return Srendarr.db.frames[id].barColours.passive.r1, Srendarr.db.frames[id].barColours.passive.g1, Srendarr.db.frames[id].barColours.passive.b1 end, - setFuncA = function(r, g, b) - Srendarr.db.frames[id].barColours.passive.r2 = r - Srendarr.db.frames[id].barColours.passive.g2 = g - Srendarr.db.frames[id].barColours.passive.b2 = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - setFuncB = function(r, g, b) - Srendarr.db.frames[id].barColours.passive.r1 = r - Srendarr.db.frames[id].barColours.passive.g1 = g - Srendarr.db.frames[id].barColours.passive.b1 = b - Srendarr.auraFrames[id]:ConfigureAllAuras() - Srendarr:ShowExampleAuras() - end, - }, - } - - CreateWidgets(id + 1, panelData) +local function PopulateBlacklistAurasDropdown() + for i in pairs(dropBlacklistAuras) do + dropBlacklistAuras[i] = nil -- clean out dropdown + end + + tinsert(dropBlacklistAuras, L.GenericSetting_ClickToViewAuras) -- insert 'dummy' first entry + + for name in pairs(Srendarr.db.blacklist) do + tinsert(dropBlacklistAuras, name) -- add current aura selection + end + + blacklistAurasWidgetRef:UpdateChoices() + blacklistAurasWidgetRef:UpdateValue() end -local function BuildTabGeneral(id) - local panelData = { - { - type ="description", - text = L.GeneralAnchorDesc, - }, - { - type = "button", - name = L.GeneralAnchorReset, - func = function() - Srendarr.auraAnchors[1]:ClearAnchors() - Srendarr.auraAnchors[1]:SetAnchor(BOTTOMRIGHT, GuiRoot, BOTTOMRIGHT, 0, 0) - Srendarr.db.frames[1].anchor.point = BOTTOMRIGHT - Srendarr.db.frames[1].anchor.x = 0 - Srendarr.db.frames[1].anchor.y = 0 - Srendarr.auraAnchors[2]:ClearAnchors() - Srendarr.auraAnchors[2]:SetAnchor(BOTTOMRIGHT, GuiRoot, BOTTOMRIGHT, -210, 0) - Srendarr.db.frames[2].anchor.point = BOTTOMRIGHT - Srendarr.db.frames[2].anchor.x = -210 - Srendarr.db.frames[2].anchor.y = 0 - Srendarr.auraAnchors[3]:ClearAnchors() - Srendarr.auraAnchors[3]:SetAnchor(TOPRIGHT, GuiRoot, TOPRIGHT, 0, 0) - Srendarr.db.frames[3].anchor.point = TOPRIGHT - Srendarr.db.frames[3].anchor.x = 0 - Srendarr.db.frames[3].anchor.y = 0 - Srendarr.auraAnchors[4]:ClearAnchors() - Srendarr.auraAnchors[4]:SetAnchor(TOP, GuiRoot, TOP, 161, 88) - Srendarr.db.frames[4].anchor.point = TOP - Srendarr.db.frames[4].anchor.x = 161 - Srendarr.db.frames[4].anchor.y = 88 - Srendarr.auraAnchors[5]:ClearAnchors() - Srendarr.auraAnchors[5]:SetAnchor(TOP, GuiRoot, TOP, 200, 88) - Srendarr.db.frames[5].anchor.point = TOP - Srendarr.db.frames[5].anchor.x = 200 - Srendarr.db.frames[5].anchor.y = 88 - end, - width = "half", - }, - { - type = "button", - name = L.GeneralAnchorUnlock, - func = function(lockBtn) - if (Srendarr.ui_Locked) then - Srendarr.SlashCommand('unlock') - lockBtn:SetText(L.GeneralAnchorLock) - else - Srendarr.SlashCommand('lock') - lockBtn:SetText(L.GeneralAnchorUnlock) - end - end, - width = "half", - }, - -- ---------------------------- - -- Aura Controls -------------- - -- ---------------------------- - { - type = "header", - name = "", -- blank header just to add a nice dividing line - }, - { - type = "checkbox", - name = L.GeneralOnlyCombat, - tooltip = L.GeneralOnlyCombatTip, - getFunc = function() return Srendarr.db.onlyInCombat end, - setFunc = function(value) - Srendarr.db.onlyInCombat = value - Srendarr.OnCombatState(nil, IsUnitInCombat("player")) - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralCombine, - tooltip = L.GeneralCombineTip, - getFunc = function() return Srendarr.db.combineBuff end, - setFunc = function(value) - Srendarr.db.combineBuff = value - Srendarr:ConfigureEvents() - - if (not Srendarr.ui_Locked) then -- ui currently unlocked - Srendarr.auraAnchors[1]:ConfigureDragOverlay() - - if (Srendarr.db.combineBuff) then -- auras combined, hide 2 overlay - Srendarr.auraAnchors[2]:DisableDrag() - else - Srendarr.auraAnchors[2]:EnableDrag() - end - end - - Srendarr:ShowExampleAuras() - end, - }, - { - type = "slider", - name = L.GeneralThreshold, - tooltip = L.GeneralThresholdTip, - min = 30, - max = 120, - getFunc = function() return Srendarr.db.shortBuffThreshold end, - setFunc = function(value) - Srendarr.db.shortBuffThreshold = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralTarget, - tooltip = L.GeneralTargetTip, - getFunc = function() return Srendarr.db.showTargetAuras end, - setFunc = function(value) - Srendarr.db.showTargetAuras = value - Srendarr:ConfigureEvents() - - if (not Srendarr.ui_Locked) then -- ui currently unlocked - Srendarr.auraAnchors[4]:ConfigureDragOverlay() - - if (Srendarr.db.showTargetAuras) then -- showing - Srendarr.auraAnchors[4]:EnableDrag() - else - Srendarr.auraAnchors[4]:DisableDrag() - end - end - - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralTargetDebuff, - tooltip = L.GeneralTargetTip, - getFunc = function() return Srendarr.db.showTargetAurasDebuff end, - setFunc = function(value) - Srendarr.db.showTargetAurasDebuff = value - Srendarr:ConfigureEvents() - - if (not Srendarr.ui_Locked) then -- ui currently unlocked - Srendarr.auraAnchors[5]:ConfigureDragOverlay() - - if (Srendarr.db.showTargetAurasDebuff) then -- showing - Srendarr.auraAnchors[5]:EnableDrag() - else - Srendarr.auraAnchors[5]:DisableDrag() - end - end - - Srendarr:ShowExampleAuras() - end, - warning = L.GeneralDebuffWarn, - }, - { - type = "checkbox", - name = L.GeneralDebuff, - tooltip = L.GeneralDebuffTip, - getFunc = function() return Srendarr.db.showDebuff end, - setFunc = function(value) - Srendarr.db.showDebuff = value - Srendarr.OnActionSlotsFullUpdate() - Srendarr:ShowExampleAuras() - end, - warning = L.GeneralDebuffWarn, - }, - { - type = "checkbox", - name = L.GeneralMinorBuffs, - tooltip = L.GeneralMinorBuffsTip, - getFunc = function() return Srendarr.db.hideMinorBuffs end, - setFunc = function(value) - Srendarr.db.hideMinorBuffs = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralMajorBuffs, - tooltip = L.GeneralMajorBuffsTip, - getFunc = function() return Srendarr.db.hideMajorBuffs end, - setFunc = function(value) - Srendarr.db.hideMajorBuffs = value - Srendarr:ShowExampleAuras() - end, - }, - -- ---------------------------- - -- Aura Filters: Player ------- - -- ---------------------------- - { - type = "header", - name = L.GeneralHeaderFiltersPlayer, - }, - { - type = "checkbox", - name = L.GeneralSoulSummons, - tooltip = L.GeneralSoulSummonsTip, - getFunc = function() return Srendarr.db.showSoulSummons end, - setFunc = function(value) - Srendarr.db.showSoulSummons = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralToggle, - tooltip = L.GeneralToggleTip, - getFunc = function() return Srendarr.db.showToggle end, - setFunc = function(value) - Srendarr.db.showToggle = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralPassive, - tooltip = L.GeneralPassiveTip, - getFunc = function() return Srendarr.db.showPassive end, - setFunc = function(value) - Srendarr.db.showPassive = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralCyrodiil, - tooltip = L.GeneralCyrodiilTip, - getFunc = function() return Srendarr.db.showCyrodiil end, - setFunc = function(value) - Srendarr.db.showCyrodiil = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralDisguise, - tooltip = L.GeneralDisguiseTip, - getFunc = function() return Srendarr.db.showDisguise end, - setFunc = function(value) - Srendarr.db.showDisguise = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralAllEffects, - tooltip = L.GeneralAllEffectsTip, - getFunc = function() return Srendarr.db.showAllEffects end, - setFunc = function(value) - Srendarr.db.showAllEffects = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralMundus, - tooltip = L.GeneralMundusTip, - getFunc = function() return Srendarr.db.showMundus end, - setFunc = function(value) - Srendarr.db.showMundus = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralVampLycan, - tooltip = L.GeneralVampLycanTip, - getFunc = function() return Srendarr.db.showVampLycan end, - setFunc = function(value) - Srendarr.db.showVampLycan = value - Srendarr:ShowExampleAuras() - end, - }, - -- ---------------------------- - -- Aura Filters: Target ------- - -- ---------------------------- - { - type = "header", - name = L.GeneralHeaderFiltersTarget, - }, - { - type = "checkbox", - name = L.GeneralSoulSummons, - tooltip = L.GeneralSoulSummonsTip, - getFunc = function() return Srendarr.db.showSoulSummonsTarget end, - setFunc = function(value) - Srendarr.db.showSoulSummonsTarget = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralToggle, - tooltip = L.GeneralToggleTip, - getFunc = function() return Srendarr.db.showToggleTarget end, - setFunc = function(value) - Srendarr.db.showToggleTarget = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralPassive, - tooltip = L.GeneralPassiveTip, - getFunc = function() return Srendarr.db.showPassiveTarget end, - setFunc = function(value) - Srendarr.db.showPassiveTarget = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralCyrodiil, - tooltip = L.GeneralCyrodiilTip, - getFunc = function() return Srendarr.db.showCyrodiilTarget end, - setFunc = function(value) - Srendarr.db.showCyrodiilTarget = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralDisguise, - tooltip = L.GeneralDisguiseTip, - getFunc = function() return Srendarr.db.showDisguiseTarget end, - setFunc = function(value) - Srendarr.db.showDisguiseTarget = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralAllEffects, - tooltip = L.GeneralAllEffectsTip, - getFunc = function() return Srendarr.db.showAllEffectsTarget end, - setFunc = function(value) - Srendarr.db.showAllEffectsTarget = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralMundus, - tooltip = L.GeneralMundusTip, - getFunc = function() return Srendarr.db.showMundusTarget end, - setFunc = function(value) - Srendarr.db.showMundusTarget = value - Srendarr:ShowExampleAuras() - end, - }, - { - type = "checkbox", - name = L.GeneralVampLycan, - tooltip = L.GeneralVampLycanTip, - getFunc = function() return Srendarr.db.showVampLycanTarget end, - setFunc = function(value) - Srendarr.db.showVampLycanTarget = value - Srendarr:ShowExampleAuras() - end, - }, - } - - CreateWidgets(id, panelData) +local function CreateWidgets(panelID, panelData) + local panel = tabPanels[panelID] + local isLastHalf = false + local anchorOffset = 0 + + for entry, widgetData in ipairs(panelData) do + local widgetType = widgetData.type + local widget = LAMCreateControl[widgetType](panel, widgetData) + + if (panelID ~= 10 and widget.data.widgetRightAlign) then -- display frames (10) does its own config + widget.thumb:ClearAnchors() + widget.thumb:SetAnchor(RIGHT, widget.color, RIGHT, 0, 0) + end + + if (panelID ~= 10 and widget.data.widgetPositionAndResize) then -- display frames (10) does its own config + widget:SetAnchor(TOPLEFT, lastAddedControl[panelID], TOPLEFT, 0, 0) -- overlay widget with previous + widget:SetWidth(controlPanelWidth - (controlPanelWidth / 3) + widget.data.widgetPositionAndResize) -- shrink widget to give appearance of sharing a row + else + widget:SetAnchor(TOPLEFT, lastAddedControl[panelID], BOTTOMLEFT, 0, 15) + lastAddedControl[panelID] = widget + end + + if (panelID == 1 and widgetData.isProminentAurasWidget) then -- General panel, grab the prominent auras dropdown list for later + prominentAurasWidgetRef = widget + elseif (panelID == 2 and widgetData.isBlacklistAurasWidget) then -- Filters panel, grab the blacklist auras dropdown list for later + blacklistAurasWidgetRef = widget + elseif (panelID == 5 and widgetData.isProfileDeleteDrop) then -- Profile panel, grab the delete dropdown list for later + profileDeleteDropRef = widget + elseif (panelID == 10) then -- make a reference to each widget for the Display Frames settings + tabDisplayWidgetRef[entry] = widget + end + end end -local function BuildTabProfile(id) - GeneratePlayerList() - - local panelData = { - { - type = "dropdown", - name = L.ProfileCharacterList, - tooltip = L.ProfileCharacterListTip, - choices = playerSettingsList, - getFunc = function() - if (#playerSettingsList >= 1) then - playerSettingCopyFrom = playerSettingsList[1] - return playerSettingsList[1] - end - end, - setFunc = function(arg) playerSettingCopyFrom = arg end, - }, - { - type = "button", - name = L.ProfileCopyFrom, - tooltip = L.ProfileCopyFromTip, - func = function() CopySettingsFrom(playerSettingCopyFrom) end, - warning = L.ProfileCopyFromWarn, - }, - } - - CreateWidgets(id, panelData) +local function CreateTabPanel(panelID) + local panel = WM:CreateControl(nil, controlPanel.scroll, CT_CONTROL) + panel.panel = controlPanel + panel:SetWidth(controlPanelWidth) + panel:SetAnchor(TOPLEFT, tabButtonsPanel, BOTTOMLEFT, 0, 6) + panel:SetResizeToFitDescendents(true) + + tabPanels[panelID] = panel + + local ctrl = LAMCreateControl.header(panel, { + type = 'header', + name = (panelID < 10) and L['TabHeader' .. panelID] or '', -- header is set for display frames later + }) + ctrl:SetAnchor(TOPLEFT) + + panel.headerRef = ctrl -- set reference to header for later update + + if (panelID == 10) then -- add string below header (shows aura groups on the given DisplayFrame) + ctrl = WM:CreateControl(nil, panel, CT_LABEL) + ctrl:SetFont('$(CHAT_FONT)|14|soft-shadow-thin') + ctrl:SetText('') + ctrl:SetDimensions(controlPanelWidth) + ctrl:SetVerticalAlignment(TEXT_ALIGN_BOTTOM) + ctrl:SetAnchor(TOPLEFT, panel.headerRef, BOTTOMLEFT, 0, 1) + + panel.groupRef = ctrl -- set reference to string for later update + end + + lastAddedControl[panelID] = ctrl + + CreateWidgets(panelID, tabPanelData[panelID]) -- create the actual setting elements + + if (panelID == 1) then -- populate prominent auras dropdown + PopulateProminentAurasDropdown() + elseif (panelID == 2) then -- populate blacklist auras dropdown + PopulateBlacklistAurasDropdown() + end end -local function BuildTabPanel(id) - local panel = WM:CreateControl(nil, controlPanel.scroll, CT_CONTROL) - panel.panel = controlPanel - panel:SetWidth(controlPanel:GetWidth() - 60) - panel:SetAnchor(TOPLEFT) - panel:SetResizeToFitDescendents(true) - tabPanels[id] = panel +-- ------------------------ +-- PANEL CONFIGURATION +-- ------------------------ +local function ConfigurePanelDisplayFrame(fromStyleFlag) + if (not fromStyleFlag) then -- set the header for the current display frame (unless called by a style change which doesn't change these) + tabPanels[10].headerRef.data.name = strformat('%s [|cffd100%d|r]', L.TabHeaderDisplay, currentDisplayFrame) + + -- set the displayed groups info entry for the current display frame + local groupText = strformat('%s: ', L.Group_Displayed_Here) + local noGroups = true + + for group, frame in pairs(Srendarr.db.auraGroups) do + if (frame == currentDisplayFrame) then -- this group is being show on this frame + groupText = strformat('%s |cffd100%s|r,', groupText, Srendarr.auraGroupStrings[group]) + noGroups = false + end + end + + if (noGroups) then + groupText = strformat('%s |cffd100%s|r,', groupText, L.Group_Displayed_None) + end - local ctrl = LAMCreateControl.header(panel, { type = 'header', name = L['TabHeader' .. id] }) - ctrl:SetAnchor(TOPLEFT) + tabPanels[10].groupRef:SetText(string.sub(groupText, 1, -2)) + end - lastAddedControl[id] = ctrl + lastAddedControl[10] = tabDisplayWidgetRef[4] -- the style choice box, grab ref for future anchoring - -- build appropriuate panel - if (id == 1) then -- general panel - BuildTabGeneral(1) - elseif (id == 7) then -- profiles panel - BuildTabProfile(7) - else -- one of the style panels - BuildTabWindow(id - 1) - end + local displayStyle = displayDB[currentDisplayFrame].style -- get the style for current frame + + for entry, widget in ipairs(tabDisplayWidgetRef) do + if (entry > 4) then -- we never need to adjust the first 4 widgets + if (widget.data.hideOnStyle[displayStyle]) then -- should widget be visible with the current display frame's style + widget:SetHidden(true) + else -- widget is visible, reanchor to maintain the appearance of the settings panel + widget:SetHidden(false) + + if (widget.data.widgetRightAlign) then + widget.thumb:ClearAnchors() -- widget needs manipulation, anchor swatch to the right for later + widget.thumb:SetAnchor(RIGHT, widget.color, RIGHT, 0, 0) + end + + if (widget.data.widgetPositionAndResize) then + widget:SetAnchor(TOPLEFT, lastAddedControl[10], TOPLEFT, 0, 0) -- overlay widget with previous + widget:SetWidth(controlPanelWidth - (controlPanelWidth / 3) + widget.data.widgetPositionAndResize) + else + widget:SetAnchor(TOPLEFT, lastAddedControl[10], BOTTOMLEFT, 0, 15) + lastAddedControl[10] = widget + end + end + end + end end -local function BuildTabButton(controlPanel, id) - local tab = WM:CreateControlFromVirtual(nil, controlPanel, 'ZO_DefaultButton') - tab:SetWidth(((controlPanel:GetWidth() - 60) / 4) - 2) - tab:SetText(L['TabButton' .. id]) - tab.tabID = id - tab:SetHandler('OnClicked', function(btn) - if (not tabPanels[btn.tabID]) then - BuildTabPanel(btn.tabID) - end - for id, panel in pairs(tabPanels) do - panel:SetHidden(not (id == btn.tabID)) - end - end) +local function OnStyleChange(style) + if (style == AURA_STYLE_FULL or style == AURA_STYLE_MINI) then -- these styles have restricted auraGrowth options + if (displayDB[currentDisplayFrame].auraGrowth ~= AURA_GROW_UP and displayDB[currentDisplayFrame].auraGrowth ~= AURA_GROW_DOWN) then + displayDB[currentDisplayFrame].auraGrowth = AURA_GROW_DOWN -- force (now) invalid growth choice to a valid setting + + Srendarr.displayFrames[currentDisplayFrame]:Configure() -- growth has changed, update DisplayFrame + Srendarr.displayFrames[currentDisplayFrame]:ConfigureDragOverlay() + Srendarr.displayFrames[currentDisplayFrame]:UpdateDisplay() + end + end + + if (style == AURA_STYLE_FULL) then -- this style has restricted timerLocation options + if (displayDB[currentDisplayFrame].timerLocation ~= AURA_TIMERLOC_OVER and displayDB[currentDisplayFrame].timerLocation ~= AURA_TIMERLOC_HIDDEN) then + displayDB[currentDisplayFrame].timerLocation = AURA_TIMERLOC_OVER -- force (now) invalid placement choice to a valid setting + end + end + + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() -- auras have changed style, update their appearance +end + +-- ------------------------ +-- TAB BUTTON HANDLER +-- ------------------------ +local function TabButtonOnClick(self) + if (not tabPanels[self.panelID]) then + CreateTabPanel(self.panelID) -- call to create appropriate panel if not created yet + end + + for x = 1, 13 do + tabButtons[x].button:SetState(0) -- unset selected state for all buttons + end + + if (self.buttonID == 4) then -- display frames primary button + for x = 6, 13 do + tabButtons[x]:SetHidden(false) -- show display frame tab buttons + end + + tabButtons[currentDisplayFrame + 5].button:SetState(1, true) -- set current display button selected + + ConfigurePanelDisplayFrame() -- configure the settings for Display Frames (changes for multiple reasons) + elseif (self.buttonID >= 6) then -- one of the display frame buttons + currentDisplayFrame = self.displayID + tabButtons[4].button:SetState(1, true) -- set display primary selected + + ConfigurePanelDisplayFrame() -- configure the settings for Display Frames (changes for multiple reasons) + else -- one of the other 3 tab buttons + for x = 6, 13 do + tabButtons[x]:SetHidden(true) -- hide display frame tab buttons + end + end + + tabButtons[self.buttonID].button:SetState(1, true) -- set selected state for current button - return tab + for id, panel in pairs(tabPanels) do + panel:SetHidden(not (id == self.panelID)) -- hide all other tab panels but intended + end end -function Srendarr.ShowExampleAuras() - local time = GetGameTimeMilliseconds() / 1000 - - Srendarr:StripAuras() -- only going to show examples - - for _, fragment in pairs(Srendarr.auraSceneFragments) do - SCENE_MANAGER:AddFragment(fragment) - end - - -- add example (short) - Srendarr.auraFrames[1]:AddAura(1, 1, L.ExampleAura1, [[/esoui/art/icons/ability_destructionstaff_002.dds]], time, time + 8, false, false) - Srendarr.auraFrames[1]:AddAura(1, 1, L.ExampleAura2, [[/esoui/art/icons/ability_destructionstaff_008.dds]], time, time + 24, false, false) - Srendarr.auraFrames[1]:AddAura(1, 1, L.ExampleAura3, [[/esoui/art/icons/ability_armor_001.dds]], time, time + 48, false, false) - -- add example (debuff) - if (Srendarr.db.showDebuff) then - Srendarr.auraFrames[3]:AddAura(1, 2, L.ExampleAura4, [[/esoui/art/icons/ability_armor_003.dds]], time, time + 8, false, false) - Srendarr.auraFrames[3]:AddAura(1, 2, L.ExampleAura5, [[/esoui/art/icons/ability_destructionstaff_008.dds]], time, time + 24, false, false) - Srendarr.auraFrames[3]:AddAura(1, 2, L.ExampleAura6, [[/esoui/art/icons/ability_armor_002.dds]], time, time + 48, false, false) - end - -- add example (long) - if (Srendarr.db.combineBuff) then - Srendarr.auraFrames[1]:AddAura(2, 1, L.ExampleAura7, [[/esoui/art/icons/ability_armor_001.dds]], time, time + 300, false, false) - Srendarr.auraFrames[1]:AddAura(3, 1, L.ExampleAura8, [[/esoui/art/icons/ability_destructionstaff_011.dds]], 1, 1, false, false) - Srendarr.auraFrames[1]:AddAura(4, 1, L.ExampleAura9, [[/esoui/art/icons/ability_destructionstaff_005.dds]], 1, 1, false, 0) - else - Srendarr.auraFrames[2]:AddAura(2, 1, L.ExampleAura7, [[/esoui/art/icons/ability_armor_001.dds]], time, time + 300, false, false) - Srendarr.auraFrames[2]:AddAura(3, 1, L.ExampleAura8, [[/esoui/art/icons/ability_destructionstaff_011.dds]], 1, 1, false, false) - Srendarr.auraFrames[2]:AddAura(4, 1, L.ExampleAura9, [[/esoui/art/icons/ability_destructionstaff_005.dds]], 1, 1, false, 0) - end - -- add example (target long) - if (Srendarr.db.showTargetAuras) then - Srendarr.auraFrames[4]:AddAura(2, 3, L.ExampleAura7, [[/esoui/art/icons/ability_armor_001.dds]], time, time + 300, false, false) - Srendarr.auraFrames[4]:AddAura(3, 3, L.ExampleAura8, [[/esoui/art/icons/ability_destructionstaff_011.dds]], 1, 1, false, false) - Srendarr.auraFrames[4]:AddAura(4, 3, L.ExampleAura9, [[/esoui/art/icons/ability_destructionstaff_005.dds]], 1, 1, false, 0) - end - -- add example (target debuff) - if (Srendarr.db.showTargetAurasDebuff) then - Srendarr.auraFrames[5]:AddAura(1, 1, L.ExampleAura4, [[/esoui/art/icons/ability_armor_003.dds]], time, time + 8, false, false) - Srendarr.auraFrames[5]:AddAura(1, 1, L.ExampleAura5, [[/esoui/art/icons/ability_destructionstaff_008.dds]], time, time + 24, false, false) - Srendarr.auraFrames[5]:AddAura(1, 1, L.ExampleAura6, [[/esoui/art/icons/ability_armor_002.dds]], time, time + 48, false, false) - end + +-- ----------------------- +-- INITIALIZATION +-- ----------------------- +local function CompleteInitialization(panel) + if (panel ~= controlPanel) then return end -- only proceed if this is our settings panel + + tabButtonsPanel = _G[settingsGlobalStrBtns] -- setup reference to tab buttons (custom) panel + controlPanelWidth = controlPanel:GetWidth() - 60 -- used several times + + local btn + + for x = 1, 13 do + btn = LAMCreateControl.button(tabButtonsPanel, { -- create our tab buttons + type = 'button', + name = (x <= 5) and L['TabButton' .. x] or tostring(x - 5), + func = TabButtonOnClick, + }) + btn.button.buttonID = x -- reference lookup to refer to buttons + + if (x <= 5) then -- main tab buttons (General, Filters, Display Frames & Profiles) + btn:SetWidth((controlPanelWidth / 5) - 2) + btn.button:SetWidth((controlPanelWidth / 5) - 2) + btn:SetAnchor(TOPLEFT, tabButtonsPanel, TOPLEFT, (x == 1) and 0 or ((controlPanelWidth / 5) * (x - 1)), 0) + + btn.button.panelID = (x == 4) and 10 or x -- reference lookup to refer to panels + else -- display frame tab buttons + btn:SetWidth((controlPanelWidth / 8) - 2) + btn.button:SetWidth((controlPanelWidth / 8) - 2) + btn:SetAnchor(TOPLEFT, tabButtonsPanel, TOPLEFT, (x == 6) and 0 or ((controlPanelWidth / 8) * (x - 6)), 34) + btn:SetHidden(true) + + btn.button.panelID = 10 -- reference lookup to refer to panels (special case for display frames) + btn.button.displayID = x - 5 -- for later reference to relate to DisplayFrames + end + + tabButtons[x] = btn + end + + tabButtons[1].button:SetState(1, true) -- set selected state for first (General) panel + + CreateTabPanel(1) -- create first (General) panel on settings first load + + -- build a button to show sample castbar + btn = WM:CreateControlFromVirtual(nil, controlPanel, 'ZO_DefaultButton') + btn:SetWidth((controlPanelWidth / 3) - 30) + btn:SetText(L.Show_Example_Castbar) + btn:SetAnchor(TOPRIGHT, controlPanel, TOPRIGHT, -60, -4) + btn:SetHandler('OnClicked', function() + local currentTime = GetGameTimeMilliseconds() / 1000 + + Srendarr.Cast:OnCastStart( + true, + strformat('%s - %s', L.Srendarr_Basic, L.CastBar), + currentTime, + currentTime + 600, + [[esoui/art/icons/ability_mageguild_001.dds]], + 116016 + ) + Srendarr.Cast:SetHidden(false) + end) + + -- build a button to trigger sample auras + btn = WM:CreateControlFromVirtual(nil, controlPanel, 'ZO_DefaultButton') + btn:SetWidth((controlPanelWidth / 3) - 30) + btn:SetText(L.Show_Example_Auras) + btn:SetAnchor(TOPRIGHT, controlPanel, TOPRIGHT, -230, -4) + btn:SetHandler('OnClicked', function() + sampleAurasActive = true + ShowSampleAuras() + end) + + + + PopulateProfileLists() -- populate available profiles + + ZO_PreHookHandler(tabButtonsPanel, 'OnEffectivelyHidden', function() + showSampleAuras = false + Srendarr.OnPlayerActivatedAlive() -- closed options, reset auras + + if (Srendarr.uiLocked) then -- stop any ongoing (most likely faked) casts if the ui isn't unlocked + Srendarr.Cast:DisableDragOverlay() -- using existing function to save time + end + end) end function Srendarr:InitializeSettings() - local panelData = { - type = 'panel', - name = self.name, - displayName = L.Srendarr, - author = 'Kith, Garkin & silentgecko', - version = self.version, - registerForRefresh = true, - registerForDefaults = false, - } - controlPanel = LAM:RegisterAddonPanel(self.name .. '_SettingsMenu', panelData) - local buttonsWidth = controlPanel:GetWidth() - 40 - - local buttons = WM:CreateControl(nil, controlPanel, CT_CONTROL) - buttons:SetAnchor(TOPLEFT, controlPanel.label, BOTTOMLEFT, 0, 20) - buttons:SetDimensions(buttonsWidth, 54) - controlPanel.container:ClearAnchors() - controlPanel.container:SetAnchor(TOPLEFT, buttons, BOTTOMLEFT, 0, 20) - controlPanel.container:SetAnchor(BOTTOMRIGHT, controlPanel, BOTTOMRIGHT, -3, -3) - - local posLeft = (buttonsWidth/4) - local tabBtn = BuildTabButton(controlPanel, 1) - tabBtn:SetAnchor(TOPLEFT, buttons, TOPLEFT, 0, 0) - tabBtn = BuildTabButton(controlPanel, 2) - tabBtn:SetAnchor(TOPLEFT, buttons, TOPLEFT, posLeft, 0) - tabBtn = BuildTabButton(controlPanel, 3) - tabBtn:SetAnchor(TOPLEFT, buttons, TOPLEFT, posLeft * 3, 0) - tabBtn = BuildTabButton(controlPanel, 4) - tabBtn:SetAnchor(TOPLEFT, buttons, TOPLEFT, posLeft * 2, 0) - tabBtn = BuildTabButton(controlPanel, 5) - - tabBtn:SetAnchor(BOTTOMLEFT, buttons, BOTTOMLEFT, 0, 6) - tabBtn = BuildTabButton(controlPanel, 6) - tabBtn:SetAnchor(BOTTOMLEFT, buttons, BOTTOMLEFT, posLeft, 6) - tabBtn = BuildTabButton(controlPanel, 7) - tabBtn:SetAnchor(BOTTOMLEFT, buttons, BOTTOMLEFT, posLeft * 3, 6) - - tabButtons = buttons - - ZO_PreHookHandler(tabButtons, "OnEffectivelyShown", function(control) - if (not tabPanels[1]) then - BuildTabPanel(1) - end - zo_callLater(self.ShowExampleAuras, 200) -- kinda hacky but it works - end) + displayDB = self.db.displayFrames -- local reference just to make things easier - ZO_PreHookHandler(tabButtons, 'OnEffectivelyHidden', function() - self:UpdateAuras() -- clear all and repop with real ones if any - end) -end \ No newline at end of file + local panelData = { + type = 'panel', + name = L.Srendarr_Basic, + displayName = L.Srendarr, + author = 'Kith, Garkin & silentgecko', + version = self.version, + registerForRefresh = true, + registerForDefaults = false, + } + + controlPanel = LAM:RegisterAddonPanel(settingsGlobalStr, panelData) + + local optionsData = { + [1] = { + type = 'custom', + reference = settingsGlobalStrBtns, + }, + } + + LAM:RegisterOptionControls(settingsGlobalStr, optionsData) + + CM:RegisterCallback("LAM-PanelControlsCreated", CompleteInitialization) +end + + +-- ----------------------- +-- OPTIONS DATA TABLES +-- ----------------------- +tabPanelData = { + -- ----------------------- + -- GENERAL SETTINGS + -- ----------------------- + [1] = { + { + type = 'description', + text = L.General_UnlockDesc, + }, + { + type = 'button', + name = L.General_UnlockUnlock, + func = function(btn) + if (Srendarr.uiLocked) then + Srendarr.SlashCommand('unlock') + btn:SetText(L.General_UnlockLock) + + for _, fragment in pairs(Srendarr.displayFramesScene) do + SCENE_MANAGER:AddFragment(fragment) -- make sure displayframes are visible + end + else + Srendarr.SlashCommand('lock') + btn:SetText(L.General_UnlockUnlock) + end + end, + }, + { + type = 'button', + name = L.General_UnlockReset, + func = function(btn) + if (btn.resetCheck) then -- button has been clicked twice, perform the reset + local defaults = (Srendarr:GetDefaults()).displayFrames -- get original positions + + for frame = 1, Srendarr.NUM_DISPLAY_FRAMES do + local point, x, y = defaults[frame].base.point, defaults[frame].base.x, defaults[frame].base.y + -- update player settings to defaults + Srendarr.db.displayFrames[frame].base.point = point + Srendarr.db.displayFrames[frame].base.x = x + Srendarr.db.displayFrames[frame].base.y = y + -- set displayframes to original locations + Srendarr.displayFrames[frame]:ClearAnchors() + Srendarr.displayFrames[frame]:SetAnchor(point, GuiRoot, point, x, y) + end + + -- reset cast bar + defaults = (Srendarr:GetDefaults()).castBar.base + + Srendarr.db.castBar.base.point = defaults.point + Srendarr.db.castBar.base.x = defaults.x + Srendarr.db.castBar.base.y = defaults.y + + Srendarr.Cast:ClearAnchors() + Srendarr.Cast:SetAnchor(defaults.point, GuiRoot, defaults.point, defaults.x, defaults.y) + + + btn.resetCheck = false + btn:SetText(L.General_UnlockReset) + else -- first time click in a reset attempt + btn.resetCheck = true + btn:SetText(L.General_UnlockResetAgain) + end + end, + widgetPositionAndResize = -200, + }, + { + type = 'checkbox', + name = L.General_CombatOnly, + tooltip = L.General_CombatOnlyTip, + getFunc = function() + return Srendarr.db.combatDisplayOnly + end, + setFunc = function(v) + Srendarr.db.combatDisplayOnly = v + Srendarr:ConfigureOnCombatState() + end, + }, + { + type = 'checkbox', + name = L.General_AuraFakeEnabled, + tooltip = L.General_AuraFakeEnabledTip, + getFunc = function() + return Srendarr.db.auraFakeEnabled + end, + setFunc = function(v) + Srendarr.db.auraFakeEnabled = v + Srendarr:ConfigureOnActionSlotAbilityUsed() + end, + }, + { + type = 'slider', + name = L.General_AuraFadeout, + tooltip = L.General_AuraFadeoutTip, + min = 0, + max = 5000, + step = 100, + getFunc = function() + return Srendarr.db.auraFadeTime * 1000 + end, + setFunc = function(v) + Srendarr.db.auraFadeTime = v / 1000 + Srendarr:ConfigureAuraFadeTime() + end, + }, + { + type = 'slider', + name = L.General_ShortThreshold, + tooltip = L.General_ShortThresholdTip, + warning = L.General_ShortThresholdWarn, + min = 10, + max = 120, + getFunc = function() + return Srendarr.db.shortBuffThreshold + end, + setFunc = function(v) + Srendarr.db.shortBuffThreshold = v + Srendarr:ConfigureAuraHandler() + end, + }, + { + type = 'checkbox', + name = L.General_ProcEnableAnims, + tooltip = L.General_ProcEnableAnimsTip, + getFunc = function() + return Srendarr.db.procEnableAnims + end, + setFunc = function(v) + Srendarr.db.procEnableAnims = v + Srendarr:ConfigureProcs() + end, + }, + { + type = 'dropdown', + name = L.General_ProcPlaySound, + tooltip = L.General_ProcPlaySoundTip, + choices = LMP:List('sound'), + getFunc = function() + return Srendarr.db.procPlaySound + end, + setFunc = function(v) + PlaySound(LMP:Fetch('sound', v)) + Srendarr.db.procPlaySound = v + Srendarr:ConfigureProcs() + end, + }, + -- ----------------------- + -- AURA CONTROL: DISPLAY GROUPS + -- ----------------------- + { + type = 'header', + name = L.General_ControlHeader, + }, + { + type = 'dropdown', + name = L.Group_Player_Short, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlShortTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_SHORT] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_SHORT])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_SHORT] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Player_Long, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlLongTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_LONG] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_LONG])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_LONG] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Player_Major, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlMajorTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_MAJOR] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_MAJOR])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_MAJOR] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Player_Minor, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlMinorTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_MINOR] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_MINOR])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_MINOR] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Player_Toggled, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlToggledTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_TOGGLED] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_TOGGLED])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_TOGGLED] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Player_Passive, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlPassiveTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_PASSIVE] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_PASSIVE])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_PASSIVE] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Player_Debuff, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlDebuffTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_DEBUFF] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_DEBUFF])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_DEBUFF] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Player_Ground, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlGroundTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PLAYER_GROUND] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PLAYER_GROUND])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PLAYER_GROUND] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Target_Buff, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlTargetBuffTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_TARGET_BUFF] == 0) and 9 or Srendarr.db.auraGroups[GROUP_TARGET_BUFF])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_TARGET_BUFF] = dropGroupRef[v] + Srendarr:ConfigureOnTargetChanged() + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'dropdown', + name = L.Group_Target_Debuff, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlTargetDebuffTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_TARGET_DEBUFF] == 0) and 9 or Srendarr.db.auraGroups[GROUP_TARGET_DEBUFF])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_TARGET_DEBUFF] = dropGroupRef[v] + Srendarr:ConfigureOnTargetChanged() + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + -- ----------------------- + -- PROMINENT BUFFS + -- ----------------------- + { + type = 'header', + name = L.General_ProminentHeader, + }, + { + type = 'description', + text = L.General_ProminentDesc, + }, + { + type = 'dropdown', + name = L.Group_Prominent, + tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlProminentTip), + choices = dropGroup, + getFunc = function() + -- just handle a special case with the 'dont display' setting internally being 0 and the settings menu wanting a >1 number + return dropGroup[((Srendarr.db.auraGroups[GROUP_PROMINENT] == 0) and 9 or Srendarr.db.auraGroups[GROUP_PROMINENT])] + end, + setFunc = function(v) + Srendarr.db.auraGroups[GROUP_PROMINENT] = dropGroupRef[v] + Srendarr:ConfigureAuraHandler() + + if (sampleAurasActive) then + ShowSampleAuras() -- sample auras calls OnPlayerActivatedAlive as well + else + Srendarr.OnPlayerActivatedAlive() + end + end, + }, + { + type = 'editbox', + name = L.General_ProminentAdd, + tooltip = L.General_ProminentAddTip, + warning = L.General_ProminentAddWarn, + getFunc = function () + return '' + end, + setFunc = function(v) + if (v ~= '') then + Srendarr:ProminentAuraAdd(v) + Srendarr.OnPlayerActivatedAlive() + end + + PopulateProminentAurasDropdown() + end, + isMultiline = false, + }, + { + type = 'dropdown', + name = L.General_ProminentList, + tooltip = L.General_ProminentListTip, + choices = dropProminentAuras, + sort = 'name-down', + getFunc = function() + prominentAurasSelectedAura = nil + return dropProminentAuras[1] + end, + setFunc = function(v) + prominentAurasSelectedAura = (v ~= '' and v ~= L.GenericSetting_ClickToViewAuras) and v or nil + end, + isProminentAurasWidget = true, + }, + { + type = 'button', + name = L.General_ProminentRemove, + func = function(btn) + if (prominentAurasSelectedAura) then + Srendarr:ProminentAuraRemove(prominentAurasSelectedAura) + Srendarr.OnPlayerActivatedAlive() + end + + PopulateProminentAurasDropdown() + end, + }, + }, + -- ----------------------- + -- FILTER SETTINGS + -- ----------------------- + [2] = { + { + type = 'description', + text = L.Filter_Desc + }, + -- ----------------------- + -- AURA BLACKLIST + -- ----------------------- + { + type = 'header', + name = L.Filter_BlacklistHeader, + }, + { + type = 'editbox', + name = L.Filter_BlacklistAdd, + tooltip = L.Filter_BlacklistAddTip, + warning = L.Filter_BlacklistAddWarn, + getFunc = function () + return '' + end, + setFunc = function(v) + if (v ~= '') then + -- need to add to blacklist + Srendarr:BlacklistAuraAdd(v) + Srendarr.OnPlayerActivatedAlive() + end + + PopulateBlacklistAurasDropdown() + end, + isMultiline = false, + }, + { + type = 'dropdown', + name = L.Filter_BlacklistList, + tooltip = L.Filter_BlacklistListTip, + choices = dropBlacklistAuras, + sort = 'name-down', + getFunc = function() + blacklistAurasSelectedAura = nil + return dropBlacklistAuras[1] + end, + setFunc = function(v) + blacklistAurasSelectedAura = (v ~= '' and v ~= L.GenericSetting_ClickToViewAuras) and v or nil + end, + isBlacklistAurasWidget = true, + }, + { + type = 'button', + name = L.Filter_BlacklistRemove, + func = function(btn) + if (blacklistAurasSelectedAura) then + Srendarr:BlacklistAuraRemove(blacklistAurasSelectedAura) + Srendarr.OnPlayerActivatedAlive() + end + + PopulateBlacklistAurasDropdown() + end, + }, + -- ----------------------- + -- FILTERS FOR PLAYER + -- ----------------------- + { + type = 'header', + name = L.Filter_PlayerHeader, + }, + { + type = 'checkbox', + name = L.Filter_Block, + tooltip = L.Filter_BlockPlayerTip, + getFunc = function() + return Srendarr.db.filtersPlayer.block + end, + setFunc = function(v) + Srendarr.db.filtersPlayer.block = v + Srendarr:PopulateFilteredAuras() + Srendarr.OnPlayerActivatedAlive() + end, + }, + { + type = 'checkbox', + name = L.Filter_Cyrodiil, + tooltip = L.Filter_CyrodiilPlayerTip, + getFunc = function() + return Srendarr.db.filtersPlayer.cyrodiil + end, + setFunc = function(v) + Srendarr.db.filtersPlayer.cyrodiil = v + Srendarr:PopulateFilteredAuras() + Srendarr.OnPlayerActivatedAlive() + end, + }, + { + type = 'checkbox', + name = L.Filter_Disguise, + tooltip = L.Filter_DisguisePlayerTip, + getFunc = function() + return Srendarr.db.filtersPlayer.disguise + end, + setFunc = function(v) + Srendarr.db.filtersPlayer.disguise = v + Srendarr:PopulateFilteredAuras() + Srendarr.OnPlayerActivatedAlive() + end, + }, + { + type = 'checkbox', + name = L.Filter_MundusBoon, + tooltip = L.Filter_MundusBoonPlayerTip, + getFunc = function() + return Srendarr.db.filtersPlayer.mundusBoon + end, + setFunc = function(v) + Srendarr.db.filtersPlayer.mundusBoon = v + Srendarr:PopulateFilteredAuras() + Srendarr.OnPlayerActivatedAlive() + end, + }, + { + type = 'checkbox', + name = L.Filter_SoulSummons, + tooltip = L.Filter_SoulSummonsPlayerTip, + getFunc = function() + return Srendarr.db.filtersPlayer.soulSummons + end, + setFunc = function(v) + Srendarr.db.filtersPlayer.soulSummons = v + Srendarr:PopulateFilteredAuras() + Srendarr.OnPlayerActivatedAlive() + end, + }, + { + type = 'checkbox', + name = L.Filter_VampLycan, + tooltip = L.Filter_VampLycanPlayerTip, + getFunc = function() + return Srendarr.db.filtersPlayer.vampLycan + end, + setFunc = function(v) + Srendarr.db.filtersPlayer.vampLycan = v + Srendarr:PopulateFilteredAuras() + Srendarr.OnPlayerActivatedAlive() + end, + }, + { + type = 'checkbox', + name = L.Filter_VampLycanBite, + tooltip = L.Filter_VampLycanBitePlayerTip, + getFunc = function() + return Srendarr.db.filtersPlayer.vampLycanBite + end, + setFunc = function(v) + Srendarr.db.filtersPlayer.vampLycanBite = v + Srendarr:PopulateFilteredAuras() + Srendarr.OnPlayerActivatedAlive() + end, + }, + -- ----------------------- + -- FILTERS FOR TARGET + -- ----------------------- + { + type = 'header', + name = L.Filter_TargetHeader, + }, + { + type = 'checkbox', + name = L.Filter_Block, + tooltip = L.Filter_BlockTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.block + end, + setFunc = function(v) + Srendarr.db.filtersTarget.block = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_Cyrodiil, + tooltip = L.Filter_CyrodiilTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.cyrodiil + end, + setFunc = function(v) + Srendarr.db.filtersTarget.cyrodiil = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_Disguise, + tooltip = L.Filter_DisguiseTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.disguise + end, + setFunc = function(v) + Srendarr.db.filtersTarget.disguise = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_MajorEffects, + tooltip = L.Filter_MajorEffectsTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.majorEffects + end, + setFunc = function(v) + Srendarr.db.filtersTarget.majorEffects = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_MinorEffects, + tooltip = L.Filter_MinorEffectsTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.minorEffects + end, + setFunc = function(v) + Srendarr.db.filtersTarget.minorEffects = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_MundusBoon, + tooltip = L.Filter_MundusBoonTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.mundusBoon + end, + setFunc = function(v) + Srendarr.db.filtersTarget.mundusBoon = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_SoulSummons, + tooltip = L.Filter_SoulSummonsTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.soulSummons + end, + setFunc = function(v) + Srendarr.db.filtersTarget.soulSummons = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_VampLycan, + tooltip = L.Filter_VampLycanTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.vampLycan + end, + setFunc = function(v) + Srendarr.db.filtersTarget.vampLycan = v + Srendarr:PopulateFilteredAuras() + end, + }, + { + type = 'checkbox', + name = L.Filter_VampLycanBite, + tooltip = L.Filter_VampLycanBiteTargetTip, + getFunc = function() + return Srendarr.db.filtersTarget.vampLycanBite + end, + setFunc = function(v) + Srendarr.db.filtersTarget.vampLycanBite = v + Srendarr:PopulateFilteredAuras() + end, + }, + }, + -- ----------------------- + -- CAST BAR SETTINGS + -- ----------------------- + [3] = { + { + type = 'checkbox', + name = L.CastBar_Enable, + tooltip = L.CastBar_EnableTip, + getFunc = function() + return Srendarr.db.castBar.enabled + end, + setFunc = function(v) + Srendarr.db.castBar.enabled = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'slider', + name = L.CastBar_Alpha, + tooltip = L.CastBar_AlphaTip, + min = 5, + max = 100, + step = 5, + getFunc = function() + return Srendarr.db.castBar.base.alpha * 100 + end, + setFunc = function(v) + Srendarr.db.castBar.base.alpha = v / 100 + Srendarr.Cast:SetAlpha(v / 100) + end, + }, + { + type = 'slider', + name = L.CastBar_Scale, + tooltip = L.CastBar_ScaleTip, + min = 50, + max = 150, + step = 5, + getFunc = function() + return Srendarr.db.castBar.base.scale * 100 + end, + setFunc = function(v) + Srendarr.db.castBar.base.scale = v / 100 + Srendarr.Cast:SetScale(v / 100) + end, + }, + -- ----------------------- + -- CASTED ABILITY TEXT SETTINGS + -- ----------------------- + { + type = 'header', + name = L.CastBar_NameHeader, + }, + { + type = 'checkbox', + name = L.CastBar_NameShow, + getFunc = function() + return Srendarr.db.castBar.nameShow + end, + setFunc = function(v) + Srendarr.db.castBar.nameShow = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'dropdown', + name = L.GenericSetting_NameFont, + choices = LMP:List('font'), + getFunc = function() + return Srendarr.db.castBar.nameFont + end, + setFunc = function(v) + Srendarr.db.castBar.nameFont = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'dropdown', + name = L.GenericSetting_NameStyle, + choices = dropFontStyle, + getFunc = function() + return Srendarr.db.castBar.nameStyle + end, + setFunc = function(v) + Srendarr.db.castBar.nameStyle = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'colorpicker', + getFunc = function() + return unpack(Srendarr.db.castBar.nameColour) + end, + setFunc = function(r, g, b, a) + Srendarr.db.castBar.nameColour[1] = r + Srendarr.db.castBar.nameColour[2] = g + Srendarr.db.castBar.nameColour[3] = b + Srendarr.db.castBar.nameColour[4] = a + Srendarr:ConfigureCastBar() + end, + widgetRightAlign = true, + widgetPositionAndResize = -15, + }, + { + type = 'slider', + name = L.GenericSetting_NameSize, + min = 8, + max = 32, + getFunc = function() + return Srendarr.db.castBar.nameSize + end, + setFunc = function(v) + Srendarr.db.castBar.nameSize = v + Srendarr:ConfigureCastBar() + end, + }, + -- ----------------------- + -- CAST TIMER TEXT SETTINGS + -- ----------------------- + { + type = 'header', + name = L.CastBar_TimerHeader, + }, + { + type = 'checkbox', + name = L.CastBar_TimerShow, + getFunc = function() + return Srendarr.db.castBar.timerShow + end, + setFunc = function(v) + Srendarr.db.castBar.timerShow = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'dropdown', + name = L.GenericSetting_TimerFont, + choices = LMP:List('font'), + getFunc = function() + return Srendarr.db.castBar.timerFont + end, + setFunc = function(v) + Srendarr.db.castBar.timerFont = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'dropdown', + name = L.GenericSetting_TimerStyle, + choices = dropFontStyle, + getFunc = function() + return Srendarr.db.castBar.timerStyle + end, + setFunc = function(v) + Srendarr.db.castBar.timerStyle = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'colorpicker', + getFunc = function() + return unpack(Srendarr.db.castBar.timerColour) + end, + setFunc = function(r, g, b, a) + Srendarr.db.castBar.timerColour[1] = r + Srendarr.db.castBar.timerColour[2] = g + Srendarr.db.castBar.timerColour[3] = b + Srendarr.db.castBar.timerColour[4] = a + Srendarr:ConfigureCastBar() + end, + widgetRightAlign = true, + widgetPositionAndResize = -15, + }, + { + type = 'slider', + name = L.GenericSetting_TimerSize, + min = 8, + max = 32, + getFunc = function() + return Srendarr.db.castBar.timerSize + end, + setFunc = function(v) + Srendarr.db.castBar.timerSize = v + Srendarr:ConfigureCastBar() + end, + }, + -- ----------------------- + -- STATUSBAR SETTINGS + -- ----------------------- + { + type = 'header', + name = L.CastBar_BarHeader, + }, + { + type = 'checkbox', + name = L.CastBar_BarReverse, + tooltip = L.CastBar_BarReverseTip, + getFunc = function() + return Srendarr.db.castBar.barReverse + end, + setFunc = function(v) + Srendarr.db.castBar.barReverse = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'checkbox', + name = L.CastBar_BarGloss, + tooltip = L.CastBar_BarGlossTip, + getFunc = function() + return Srendarr.db.castBar.barGloss + end, + setFunc = function(v) + Srendarr.db.castBar.barGloss = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'slider', + name = L.CastBar_BarWidth, + tooltip = L.CastBar_BarWidthTip, + min = 200, + max = 400, + step = 5, + getFunc = function() + return Srendarr.db.castBar.barWidth + end, + setFunc = function(v) + Srendarr.db.castBar.barWidth = v + Srendarr:ConfigureCastBar() + end, + }, + { + type = 'colorpicker', + name = L.CastBar_BarColour, + tooltip = L.CastBar_BarColourTip, + getFunc = function() + local colours = Srendarr.db.castBar.barColour + return colours.r2, colours.g2, colours.b2 + end, + setFunc = function(r, g, b) + Srendarr.db.castBar.barColour.r2 = r + Srendarr.db.castBar.barColour.g2 = g + Srendarr.db.castBar.barColour.b2 = b + Srendarr:ConfigureCastBar() + end, + widgetRightAlign = true, + }, + { + type = 'colorpicker', + tooltip = L.CastBar_BarColourTip, + getFunc = function() + local colours = Srendarr.db.castBar.barColour + return colours.r1, colours.g1, colours.b1 + end, + setFunc = function(r, g, b) + Srendarr.db.castBar.barColour.r1 = r + Srendarr.db.castBar.barColour.g1 = g + Srendarr.db.castBar.barColour.b1 = b + Srendarr:ConfigureCastBar() + end, + widgetRightAlign = true, + widgetPositionAndResize = 127, + }, + }, + -- ----------------------- + -- PROFILE SETTINGS + -- ----------------------- + [5] = { + [1] = { + type = 'description', + text = L.Profile_Desc + }, + [2] = { + type = 'checkbox', + name = L.Profile_UseGlobal, + warning = L.Profile_UseGlobalWarn, + getFunc = function() + return SrendarrDB.Default[GetDisplayName()]['$AccountWide'].useAccountWide + end, + setFunc = function(v) + SrendarrDB.Default[GetDisplayName()]['$AccountWide'].useAccountWide = v + ReloadUI() + end, + disabled = function() + return not profileGuard + end + }, + [3] = { + type = 'dropdown', + name = L.Profile_Copy, + tooltip = L.Profile_CopyTip, + choices = profileCopyList, + getFunc = function() + if (#profileCopyList >= 1) then -- there are entries, set first as default + profileCopyToCopy = profileCopyList[1] + return profileCopyList[1] + end + end, + setFunc = function(v) + profileCopyToCopy = v + end, + disabled = function() + return not profileGuard + end + }, + [4] = { + type = 'button', + name = L.Profile_CopyButton, + warning = L.Profile_CopyButtonWarn, + func = function(btn) + CopyProfile() + end, + disabled = function() + return not profileGuard + end + }, + [5] = { + type = 'dropdown', + name = L.Profile_Delete, + tooltip = L.Profile_DeleteTip, + choices = profileDeleteList, + getFunc = function() + if (#profileDeleteList >= 1) then + if (not profileDeleteToDelete) then -- nothing selected yet, return first + profileDeleteToDelete = profileDeleteList[1] + return profileDeleteList[1] + else + return profileDeleteToDelete + end + end + end, + setFunc = function(v) + profileDeleteToDelete = v + end, + disabled = function() + return not profileGuard + end, + isProfileDeleteDrop = true + }, + [6] = { + type = 'button', + name = L.Profile_DeleteButton, + func = function(btn) + DeleteProfile() + end, + disabled = function() + return not profileGuard + end + }, + [7] = { + type = 'description' + }, + [8] = { + type = 'header' + }, + [9] = { + type = 'checkbox', + name = L.Profile_Guard, + getFunc = function() + return profileGuard + end, + setFunc = function(v) + profileGuard = v + end, + }, + }, + -- ----------------------- + -- DISPLAY FRAME SETTINGS + -- ----------------------- + [10] = { + [1] = { + type = 'slider', + name = L.DisplayFrame_Alpha, + tooltip = L.DisplayFrame_AlphaTip, + min = 5, + max = 100, + step = 5, + getFunc = function() + return displayDB[currentDisplayFrame].base.alpha * 100 + end, + setFunc = function(v) + displayDB[currentDisplayFrame].base.alpha = v / 100 + Srendarr.displayFrames[currentDisplayFrame]:SetAlpha(v / 100) + Srendarr.displayFrames[currentDisplayFrame].displayAlpha = v / 100 + end, + }, + [2] = { + type = 'slider', + name = L.DisplayFrame_Scale, + tooltip = L.DisplayFrame_ScaleTip, + min = 50, + max = 150, + step = 5, + getFunc = function() + return displayDB[currentDisplayFrame].base.scale * 100 + end, + setFunc = function(v) + displayDB[currentDisplayFrame].base.scale = v / 100 + Srendarr.displayFrames[currentDisplayFrame]:SetScale(v / 100) + end, + }, + -- ----------------------- + -- AURA DISPLAY SETTINGS + -- ----------------------- + [3] = { + type = 'header', + name = L.DisplayFrame_AuraHeader, + }, + [4] = { + type = 'dropdown', + name = L.DisplayFrame_Style, + tooltip = L.DisplayFrame_StyleTip, + choices = dropStyle, + getFunc = function() + return dropStyle[displayDB[currentDisplayFrame].style] + end, + setFunc = function(v) + displayDB[currentDisplayFrame].style = dropStyleRef[v] + + OnStyleChange(dropStyleRef[v]) -- update several options dependent on current style + + ConfigurePanelDisplayFrame(true) -- changing this changes a lot of the following options + end, + }, + [5] = { -- auraGrowth FULL, MINI + type = 'dropdown', + name = L.DisplayFrame_Growth, + tooltip = L.DisplayFrame_GrowthTip, + choices = dropGrowthFullMini, + getFunc = function() + return dropGrowthFullMini[displayDB[currentDisplayFrame].auraGrowth] + end, + setFunc = function(v) + displayDB[currentDisplayFrame].auraGrowth = dropGrowthRef[v] + Srendarr.displayFrames[currentDisplayFrame]:Configure() + Srendarr.displayFrames[currentDisplayFrame]:ConfigureDragOverlay() + Srendarr.displayFrames[currentDisplayFrame]:UpdateDisplay() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [6] = { -- auraGrowth ICON + type = 'dropdown', + name = L.DisplayFrame_Growth, + tooltip = L.DisplayFrame_GrowthTip, + choices = dropGrowthIcon, + getFunc = function() + return dropGrowthIcon[displayDB[currentDisplayFrame].auraGrowth] + end, + setFunc = function(v) + displayDB[currentDisplayFrame].auraGrowth = dropGrowthRef[v] + Srendarr.displayFrames[currentDisplayFrame]:Configure() + Srendarr.displayFrames[currentDisplayFrame]:ConfigureDragOverlay() + Srendarr.displayFrames[currentDisplayFrame]:UpdateDisplay() + end, + hideOnStyle = {[AURA_STYLE_FULL] = true, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = true} + }, + [7] = { -- auraPadding FULL, ICON, MINI + type = 'slider', + name = L.DisplayFrame_Padding, + tooltip = L.DisplayFrame_PaddingTip, + min = -25, + max = 75, + getFunc = function() + return displayDB[currentDisplayFrame].auraPadding + end, + setFunc = function(v) + displayDB[currentDisplayFrame].auraPadding = v + Srendarr.displayFrames[currentDisplayFrame]:Configure() + Srendarr.displayFrames[currentDisplayFrame]:ConfigureDragOverlay() + Srendarr.displayFrames[currentDisplayFrame]:UpdateDisplay() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = false} + }, + [8] = { -- auraSort FULL, ICON, MINI + type = 'dropdown', + name = L.DisplayFrame_Sort, + tooltip = L.DisplayFrame_SortTip, + choices = dropSort, + sort = 'name-up', + getFunc = function() + return dropSort[displayDB[currentDisplayFrame].auraSort] + end, + setFunc = function(v) + displayDB[currentDisplayFrame].auraSort = dropSortRef[v] + Srendarr.displayFrames[currentDisplayFrame]:Configure() + Srendarr.displayFrames[currentDisplayFrame]:UpdateDisplay() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = false} + }, + [9] = { -- highlightToggled FULL, ICON + type = 'checkbox', + name = L.DisplayFrame_Highlight, + tooltip = L.DisplayFrame_HighlightTip, + getFunc = function() + return displayDB[currentDisplayFrame].highlightToggled + end, + setFunc = function(v) + displayDB[currentDisplayFrame].highlightToggled = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = true} + }, + -- ----------------------- + -- ABILITY TEXT SETTINGS + -- ----------------------- + [10] = { -- nameHeader FULL, MINI + type = 'header', + name = L.DisplayFrame_NameHeader, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [11] = { -- nameFont FULL, MINI + type = 'dropdown', + name = L.GenericSetting_NameFont, + choices = LMP:List('font'), + getFunc = function() + return displayDB[currentDisplayFrame].nameFont + end, + setFunc = function(v) + displayDB[currentDisplayFrame].nameFont = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [12] = { -- nameStyle FULL, MINI + type = 'dropdown', + name = L.GenericSetting_NameStyle, + choices = dropFontStyle, + getFunc = function() + return displayDB[currentDisplayFrame].nameStyle + end, + setFunc = function(v) + displayDB[currentDisplayFrame].nameStyle = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [13] = { -- nameColour FULL, MINI + type = 'colorpicker', + getFunc = function() + return unpack(displayDB[currentDisplayFrame].nameColour) + end, + setFunc = function(r, g, b, a) + displayDB[currentDisplayFrame].nameColour[1] = r + displayDB[currentDisplayFrame].nameColour[2] = g + displayDB[currentDisplayFrame].nameColour[3] = b + displayDB[currentDisplayFrame].nameColour[4] = a + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + widgetPositionAndResize = -15, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [14] = { -- nameSize FULL, MINI + type = 'slider', + name = L.GenericSetting_NameSize, + min = 8, + max = 32, + getFunc = function() + return displayDB[currentDisplayFrame].nameSize + end, + setFunc = function(v) + displayDB[currentDisplayFrame].nameSize = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + -- ----------------------- + -- TIMER TEXT SETTINGS + -- ----------------------- + [15] = { -- timerHeader FULL, ICON, MINI + type = 'header', + name = L.DisplayFrame_TimerHeader, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = false} + }, + [16] = { -- timerFont FULL, ICON, MINI + type = 'dropdown', + name = L.GenericSetting_TimerFont, + choices = LMP:List('font'), + getFunc = function() + return displayDB[currentDisplayFrame].timerFont + end, + setFunc = function(v) + displayDB[currentDisplayFrame].timerFont = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = false} + }, + [17] = { -- timerStyle FULL, ICON, MINI + type = 'dropdown', + name = L.GenericSetting_TimerStyle, + choices = dropFontStyle, + getFunc = function() + return displayDB[currentDisplayFrame].timerStyle + end, + setFunc = function(v) + displayDB[currentDisplayFrame].timerStyle = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = false} + }, + [18] = { -- timerColour FULL, ICON, MINI + type = 'colorpicker', + getFunc = function() + return unpack(displayDB[currentDisplayFrame].timerColour) + end, + setFunc = function(r, g, b, a) + displayDB[currentDisplayFrame].timerColour[1] = r + displayDB[currentDisplayFrame].timerColour[2] = g + displayDB[currentDisplayFrame].timerColour[3] = b + displayDB[currentDisplayFrame].timerColour[4] = a + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + widgetPositionAndResize = -15, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = false} + }, + [19] = { -- timerSize FULL, ICON, MINI + type = 'slider', + name = L.GenericSetting_TimerSize, + min = 8, + max = 32, + getFunc = function() + return displayDB[currentDisplayFrame].timerSize + end, + setFunc = function(v) + displayDB[currentDisplayFrame].timerSize = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = false} + }, + [20] = { -- timerLocation FULL + type = 'dropdown', + name = L.DisplayFrame_TimerLocation, + tooltip = L.DisplayFrame_TimerLocationTip, + choices = dropTimerFull, + getFunc = function() + return dropTimerFull[displayDB[currentDisplayFrame].timerLocation] + end, + setFunc = function(v) + displayDB[currentDisplayFrame].timerLocation = dropTimerRef[v] + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = true} + }, + [21] = { -- timerLocation ICON + type = 'dropdown', + name = L.DisplayFrame_TimerLocation, + tooltip = L.DisplayFrame_TimerLocationTip, + choices = dropTimerIcon, + getFunc = function() + return dropTimerIcon[displayDB[currentDisplayFrame].timerLocation] + end, + setFunc = function(v) + displayDB[currentDisplayFrame].timerLocation = dropTimerRef[v] + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = true, [AURA_STYLE_ICON] = false, [AURA_STYLE_MINI] = true} + }, + -- ----------------------- + -- STATUSBAR SETTINGS + -- ----------------------- + [22] = { -- barHeader FULL, MINI + type = 'header', + name = L.DisplayFrame_BarHeader, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [23] = { -- barReverse FULL, MINI + type = 'checkbox', + name = L.DisplayFrame_BarReverse, + tooltip = L.DisplayFrame_BarReverseTip, + getFunc = function() + return displayDB[currentDisplayFrame].barReverse + end, + setFunc = function(v) + displayDB[currentDisplayFrame].barReverse = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureDragOverlay() + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [24] = { -- barGloss FULL, MINI + type = 'checkbox', + name = L.DisplayFrame_BarGloss, + tooltip = L.DisplayFrame_BarGlossTip, + getFunc = function() + return displayDB[currentDisplayFrame].barGloss + end, + setFunc = function(v) + displayDB[currentDisplayFrame].barGloss = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [25] = { -- barWidth FULL, MINI + type = 'slider', + name = L.DisplayFrame_BarWidth, + tooltip = L.DisplayFrame_BarWidthTip, + min = 40, + max = 240, + step = 5, + getFunc = function() + return displayDB[currentDisplayFrame].barWidth + end, + setFunc = function(v) + displayDB[currentDisplayFrame].barWidth = v + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + Srendarr.displayFrames[currentDisplayFrame]:ConfigureDragOverlay() + end, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [26] = { -- barColour[TIMED]:2 FULL, MINI + type = 'colorpicker', + name = L.DisplayFrame_BarTimed, + tooltip = L.DisplayFrame_BarTimedTip, + getFunc = function() + local colours = displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED] + return colours.r2, colours.g2, colours.b2 + end, + setFunc = function(r, g, b) + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED].r2 = r + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED].g2 = g + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED].b2 = b + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [27] = { -- barColour[TIMED]:1 FULL, MINI + type = 'colorpicker', + tooltip = L.DisplayFrame_BarTimedTip, + getFunc = function() + local colours = displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED] + return colours.r1, colours.g1, colours.b1 + end, + setFunc = function(r, g, b) + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED].r1 = r + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED].g1 = g + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TIMED].b1 = b + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + widgetPositionAndResize = 127, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [28] = { -- barColour[TOGGLED]:2 FULL, MINI + type = 'colorpicker', + name = L.DisplayFrame_BarToggled, + tooltip = L.DisplayFrame_BarToggledTip, + getFunc = function() + local colours = displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED] + return colours.r2, colours.g2, colours.b2 + end, + setFunc = function(r, g, b) + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED].r2 = r + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED].g2 = g + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED].b2 = b + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [29] = { -- barColour[TOGGLED]:1 FULL, MINI + type = 'colorpicker', + tooltip = L.DisplayFrame_BarToggledTip, + getFunc = function() + local colours = displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED] + return colours.r1, colours.g1, colours.b1 + end, + setFunc = function(r, g, b) + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED].r1 = r + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED].g1 = g + displayDB[currentDisplayFrame].barColours[AURA_TYPE_TOGGLED].b1 = b + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + widgetPositionAndResize = 127, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [30] = { -- barColour[PASSIVE]:2 FULL, MINI + type = 'colorpicker', + name = L.DisplayFrame_BarPassive, + tooltip = L.DisplayFrame_BarPassiveTip, + getFunc = function() + local colours = displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE] + return colours.r2, colours.g2, colours.b2 + end, + setFunc = function(r, g, b) + displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE].r2 = r + displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE].g2 = g + displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE].b2 = b + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + [31] = { -- barColour[PASSIVE]:1 FULL, MINI + type = 'colorpicker', + tooltip = L.DisplayFrame_BarPassiveTip, + getFunc = function() + local colours = displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE] + return colours.r1, colours.g1, colours.b1 + end, + setFunc = function(r, g, b) + displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE].r1 = r + displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE].g1 = g + displayDB[currentDisplayFrame].barColours[AURA_TYPE_PASSIVE].b1 = b + Srendarr.displayFrames[currentDisplayFrame]:ConfigureAssignedAuras() + end, + widgetRightAlign = true, + widgetPositionAndResize = 127, + hideOnStyle = {[AURA_STYLE_FULL] = false, [AURA_STYLE_ICON] = true, [AURA_STYLE_MINI] = false} + }, + } +} diff --git a/Srendarr.lua b/Srendarr.lua deleted file mode 100644 index ef4d770..0000000 --- a/Srendarr.lua +++ /dev/null @@ -1,487 +0,0 @@ ---[[---------------------------------------------------------- - Srendarr - Aura & Buff Tracker - ---------------------------------------------------------- - * - * - * Version 1.6.1 - * Kith, Garkin, silentgecko - * - * -]]-- -local Srendarr = _G['Srendarr'] -- grab addon table from global -local L - -Srendarr.name = 'Srendarr' -Srendarr.slash = '/srendarr' -Srendarr.version = '1.6.1' -Srendarr.versionDB = 2 - --- CONSTANTS -Srendarr.ICON_SIZE = 40 -Srendarr.BAR_HEIGHT = 16 -Srendarr.SPAM_THRESHOLD = 0.25 -- button mash limiter -Srendarr.UPDATE_THRESHOLD = 0.5 -- don't update aura display if start|finish values change by less than this -Srendarr.UPDATE_RATE = 0.05 -- (ms) update rate -Srendarr.AURA_FADE_TIME = 1 -- (ms) time to fade expired (timed) auras - -Srendarr.auraAnchors = {} -- display anchors for all 3 frames -Srendarr.auraFrames = {} -Srendarr.auraSceneFragments = {} -Srendarr.ui_Locked = true - -local defaults = { - -- general - combineBuff = true, - shortBuffThreshold = 90, -- buffs shorter then this value will be displayed on short buff frame - onlyInCombat = false, - showTargetAuras = false, - showDebuff = true, - hideMinorBuffs = false, - hideMajorBuffs = false, - -- filters - showSoulSummons = true, - showSoulSummonsTarget = true, - showToggle = true, - showToggleTarget = true, - showPassive = true, -- master control for passives - showPassiveTarget = true, -- master control for target passives - showCyrodiil = true, - showCyrodiilTarget = true, - showDisguise = true, - showDisguiseTarget = true, - showAllEffects = false, - showAllEffectsTarget = false, - showMundus = true, - showMundusTarget = true, - showVampLycan = true, - showVampLycanTarget = true, - -- windows - frames = { - [1] = { -- short (and combined) buffs - anchor = {point = BOTTOMRIGHT, x = 0, y = 0}, - alpha = 1.0, - scale = 1.0, - tooltips = false, - auraGrowth = 'UP', -- UP|DOWN|LEFT|LEFTCENTER|RIGHT|RIGHTCENTER - auraPadding = 4, - auraSort = 'TIME', -- TIME|NAME - auraIconOnRight = true, -- only for vertical growth - showNameBar = true, - -- name - nameFont = 'Univers 67', - nameColour = {r = 0.9, g = 0.9, b = 0.9}, - nameOutline = 'soft-shadow-thick', - nameSize = 16, - -- timer - timerShowTP = false, -- show timer for (T)gogles or (P)assives - timerShowHorz = 'BELOW', -- BELOW|ABOVE|OVER|HIDE - timerShowVert = 'OVER', -- OVER|HIDE - timerFont = 'Univers 67', - timerColour = {r = 0.9, g = 0.9, b = 0.9}, - timerOutline = 'soft-shadow-thick', - timerSize = 14, - barGloss = true, - barWidth = 160, - barColours = { - timed = {r1 = 0, g1 = 0.1843137294054, b1 = 0.50980395078659, r2 = 0.32156863808632, g2 = 0.8431373285635, b2 = 1}, - toggle = {r1 = 0.77647066116333, g1 = 0.60000002384186, b1 = 0.11372549831867, r2 = 0.97254908084869, g2 = 0.87450987100601, b2 = 0.29411765933037}, - passive = {r1 = 0.41960787773132, g1 = 0.38039219379425, b1 = 0.23137256503105, r2 = 0.41960787773132, g2 = 0.38039219379425, b2 = 0.23137256503105}, - }, - }, - [2] = { -- long buffs - anchor = {point = BOTTOMRIGHT, x = -210, y = 0}, - alpha = 1.0, - scale = 1.0, - tooltips = false, - auraGrowth = 'UP', -- UP|DOWN|LEFT|LEFTCENTER|RIGHT|RIGHTCENTER - auraPadding = 4, - auraSort = 'TIME', -- TIME|NAME - auraIconOnRight = true, -- only for vertical growth - showNameBar = true, - -- name - nameFont = 'Univers 67', - nameColour = {r = 0.9, g = 0.9, b = 0.9}, - nameOutline = 'soft-shadow-thick', - nameSize = 16, - -- timer - timerShowTP = false, -- show timer for (T)gogles or (P)assives - timerShowHorz = 'BELOW', -- BELOW|ABOVE|OVER|HIDE - timerShowVert = 'OVER', -- OVER|HIDE - timerFont = 'Univers 67', - timerColour = {r = 0.9, g = 0.9, b = 0.9}, - timerOutline = 'soft-shadow-thick', - timerSize = 14, - barGloss = true, - barWidth = 160, - barColours = { - timed = {r1 = 0, g1 = 0.1843137294054, b1 = 0.50980395078659, r2 = 0.32156863808632, g2 = 0.8431373285635, b2 = 1}, - toggle = {r1 = 0.77647066116333, g1 = 0.60000002384186, b1 = 0.11372549831867, r2 = 0.97254908084869, g2 = 0.87450987100601, b2 = 0.29411765933037}, - passive = {r1 = 0.41960787773132, g1 = 0.38039219379425, b1 = 0.23137256503105, r2 = 0.41960787773132, g2 = 0.38039219379425, b2 = 0.23137256503105}, - }, - }, - [3] = { -- debuffs - anchor = {point = TOPRIGHT, x = 0, y = 0}, - alpha = 1.0, - scale = 1.0, - tooltips = false, - auraGrowth = 'DOWN', -- UP|DOWN|LEFT|LEFTCENTER|RIGHT|RIGHTCENTER - auraPadding = 4, - auraSort = 'TIME', -- TIME|NAME - auraIconOnRight = true, -- only for vertical growth - showNameBar = true, - -- name - nameFont = 'Univers 67', - nameColour = {r = 0.9, g = 0.9, b = 0.9}, - nameOutline = 'soft-shadow-thick', - nameSize = 16, - -- timer - timerShowTP = false, -- show timer for (T)gogles or (P)assives - timerShowHorz = 'BELOW', -- BELOW|ABOVE|OVER|HIDE - timerShowVert = 'OVER', -- OVER|HIDE - timerFont = 'Univers 67', - timerColour = {r = 0.9, g = 0.9, b = 0.9}, - timerOutline = 'soft-shadow-thick', - timerSize = 14, - barGloss = true, - barWidth = 160, - barColours = { - timed = {r1 = 0, g1 = 0.1843137294054, b1 = 0.50980395078659, r2 = 0.32156863808632, g2 = 0.8431373285635, b2 = 1}, - toggle = {r1 = 0.77647066116333, g1 = 0.60000002384186, b1 = 0.11372549831867, r2 = 0.97254908084869, g2 = 0.87450987100601, b2 = 0.29411765933037}, - passive = {r1 = 0.41960787773132, g1 = 0.38039219379425, b1 = 0.23137256503105, r2 = 0.41960787773132, g2 = 0.38039219379425, b2 = 0.23137256503105}, - }, - }, - [4] = { -- target long buffs - anchor = {point = TOP, x = 161, y = 88}, - alpha = 1.0, - scale = 0.8, - tooltips = false, - auraGrowth = 'RIGHT', -- UP|DOWN|LEFT|LEFTCENTER|RIGHT|RIGHTCENTER - auraPadding = 2, - auraSort = 'NAME', -- TIME|NAME - auraIconOnRight = true, -- only for vertical growth - showNameBar = true, - -- name - nameFont = 'Univers 67', - nameColour = {r = 0.9, g = 0.9, b = 0.9}, - nameOutline = 'soft-shadow-thick', - nameSize = 16, - -- timer - timerShowTP = false, -- show timer for (T)gogles or (P)assives - timerShowHorz = 'BELOW', -- BELOW|ABOVE|OVER|HIDE - timerShowVert = 'OVER', -- OVER|HIDE - timerFont = 'Univers 67', - timerColour = {r = 0.9, g = 0.9, b = 0.9}, - timerOutline = 'soft-shadow-thick', - timerSize = 14, - barGloss = true, - barWidth = 160, - barColours = { - timed = {r1 = 0, g1 = 0.1843137294054, b1 = 0.50980395078659, r2 = 0.32156863808632, g2 = 0.8431373285635, b2 = 1}, - toggle = {r1 = 0.77647066116333, g1 = 0.60000002384186, b1 = 0.11372549831867, r2 = 0.97254908084869, g2 = 0.87450987100601, b2 = 0.29411765933037}, - passive = {r1 = 0.41960787773132, g1 = 0.38039219379425, b1 = 0.23137256503105, r2 = 0.41960787773132, g2 = 0.38039219379425, b2 = 0.23137256503105}, - }, - }, - [5] = { -- debuffs - anchor = {point = TOPRIGHT, x = 0, y = 0}, - alpha = 1.0, - scale = 1.0, - tooltips = false, - auraGrowth = 'DOWN', -- UP|DOWN|LEFT|LEFTCENTER|RIGHT|RIGHTCENTER - auraPadding = 4, - auraSort = 'TIME', -- TIME|NAME - auraIconOnRight = true, -- only for vertical growth - showNameBar = true, - -- name - nameFont = 'Univers 67', - nameColour = {r = 0.9, g = 0.9, b = 0.9}, - nameOutline = 'soft-shadow-thick', - nameSize = 16, - -- timer - timerShowTP = false, -- show timer for (T)gogles or (P)assives - timerShowHorz = 'BELOW', -- BELOW|ABOVE|OVER|HIDE - timerShowVert = 'OVER', -- OVER|HIDE - timerFont = 'Univers 67', - timerColour = {r = 0.9, g = 0.9, b = 0.9}, - timerOutline = 'soft-shadow-thick', - timerSize = 14, - barGloss = true, - barWidth = 160, - barColours = { - timed = {r1 = 0, g1 = 0.1843137294054, b1 = 0.50980395078659, r2 = 0.32156863808632, g2 = 0.8431373285635, b2 = 1}, - toggle = {r1 = 0.77647066116333, g1 = 0.60000002384186, b1 = 0.11372549831867, r2 = 0.97254908084869, g2 = 0.87450987100601, b2 = 0.29411765933037}, - passive = {r1 = 0.41960787773132, g1 = 0.38039219379425, b1 = 0.23137256503105, r2 = 0.41960787773132, g2 = 0.38039219379425, b2 = 0.23137256503105}, - }, - }, - }, -} - -function Srendarr.OnInitialize(code, addon) - if (addon ~= Srendarr.name) then return end - - local self = Srendarr - - EVENT_MANAGER:UnregisterForEvent(self.name, EVENT_ADD_ON_LOADED) - SLASH_COMMANDS[self.slash] = self.SlashCommand - - self.db = ZO_SavedVars:New('SrendarrDB', self.versionDB, nil, defaults) - - L = self:GetLocale() - - for x = 1, 5 do - local db = self.db.frames[x] - self.auraAnchors[x] = self.AuraAnchor:New(x, db.anchor.point, db.anchor.x, db.anchor.y, db.scale) - self.auraFrames[x] = self.AuraFrame:New(x, db.alpha) - self.auraSceneFragments[x] = ZO_HUDFadeSceneFragment:New(self.auraAnchors[x]) - - HUD_SCENE:AddFragment(self.auraSceneFragments[x]) - HUD_UI_SCENE:AddFragment(self.auraSceneFragments[x]) - SIEGE_BAR_SCENE:AddFragment(self.auraSceneFragments[x]) - end - - self:InitializeEvents() - self:InitializeOnUpdate() - self:InitializeAbilityCheck() - self:InitializeSettings() -end - -function Srendarr.SlashCommand(text) - if (text == 'lock') then - for _, frame in pairs(Srendarr.auraAnchors) do - frame:DisableDrag() - end - - Srendarr.ui_Locked = true - elseif (text == 'unlock') then - for _, frame in pairs(Srendarr.auraAnchors) do - frame:EnableDrag() - end - - Srendarr.ui_Locked = false - else - CHAT_SYSTEM:AddMessage(Srendarr:GetLocale().Usage) - end -end - --- Remove all auras (called on player death and settings changes) -function Srendarr:StripAuras() - self:ClearTimers() -- end all update timers - - for _, frame in pairs(self.auraFrames) do - frame:RemoveAllAuras() - end -end - --- Check and add auras that are 'known' to the player, called on player alive, settings changes and 'proper' zone changes -function Srendarr:UpdateAuras() - self:StripAuras() - - local numAuras = GetNumBuffs('player') - local auraFrameShort = self.auraFrames[1] - local auraFrameDebuffs = self.auraFrames[3] - local auraFrameLong = self.db.combineBuff and self.auraFrames[1] or self.auraFrames[2] - local updateShort = false - local updateLong = false - local updateDebuff = false - - if (self.db.showTargetAurasDebuff) then - local numAurasTarget = GetNumBuffs('reticleover') - - if (numAurasTarget > 0) then - for x = 1, numAurasTarget do - local name, start, finish, buff, stack, icon, _, effectType, abilityType, _, abilityId = GetUnitBuffInfo('reticleover', x) - local isShield = abilityType == ABILITY_TYPE_DAMAGESHIELD - - -- Skip Minor Buffs - if (Srendarr.db.hideMinorBuffs and Srendarr.MinorBuffs[abilityId] ~= nil) then - return - end - - -- Skip Major Buffs - if (Srendarr.db.hideMajorBuffs and Srendarr.MajorBuffs[abilityId] ~= nil) then - return - end - - if (finish > start) then - if (Srendarr:IsWatchedTimedTarget(name)) then - auraFrameShort:AddAura(1, 2, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - end - end - end - - auraFrameShort:UpdateDisplay() - end - end - - if (numAuras > 0) then -- existing 'known' auras, re-add and UpdateDisplay - for x = 1, numAuras do - local name, start, finish, buff, stack, icon, _, effectType, abilityType, statusEffectType, abilityId = GetUnitBuffInfo('player', x) - - local isShield = abilityType == ABILITY_TYPE_DAMAGESHIELD - - -- Skip Minor Buffs - if (Srendarr.db.hideMinorBuffs and Srendarr.MinorBuffs[abilityId] ~= nil) then - return - end - - -- Skip Major Buffs - if (Srendarr.db.hideMajorBuffs and Srendarr.MajorBuffs[abilityId] ~= nil) then - return - end - - if (finish > start) then -- timed ability - if(effectType == BUFF_EFFECT_TYPE_DEBUFF) then - if (Srendarr:IsWatchedTimed(name)) then - auraFrameDebuffs:AddAura(1, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - updateDebuff = true - updateShort = true - end - else - if (finish - start < self.db.shortBuffThreshold) then - if (Srendarr:IsWatchedTimed(name)) then - auraFrameShort:AddAura(1, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - updateShort = true - end - else - if (self:IsWatchedTimed(name)) then - auraFrameLong:AddAura(2, 1, name, icon, start, finish, isShield, abilityType, buff, abilityId, effectType) - updateLong = true - end - end - end - elseif (self:IsToggled(name)) then -- toggled ability - if (self.db.showToggle) then -- showing toggled - auraFrameLong:AddAura(3, 1, name, icon, 1, 1, isShield, abilityType, buff, abilityId, effectType) - updateLong = true - end - else -- passive (assumption: passives have start = finish) - if (abilityType == ABILITY_TYPE_REGISTERTRIGGER) then - auraFrameShort:AddAura(4, 1, name, icon, 1, 1, isShield, abilityType, buff, abilityId, effectType) - updateShort = true - elseif (self:IsWatchedPassive(name, abilityType)) then -- validate against user settings - auraFrameLong:AddAura(4, 1, name, icon, 1, 1, isShield, abilityType, buff, abilityId, effectType) - updateLong = true - end - end - if (abilityType == ABILITY_TYPE_REGISTERTRIGGER) then - local slotNum = self:GetTriggeredSlotNum(name) - if slotNum then - local actionButton = ZO_ActionBar_GetButton(slotNum) - self:PlayProcAnimations(actionButton) - end - end - if (name == L.Passive_MedicinalUse) then - self:SetMedicinalUseCoefficient(abilityId) - end - end - end - - if (updateShort) then - auraFrameShort:UpdateDisplay() - end - if (updateDebuff) then - auraFrameDebuffs:UpdateDisplay() - end - if (updateLong) then - auraFrameLong:UpdateDisplay() - end -end - -do -- TIMER AND STATUSBAR UPDATE HANDLER - local RATE = Srendarr.UPDATE_RATE - local FADE_TIME = Srendarr.AURA_FADE_TIME * -1 - local CAST_TIME = 1 -- fake 'max cast time' to make a facsimile casting bar when needed - - local strformat = string.format - local math_floor = math.floor - local math_max = math.max - - local seconds = '' - local minutes = '' - local hours = '' - local cast = '' - local auraTimers = { - [1] = {}, -- buffs - [2] = {}, -- debuffs - [3] = {}, -- target buffs - [4] = {}, -- target debuffs - } - local nextUpdate = 0 - local percent, remaining - - local function FormatTime(remaining) - if (remaining < 60) then -- seconds - return strformat(seconds, remaining) - elseif (remaining < 3600) then -- minutes - return strformat(minutes, math_floor(remaining / 60)) - else -- hours - return strformat(hours, math_floor(remaining / 3600)) - end - end - - local function OnUpdate(self, updateTime) - if (updateTime >= nextUpdate) then - for _, timers in pairs(auraTimers) do - for _, aura in pairs(timers) do - remaining = aura.k_finish - updateTime - - if (remaining < FADE_TIME) then -- expired and finished fading, kill - aura.k_frame:RemoveAura(aura.k_name) - elseif (remaining <= 0) then -- expired but hasn't faded yet - if (not aura.k_isGhost) then - aura:Ghost() - end - - aura:SetAlpha(math_max(0, 1 - (remaining / FADE_TIME))) - elseif (aura.k_start > updateTime) then -- must have a cast time - aura.bar:SetValue(math_max(0, (updateTime - aura.k_start) + CAST_TIME)) - aura.timer:SetText(cast) - else -- normal timer - aura.bar:SetValue(1 - ((updateTime - aura.k_start) / (aura.k_finish - aura.k_start))) - aura.timer:SetText(FormatTime(remaining)) - end - end - end - - nextUpdate = updateTime + RATE - end - end - - function Srendarr:AddTimer(bdType, name, aura) - if (not auraTimers[bdType][name]) then - auraTimers[bdType][name] = aura - end - end - - function Srendarr:RemoveTimer(bdType, name) - if (auraTimers[bdType][name]) then - auraTimers[bdType][name] = nil - end - end - - function Srendarr:ClearTimers() - for _, timers in pairs(auraTimers) do - for name in pairs(timers) do - timers[name] = nil - end - end - end - - function Srendarr:ClearTimerType(bdType) - for name in pairs(auraTimers[bdType]) do - auraTimers[bdType][name] = nil - end - end - - function Srendarr:InitializeOnUpdate() - local L = Srendarr:GetLocale() - - seconds = L.Time_Seconds - minutes = L.Time_Minutes - hours = L.Time_Hours - cast = L.Time_Cast - - Srendarr:SetHandler('OnUpdate', OnUpdate) - end -end - -EVENT_MANAGER:RegisterForEvent(Srendarr.name, EVENT_ADD_ON_LOADED, Srendarr.OnInitialize) diff --git a/Srendarr.txt b/Srendarr.txt index 2ac5a1e..24f7ba0 100644 --- a/Srendarr.txt +++ b/Srendarr.txt @@ -1,8 +1,8 @@ ## Title: |c67b1e9S|c4779ce'rendarr|r ## Description: Adds graphical tracking of buffs and debuffs on both yourself and others in a manner that meshes with the stock interface theme. -## Version: 1.6.1 -## Author: Kith, |cEFEBBEGarkin|r, |c4779cesilentgecko|r -## APIVersion: 100013 +## Version: 2.1.5 +## Author: Kith, |cEFEBBEGarkin, silentgecko|r +## APIVersion: 100014 ## SavedVariables: SrendarrDB ## OptionalDependsOn: LibAddonMenu-2.0 LibMediaProvider-1.0 @@ -22,27 +22,26 @@ Lib/LibAddonMenu-2.0/controls/header.lua Lib/LibAddonMenu-2.0/controls/slider.lua Lib/LibAddonMenu-2.0/controls/texture.lua Lib/LibAddonMenu-2.0/controls/iconpicker.lua -Lib/LAM-fontblock.lua -Lib/LAM-doublecolor.lua Srendarr.xml -Srendarr.lua Locales\Local_en.lua -Locales\Local_fr.lua Locales\Local_de.lua +Locales\Local_fr.lua Locales\Local_ru.lua -Aura.lua -AuraAnchor.lua -AuraFrame.lua - +Defaults.lua AuraData.lua -Events.lua -Settings.lua +Core.lua + +Aura.lua +DisplayFrame.lua +AuraControl.lua +CastBar.lua +Procs.lua -MinorMajorBuffs.lua +Settings.lua ; DISCLAIMER: ; diff --git a/Srendarr.xml b/Srendarr.xml index d90c657..67d7d3c 100644 --- a/Srendarr.xml +++ b/Srendarr.xml @@ -1,5 +1,6 @@ <GuiXml> - <Controls> - <TopLevelControl name="Srendarr" /> - </Controls> + <Controls> + <TopLevelControl name="Srendarr" /> + <TopLevelControl name="Srendarr_CastBar" hidden="true" clampedToScreen="true" /> + </Controls> </GuiXml>