Browse Source

Regular auto-commit at 17:13:23 on 22/11/2022

master
Quildra 3 years ago
parent
commit
206e59a2d6
  1. 13
      Interface/AddOns/ElvUI/Core/General/Cooldowns.lua
  2. 133
      Interface/AddOns/ElvUI/Core/Modules/ActionBars/ActionBars.lua
  3. 13
      Interface/AddOns/ElvUI/Core/Modules/ActionBars/Bind.lua
  4. 52
      Interface/AddOns/ElvUI/Core/Modules/Bags/Bags.lua
  5. 25
      Interface/AddOns/ElvUI/Core/Modules/DataBars/Experience.lua
  6. 8
      Interface/AddOns/ElvUI/Core/Modules/DataTexts/DataTexts.lua
  7. 2
      Interface/AddOns/ElvUI/Core/Modules/Maps/Minimap.lua
  8. 9
      Interface/AddOns/ElvUI/Core/Modules/Misc/LootRoll.lua
  9. 29
      Interface/AddOns/ElvUI/Core/Modules/Misc/TotemTracker.lua
  10. 2
      Interface/AddOns/ElvUI/Core/Modules/Nameplates/Nameplates.lua
  11. 44
      Interface/AddOns/ElvUI/Core/Modules/Tooltip/Tooltip.lua
  12. 5
      Interface/AddOns/ElvUI/Core/Modules/UnitFrames/UnitFrames.lua
  13. 2
      Interface/AddOns/ElvUI/ElvUI_Classic.toc
  14. 2
      Interface/AddOns/ElvUI/ElvUI_Mainline.toc
  15. 2
      Interface/AddOns/ElvUI/ElvUI_Wrath.toc
  16. 60
      Interface/AddOns/ElvUI/Mainline/Modules/DataTexts/SpecSwitch.lua
  17. 21
      Interface/AddOns/ElvUI/Mainline/Modules/Skins/Character.lua
  18. 490
      Interface/AddOns/ElvUI_Libraries/Core/LibActionButton-1.0/LibActionButton-1.0.lua
  19. 13
      Interface/AddOns/ElvUI_Libraries/Core/oUF/elements/stagger.lua
  20. 2
      Interface/AddOns/ElvUI_Options/Core/Tooltip.lua
  21. 2
      Interface/AddOns/ElvUI_Options/Locales/deDE.lua
  22. 2
      Interface/AddOns/ElvUI_Options/Locales/enUS.lua
  23. 2
      Interface/AddOns/ElvUI_Options/Locales/esMX.lua
  24. 2
      Interface/AddOns/ElvUI_Options/Locales/frFR.lua
  25. 2
      Interface/AddOns/ElvUI_Options/Locales/itIT.lua
  26. 2
      Interface/AddOns/ElvUI_Options/Locales/koKR.lua
  27. 2
      Interface/AddOns/ElvUI_Options/Locales/ptBR.lua
  28. 2
      Interface/AddOns/ElvUI_Options/Locales/ruRU.lua
  29. 2
      Interface/AddOns/ElvUI_Options/Locales/trTR.lua
  30. 4
      Interface/AddOns/ElvUI_Options/Locales/zhCN.lua
  31. 2
      Interface/AddOns/ElvUI_Options/Locales/zhTW.lua
  32. 7
      Interface/AddOns/ElvUI_SLE/CHANGELOG.txt
  33. 4
      Interface/AddOns/ElvUI_SLE/ElvUI_SLE.toc
  34. 5
      Interface/AddOns/ElvUI_SLE/locales/english.lua
  35. 4
      Interface/AddOns/ElvUI_SLE/modules/blizzard.lua
  36. 291
      Interface/AddOns/ElvUI_SLE/modules/datatexts/currency.lua
  37. 3
      Interface/AddOns/ElvUI_SLE/modules/datatexts/friends.lua
  38. 37
      Interface/AddOns/ElvUI_SLE/modules/equipmanager.lua
  39. 89
      Interface/AddOns/ElvUI_SLE/modules/minimap/instance.lua
  40. 74
      Interface/AddOns/ElvUI_SLE/modules/professions/deconstruct.lua
  41. 19
      Interface/AddOns/ElvUI_SLE/modules/tooltips/tooltip.lua
  42. 6
      Interface/AddOns/ElvUI_SLE/options/minimap/instance_c.lua
  43. 50
      Interface/AddOns/Rematch/Main.lua
  44. 8
      Interface/AddOns/Rematch/Process/QueueProcess.lua
  45. 16
      Interface/AddOns/Rematch/Process/Roster.lua
  46. 2
      Interface/AddOns/Rematch/Rematch.toc
  47. 9
      Interface/AddOns/Rematch/Utils.lua
  48. 4
      Interface/AddOns/Rematch/changelog.txt

13
Interface/AddOns/ElvUI/Core/General/Cooldowns.lua

@ -365,6 +365,7 @@ end
do do
local function RGB(db) return E:CopyTable({r = 1, g = 1, b = 1}, db) end local function RGB(db) return E:CopyTable({r = 1, g = 1, b = 1}, db) end
local function HEX(db) return E:RGBToHex(db.r, db.g, db.b) end local function HEX(db) return E:RGBToHex(db.r, db.g, db.b) end
local dummy9th = '|cFFffffff'
function E:GetCooldownColors(db) function E:GetCooldownColors(db)
if not db then db = E.db.cooldown end -- just incase someone calls this without a first arg use the global if not db then db = E.db.cooldown end -- just incase someone calls this without a first arg use the global
@ -382,7 +383,7 @@ do
RGB(db.modRateColor), RGB(db.modRateColor),
RGB(ab.targetAuraColor), RGB(ab.targetAuraColor),
RGB(ab.expiringAuraColor), RGB(ab.expiringAuraColor),
--> text colors (0 - 8) <-- --> text colors (0 - 9) <--
HEX(db.daysIndicator), HEX(db.daysIndicator),
HEX(db.hoursIndicator), HEX(db.hoursIndicator),
HEX(db.minutesIndicator), HEX(db.minutesIndicator),
@ -391,7 +392,8 @@ do
HEX(db.mmssColorIndicator), HEX(db.mmssColorIndicator),
HEX(db.hhmmColorIndicator), HEX(db.hhmmColorIndicator),
HEX(ab.targetAuraIndicator), HEX(ab.targetAuraIndicator),
HEX(ab.expiringAuraIndicator) HEX(ab.expiringAuraIndicator),
dummy9th -- this shouldn't happen but ya know :)
end end
end end
@ -402,9 +404,9 @@ function E:UpdateCooldownSettings(module)
-- global is the main call from config, all is the core file calls -- global is the main call from config, all is the core file calls
local isModule = module and (module ~= 'global' and module ~= 'all') and E.db[module] and E.db[module].cooldown local isModule = module and (module ~= 'global' and module ~= 'all') and E.db[module] and E.db[module].cooldown
if isModule then if isModule then
if not E.TimeColors[module] then E.TimeColors[module] = {} end if not timeColors[module] then timeColors[module] = {} end
if not E.TimeIndicatorColors[module] then E.TimeIndicatorColors[module] = {} end if not textColors[module] then textColors[module] = {} end
db, timeColors, textColors = E.db[module].cooldown, E.TimeColors[module], E.TimeIndicatorColors[module] db, timeColors, textColors = E.db[module].cooldown, timeColors[module], textColors[module]
end end
--> color for TIME that has X remaining <-- --> color for TIME that has X remaining <--
@ -428,6 +430,7 @@ function E:UpdateCooldownSettings(module)
textColors[6], -- hhmmColorIndicator textColors[6], -- hhmmColorIndicator
textColors[7], -- targetAuraIndicator textColors[7], -- targetAuraIndicator
textColors[8], -- expiringAuraIndicator textColors[8], -- expiringAuraIndicator
textColors[9], -- dummy9th
_ = E:GetCooldownColors(db) _ = E:GetCooldownColors(db)
if module == 'actionbar' then -- special population for target aura as they only have 2 colors (expiring or not) if module == 'actionbar' then -- special population for target aura as they only have 2 colors (expiring or not)

133
Interface/AddOns/ElvUI/Core/Modules/ActionBars/ActionBars.lua

@ -7,24 +7,23 @@ local format, gsub, strsplit, strfind, strsub, strupper = format, gsub, strsplit
local ClearOnBarHighlightMarks = ClearOnBarHighlightMarks local ClearOnBarHighlightMarks = ClearOnBarHighlightMarks
local ClearOverrideBindings = ClearOverrideBindings local ClearOverrideBindings = ClearOverrideBindings
local ClearPetActionHighlightMarks = ClearPetActionHighlightMarks or PetActionBar.ClearPetActionHighlightMarks
local CreateFrame = CreateFrame local CreateFrame = CreateFrame
local GetBindingKey = GetBindingKey local GetBindingKey = GetBindingKey
local GetCVarBool = GetCVarBool local GetCVarBool = GetCVarBool
local GetOverrideBarIndex = GetOverrideBarIndex
local GetSpellBookItemInfo = GetSpellBookItemInfo local GetSpellBookItemInfo = GetSpellBookItemInfo
local GetTempShapeshiftBarIndex = GetTempShapeshiftBarIndex
local GetVehicleBarIndex = GetVehicleBarIndex
local HasOverrideActionBar = HasOverrideActionBar local HasOverrideActionBar = HasOverrideActionBar
local hooksecurefunc = hooksecurefunc local hooksecurefunc = hooksecurefunc
local InClickBindingMode = InClickBindingMode local InClickBindingMode = InClickBindingMode
local InCombatLockdown = InCombatLockdown local InCombatLockdown = InCombatLockdown
local IsPossessBarVisible = IsPossessBarVisible local IsPossessBarVisible = IsPossessBarVisible
local PetDismiss = PetDismiss local PetDismiss = PetDismiss
local GetOverrideBarIndex = GetOverrideBarIndex
local GetTempShapeshiftBarIndex = GetTempShapeshiftBarIndex
local RegisterStateDriver = RegisterStateDriver local RegisterStateDriver = RegisterStateDriver
local SecureHandlerSetFrameRef = SecureHandlerSetFrameRef local SecureHandlerSetFrameRef = SecureHandlerSetFrameRef
local SetClampedTextureRotation = SetClampedTextureRotation local SetClampedTextureRotation = SetClampedTextureRotation
local SetCVar = SetCVar local SetCVar = SetCVar
local GetVehicleBarIndex = GetVehicleBarIndex
local SetModifiedClick = SetModifiedClick local SetModifiedClick = SetModifiedClick
local SetOverrideBindingClick = SetOverrideBindingClick local SetOverrideBindingClick = SetOverrideBindingClick
local UnitAffectingCombat = UnitAffectingCombat local UnitAffectingCombat = UnitAffectingCombat
@ -45,7 +44,9 @@ local TOOLTIP_UPDATE_TIME = TOOLTIP_UPDATE_TIME
local NUM_ACTIONBAR_BUTTONS = NUM_ACTIONBAR_BUTTONS local NUM_ACTIONBAR_BUTTONS = NUM_ACTIONBAR_BUTTONS
local COOLDOWN_TYPE_LOSS_OF_CONTROL = COOLDOWN_TYPE_LOSS_OF_CONTROL local COOLDOWN_TYPE_LOSS_OF_CONTROL = COOLDOWN_TYPE_LOSS_OF_CONTROL
local CLICK_BINDING_NOT_AVAILABLE = CLICK_BINDING_NOT_AVAILABLE local CLICK_BINDING_NOT_AVAILABLE = CLICK_BINDING_NOT_AVAILABLE
local C_PetBattles_IsInBattle = C_PetBattles and C_PetBattles.IsInBattle local C_PetBattles_IsInBattle = C_PetBattles and C_PetBattles.IsInBattle
local ClearPetActionHighlightMarks = ClearPetActionHighlightMarks or PetActionBar.ClearPetActionHighlightMarks
local LAB = E.Libs.LAB local LAB = E.Libs.LAB
local LSM = E.Libs.LSM local LSM = E.Libs.LSM
@ -580,6 +581,7 @@ function AB:UpdateButtonSettings(specific)
if not specific or specific == barName then if not specific or specific == barName then
AB:UpdateButtonConfig(barName, bar.bindButtons) -- config them first AB:UpdateButtonConfig(barName, bar.bindButtons) -- config them first
AB:PositionAndSizeBar(barName) -- db is set here, button style also runs here AB:PositionAndSizeBar(barName) -- db is set here, button style also runs here
for _, button in ipairs(bar.buttons) do for _, button in ipairs(bar.buttons) do
AB:StyleFlyout(button) AB:StyleFlyout(button)
end end
@ -605,9 +607,13 @@ function AB:UpdateButtonSettings(specific)
if E.Retail then if E.Retail then
AB:UpdateExtraBindings() AB:UpdateExtraBindings()
end AB:UpdateFlyoutButtons()
AB:UpdateFlyoutButtons() -- handle LAB custom flyout button sizes again
if LAB.FlyoutButtons then
AB:LAB_FlyoutSpells()
end
end
end end
end end
@ -835,6 +841,8 @@ do
button:SetScript('OnEnter', AB.SpellButtonOnEnter) button:SetScript('OnEnter', AB.SpellButtonOnEnter)
button:SetScript('OnLeave', AB.SpellButtonOnLeave) button:SetScript('OnLeave', AB.SpellButtonOnLeave)
AB:StyleFlyout(button) -- not a part of the taint fix, this just gets the arrows in line
button.OnEnter = AB.SpellButtonOnEnter button.OnEnter = AB.SpellButtonOnEnter
button.OnLeave = AB.SpellButtonOnLeave button.OnLeave = AB.SpellButtonOnLeave
end end
@ -1355,10 +1363,21 @@ function AB:SpellFlyout_OnLeave()
end end
function AB:UpdateFlyoutButtons() function AB:UpdateFlyoutButtons()
if _G.SpellFlyout then _G.SpellFlyout.Background:Hide() end
if _G.LABFlyoutHandlerFrame then _G.LABFlyoutHandlerFrame.Background:Hide() end
local isShown = _G.SpellFlyout:IsShown()
local btn, i = _G['SpellFlyoutButton1'], 1 local btn, i = _G['SpellFlyoutButton1'], 1
while btn do while btn do
AB:SetupFlyoutButton(btn) if isShown then
btn.isFlyout = true AB:SetupFlyoutButton(btn)
end
AB:StyleFlyout(btn)
if not btn.isFlyout then
btn.isFlyout = true -- so we can ignore it on binding
end
i = i + 1 i = i + 1
btn = _G['SpellFlyoutButton'..i] btn = _G['SpellFlyoutButton'..i]
@ -1380,59 +1399,53 @@ function AB:SetupFlyoutButton(button)
MasqueGroup:RemoveButton(button) --Remove first to fix issue with backdrops appearing at the wrong flyout menu MasqueGroup:RemoveButton(button) --Remove first to fix issue with backdrops appearing at the wrong flyout menu
MasqueGroup:AddButton(button) MasqueGroup:AddButton(button)
end end
if E.Retail then
_G.SpellFlyout.Background:Hide()
end
end end
function AB:StyleFlyout(button) function AB:StyleFlyout(button, arrow)
if not (button.FlyoutBorder and button.FlyoutArrow and button.FlyoutArrow:IsShown() and LAB.buttonRegistry[button]) then return end if button.FlyoutBorder then button.FlyoutBorder:SetAlpha(0) end
if button.FlyoutBorderShadow then button.FlyoutBorderShadow:SetAlpha(0) end
button.FlyoutBorder:SetAlpha(0)
button.FlyoutBorderShadow:SetAlpha(0)
_G.SpellFlyoutHorizontalBackground:SetAlpha(0)
_G.SpellFlyoutVerticalBackground:SetAlpha(0)
_G.SpellFlyoutBackgroundEnd:SetAlpha(0)
local actionbar = button:GetParent()
local parent = actionbar and actionbar:GetParent()
local parentName = parent and parent:GetName()
if parentName == 'SpellBookSpellIconsFrame' then
return
elseif actionbar then
-- Change arrow direction depending on what bar the button is on
local arrowDistance = 2
if _G.SpellFlyout:IsShown() and _G.SpellFlyout:GetParent() == button then
arrowDistance = 5
end
local direction = (actionbar.db and actionbar.db.flyoutDirection) or 'AUTOMATIC' local bar = button:GetParent()
local point = direction == 'AUTOMATIC' and E:GetScreenQuadrant(actionbar) local barName = bar:GetName()
local parent = bar:GetParent()
local owner = parent and parent:GetParent()
local ownerName = owner and owner:GetName()
local btn = (ownerName == 'SpellBookSpellIconsFrame' and parent) or button
if not arrow then arrow = btn.FlyoutArrow or (btn.FlyoutArrowContainer and btn.FlyoutArrowContainer.FlyoutArrowNormal) end
if not arrow then return end
if barName == 'SpellBookSpellIconsFrame' or ownerName == 'SpellBookSpellIconsFrame' then
local distance = (_G.SpellFlyout and _G.SpellFlyout:IsShown() and _G.SpellFlyout:GetParent() == parent) and 7 or 4
arrow:ClearAllPoints()
arrow:Point('RIGHT', btn, 'RIGHT', distance, 0)
elseif bar and AB.handledbuttons[button] then -- Change arrow direction depending on what bar the button is on
local direction = (bar.db and bar.db.flyoutDirection) or 'AUTOMATIC'
local point = direction == 'AUTOMATIC' and E:GetScreenQuadrant(bar)
if point == 'UNKNOWN' then return end if point == 'UNKNOWN' then return end
local noCombat = not InCombatLockdown() local noCombat = not InCombatLockdown()
local distance = (_G.LABFlyoutHandlerFrame and _G.LABFlyoutHandlerFrame:IsShown() and _G.LABFlyoutHandlerFrame:GetParent() == button) and 5 or 2
if direction == 'DOWN' or (point and strfind(point, 'TOP')) then if direction == 'DOWN' or (point and strfind(point, 'TOP')) then
button.FlyoutArrow:ClearAllPoints() arrow:ClearAllPoints()
button.FlyoutArrow:Point('BOTTOM', button, 'BOTTOM', 0, -arrowDistance) arrow:Point('BOTTOM', button, 'BOTTOM', 0, -distance)
SetClampedTextureRotation(button.FlyoutArrow, 180) SetClampedTextureRotation(arrow, 180)
if noCombat then button:SetAttribute('flyoutDirection', 'DOWN') end if noCombat then button:SetAttribute('flyoutDirection', 'DOWN') end
elseif direction == 'LEFT' or point == 'RIGHT' then elseif direction == 'LEFT' or point == 'RIGHT' then
button.FlyoutArrow:ClearAllPoints() arrow:ClearAllPoints()
button.FlyoutArrow:Point('LEFT', button, 'LEFT', -arrowDistance, 0) arrow:Point('LEFT', button, 'LEFT', -distance, 0)
SetClampedTextureRotation(button.FlyoutArrow, 270) SetClampedTextureRotation(arrow, 270)
if noCombat then button:SetAttribute('flyoutDirection', 'LEFT') end if noCombat then button:SetAttribute('flyoutDirection', 'LEFT') end
elseif direction == 'RIGHT' or point == 'LEFT' then elseif direction == 'RIGHT' or point == 'LEFT' then
button.FlyoutArrow:ClearAllPoints() arrow:ClearAllPoints()
button.FlyoutArrow:Point('RIGHT', button, 'RIGHT', arrowDistance, 0) arrow:Point('RIGHT', button, 'RIGHT', distance, 0)
SetClampedTextureRotation(button.FlyoutArrow, 90) SetClampedTextureRotation(arrow, 90)
if noCombat then button:SetAttribute('flyoutDirection', 'RIGHT') end if noCombat then button:SetAttribute('flyoutDirection', 'RIGHT') end
elseif direction == 'UP' or point == 'CENTER' or (point and strfind(point, 'BOTTOM')) then elseif direction == 'UP' or point == 'CENTER' or (point and strfind(point, 'BOTTOM')) then
button.FlyoutArrow:ClearAllPoints() arrow:ClearAllPoints()
button.FlyoutArrow:Point('TOP', button, 'TOP', 0, arrowDistance) arrow:Point('TOP', button, 'TOP', 0, distance)
SetClampedTextureRotation(button.FlyoutArrow, 0) SetClampedTextureRotation(arrow, 0)
if noCombat then button:SetAttribute('flyoutDirection', 'UP') end if noCombat then button:SetAttribute('flyoutDirection', 'UP') end
end end
end end
@ -1497,6 +1510,25 @@ function AB:SetButtonDesaturation(button, duration)
end end
end end
function AB:LAB_FlyoutUpdate(btn, arrow)
AB:StyleFlyout(btn, arrow)
end
function AB:LAB_FlyoutSpells()
if LAB.FlyoutButtons then
for _, btn in next, LAB.FlyoutButtons do
AB:SetupFlyoutButton(btn)
end
end
end
function AB:LAB_FlyoutCreated(btn)
AB:SetupFlyoutButton(btn)
btn:SetScale(1)
btn.MasqueSkinned = true -- skip LAB styling
end
function AB:LAB_ChargeCreated(_, cd) function AB:LAB_ChargeCreated(_, cd)
E:RegisterCooldown(cd, 'actionbar') E:RegisterCooldown(cd, 'actionbar')
end end
@ -1563,6 +1595,9 @@ function AB:Initialize()
LAB.RegisterCallback(AB, 'OnButtonUpdate', AB.LAB_ButtonUpdate) LAB.RegisterCallback(AB, 'OnButtonUpdate', AB.LAB_ButtonUpdate)
LAB.RegisterCallback(AB, 'OnButtonCreated', AB.LAB_ButtonCreated) LAB.RegisterCallback(AB, 'OnButtonCreated', AB.LAB_ButtonCreated)
LAB.RegisterCallback(AB, 'OnFlyoutCreated', AB.LAB_FlyoutCreated)
LAB.RegisterCallback(AB, 'OnFlyoutSpells', AB.LAB_FlyoutSpells)
LAB.RegisterCallback(AB, 'OnFlyoutUpdate', AB.LAB_FlyoutUpdate)
LAB.RegisterCallback(AB, 'OnChargeCreated', AB.LAB_ChargeCreated) LAB.RegisterCallback(AB, 'OnChargeCreated', AB.LAB_ChargeCreated)
LAB.RegisterCallback(AB, 'OnCooldownUpdate', AB.LAB_CooldownUpdate) LAB.RegisterCallback(AB, 'OnCooldownUpdate', AB.LAB_CooldownUpdate)
LAB.RegisterCallback(AB, 'OnCooldownDone', AB.LAB_CooldownDone) LAB.RegisterCallback(AB, 'OnCooldownDone', AB.LAB_CooldownDone)
@ -1652,6 +1687,8 @@ function AB:Initialize()
if E.Retail then if E.Retail then
hooksecurefunc(_G.SpellFlyout, 'Show', AB.UpdateFlyoutButtons) hooksecurefunc(_G.SpellFlyout, 'Show', AB.UpdateFlyoutButtons)
hooksecurefunc(_G.SpellFlyout, 'Hide', AB.UpdateFlyoutButtons)
_G.SpellFlyout:HookScript('OnEnter', AB.SpellFlyout_OnEnter) _G.SpellFlyout:HookScript('OnEnter', AB.SpellFlyout_OnEnter)
_G.SpellFlyout:HookScript('OnLeave', AB.SpellFlyout_OnLeave) _G.SpellFlyout:HookScript('OnLeave', AB.SpellFlyout_OnLeave)
end end

13
Interface/AddOns/ElvUI/Core/Modules/ActionBars/Bind.lua

@ -84,7 +84,8 @@ function AB:BindListener(key)
end end
--Check if this button can open a flyout menu --Check if this button can open a flyout menu
local isFlyout = (bind.button.FlyoutArrow and bind.button.FlyoutArrow:IsShown()) local hasArrow = bind.button.FlyoutArrow or (bind.button.FlyoutArrowContainer and bind.button.FlyoutArrowContainer.FlyoutArrowNormal)
local isFlyout = (hasArrow and hasArrow:IsShown())
if key == 'LSHIFT' or key == 'RSHIFT' or key == 'LCTRL' or key == 'RCTRL' if key == 'LSHIFT' or key == 'RSHIFT' or key == 'LCTRL' or key == 'RCTRL'
or key == 'LALT' or key == 'RALT' or key == 'UNKNOWN' then return end or key == 'LALT' or key == 'RALT' or key == 'UNKNOWN' then return end
@ -174,12 +175,12 @@ function AB:BindUpdate(button, spellmacro)
button.bindstring = nil -- keep this clean button.bindstring = nil -- keep this clean
if spellmacro == 'FLYOUT' then if spellmacro == 'FLYOUT' then
bind.name = button.spellName bind.name = button.spellName or button:GetAttribute('spellName') -- attribute is from the LAB custom flyout
button.bindstring = spellmacro..' '..bind.name if bind.name then button.bindstring = 'SPELL '..bind.name end
elseif spellmacro == 'SPELL' then elseif spellmacro == 'SPELL' then
button.id = SpellBook_GetSpellBookSlot(button) button.id = SpellBook_GetSpellBookSlot(button)
bind.name = GetSpellBookItemName(button.id, _G.SpellBookFrame.bookType) bind.name = button.id and GetSpellBookItemName(button.id, _G.SpellBookFrame.bookType) or nil
button.bindstring = spellmacro..' '..bind.name if bind.name then button.bindstring = 'SPELL '..bind.name end
elseif spellmacro == 'MACRO' then elseif spellmacro == 'MACRO' then
button.id = button.selectionIndex or button:GetID() button.id = button.selectionIndex or button:GetID()
@ -188,7 +189,7 @@ function AB:BindUpdate(button, spellmacro)
end end
bind.name = GetMacroInfo(button.id) bind.name = GetMacroInfo(button.id)
button.bindstring = spellmacro..' '..bind.name if bind.name then button.bindstring = 'MACRO '..bind.name end
elseif spellmacro == 'MICRO' then elseif spellmacro == 'MICRO' then
bind.name = button.tooltipText bind.name = button.tooltipText
button.bindstring = button.commandName button.bindstring = button.commandName

52
Interface/AddOns/ElvUI/Core/Modules/Bags/Bags.lua

@ -766,7 +766,7 @@ function B:Holder_OnEnter()
GameTooltip:AddLine(' ') GameTooltip:AddLine(' ')
GameTooltip:AddLine(L["Shift + Left Click to Toggle Bag"], .8, .8, .8) GameTooltip:AddLine(L["Shift + Left Click to Toggle Bag"], .8, .8, .8)
if E.Retail and (self.BagID ~= BACKPACK_CONTAINER and self.BagID ~= REAGENT_CONTAINER) then if E.Retail then
GameTooltip:AddLine(L["Right Click to Open Menu"], .8, .8, .8) GameTooltip:AddLine(L["Right Click to Open Menu"], .8, .8, .8)
end end
@ -831,12 +831,9 @@ end
function B:AssignBagFlagMenu() function B:AssignBagFlagMenu()
local holder = B.AssignBagDropdown.holder local holder = B.AssignBagDropdown.holder
local bagID = holder and holder.BagID local bagID = holder and holder.BagID
if not bagID then return end if bagID and bagID ~= BANK_CONTAINER and not IsInventoryItemProfessionBag('player', holder:GetID()) then
local canAssign = bagID ~= BACKPACK_CONTAINER and bagID ~= BANK_CONTAINER and bagID ~= REAGENT_CONTAINER
if canAssign and not IsInventoryItemProfessionBag('player', holder:GetID()) then
E:SetEasyMenuAnchor(E.EasyMenu, holder) E:SetEasyMenuAnchor(E.EasyMenu, holder)
_G.EasyMenu(B.AssignMenu, E.EasyMenu, nil, nil, nil, 'MENU') _G.EasyMenu((bagID == BACKPACK_CONTAINER or bagID == REAGENT_CONTAINER) and B.AssignMain or B.AssignMenu, E.EasyMenu, nil, nil, nil, 'MENU')
end end
end end
@ -2661,30 +2658,31 @@ function B:Initialize()
} }
if E.Retail then if E.Retail then
B.AssignMenu = { local FILTER_ASSIGN = { text = BAG_FILTER_ASSIGN_TO, isTitle = true, notCheckable = true }
{ text = BAG_FILTER_ASSIGN_TO, isTitle = true, notCheckable = true }, local FILTER_CLEANUP = { text = BAG_FILTER_CLEANUP, isTitle = true, notCheckable = true }
{ text = BAG_FILTER_CLEANUP, isTitle = true, notCheckable = true }, local FILTER_IGNORE = { text = BAG_FILTER_IGNORE,
{ text = BAG_FILTER_IGNORE, checked = function()
checked = function() return B:IsSortIgnored(B.AssignBagDropdown.holder.BagID)
return B:IsSortIgnored(B.AssignBagDropdown.holder.BagID) end,
end, func = function(_, _, _, value)
func = function(_, _, _, value) local BagID = B.AssignBagDropdown.holder.BagID
local BagID = B.AssignBagDropdown.holder.BagID if BagID == BANK_CONTAINER then
if BagID == BANK_CONTAINER then SetBankAutosortDisabled(not value)
SetBankAutosortDisabled(not value) elseif BagID == BACKPACK_CONTAINER then
elseif BagID == BACKPACK_CONTAINER then SetBackpackAutosortDisabled(not value)
SetBackpackAutosortDisabled(not value) elseif BagID > NUM_BAG_SLOTS then
elseif BagID > NUM_BAG_SLOTS then SetBankBagSlotFlag(BagID - NUM_BAG_SLOTS, FILTER_FLAG_IGNORE, not value)
SetBankBagSlotFlag(BagID - NUM_BAG_SLOTS, FILTER_FLAG_IGNORE, not value) else
else SetBagSlotFlag(BagID, FILTER_FLAG_IGNORE, not value)
SetBagSlotFlag(BagID, FILTER_FLAG_IGNORE, not value)
end
B.AssignBagDropdown.holder = nil
end end
}
B.AssignBagDropdown.holder = nil
end
} }
B.AssignMain = { FILTER_CLEANUP, FILTER_IGNORE }
B.AssignMenu = { FILTER_ASSIGN, FILTER_CLEANUP, FILTER_IGNORE }
for i, flag in next, B.GearFilters do for i, flag in next, B.GearFilters do
if i ~= FILTER_FLAG_IGNORE then if i ~= FILTER_FLAG_IGNORE then
tinsert(B.AssignMenu, i, { tinsert(B.AssignMenu, i, {

25
Interface/AddOns/ElvUI/Core/Modules/DataBars/Experience.lua

@ -2,7 +2,9 @@ local E, L, V, P, G = unpack(ElvUI)
local DB = E:GetModule('DataBars') local DB = E:GetModule('DataBars')
local LSM = E.Libs.LSM local LSM = E.Libs.LSM
local min, format = min, format local min, type, format = min, type, format
local pairs, error = pairs, error
local CreateFrame = CreateFrame local CreateFrame = CreateFrame
local GetXPExhaustion = GetXPExhaustion local GetXPExhaustion = GetXPExhaustion
local GetQuestLogRewardXP = GetQuestLogRewardXP local GetQuestLogRewardXP = GetQuestLogRewardXP
@ -12,10 +14,10 @@ local GetQuestLogTitle = GetQuestLogTitle
local UnitXP, UnitXPMax = UnitXP, UnitXPMax local UnitXP, UnitXPMax = UnitXP, UnitXPMax
local GameTooltip = GameTooltip local GameTooltip = GameTooltip
local C_QuestLog_GetQuestWatchType = C_QuestLog.GetQuestWatchType
local C_QuestLog_GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries local C_QuestLog_GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries
local C_QuestLog_ReadyForTurnIn = C_QuestLog.ReadyForTurnIn local C_QuestLog_ReadyForTurnIn = C_QuestLog.ReadyForTurnIn
local C_QuestLog_GetInfo = C_QuestLog.GetInfo local C_QuestLog_GetInfo = C_QuestLog.GetInfo
local C_QuestLog_GetQuestWatchType = C_QuestLog.GetQuestWatchType
local CurrentXP, XPToLevel, PercentRested, PercentXP, RemainXP, RemainTotal, RemainBars local CurrentXP, XPToLevel, PercentRested, PercentXP, RemainXP, RemainTotal, RemainBars
local RestedXP, QuestLogXP = 0, 0 local RestedXP, QuestLogXP = 0, 0
@ -156,6 +158,25 @@ function DB:ExperienceBar_QuestXP()
else else
bar.Quest:Hide() bar.Quest:Hide()
end end
if DB.CustomQuestXPWatchers then
for _, func in pairs(DB.CustomQuestXPWatchers) do
func(QuestLogXP)
end
end
end
function DB:RegisterCustomQuestXPWatcher(name, func)
if not name or not func or type(name) ~= 'string' or type(func) ~= 'function' then
error('Usage: DB:RegisterCustomQuestXPWatcher(name [string], func [function])')
return
end
if not DB.CustomQuestXPWatchers then
DB.CustomQuestXPWatchers = {}
end
DB.CustomQuestXPWatchers[name] = func
end end
function DB:ExperienceBar_OnEnter() function DB:ExperienceBar_OnEnter()

8
Interface/AddOns/ElvUI/Core/Modules/DataTexts/DataTexts.lua

@ -785,6 +785,14 @@ function DT:Initialize()
if E.Retail then if E.Retail then
hooksecurefunc(_G.C_CurrencyInfo, 'SetCurrencyBackpack', function() DT:ForceUpdate_DataText('Currencies') end) hooksecurefunc(_G.C_CurrencyInfo, 'SetCurrencyBackpack', function() DT:ForceUpdate_DataText('Currencies') end)
hooksecurefunc(_G.C_ClassTalents, 'UpdateLastSelectedSavedConfigID', function(_, newConfigID)
if not newConfigID then return end
DT.ClassTalentsID = newConfigID
DT:ForceUpdate_DataText('Talent/Loot Specialization')
end)
else else
hooksecurefunc('SetCurrencyBackpack', function() DT:ForceUpdate_DataText('Currencies') end) hooksecurefunc('SetCurrencyBackpack', function() DT:ForceUpdate_DataText('Currencies') end)
end end

2
Interface/AddOns/ElvUI/Core/Modules/Maps/Minimap.lua

@ -199,10 +199,10 @@ end
function M:SetupHybridMinimap() function M:SetupHybridMinimap()
local MapCanvas = _G.HybridMinimap.MapCanvas local MapCanvas = _G.HybridMinimap.MapCanvas
MapCanvas:SetMaskTexture(E.Media.Textures.White8x8)
MapCanvas:SetScript('OnMouseWheel', M.Minimap_OnMouseWheel) MapCanvas:SetScript('OnMouseWheel', M.Minimap_OnMouseWheel)
MapCanvas:SetScript('OnMouseDown', M.MapCanvas_OnMouseDown) MapCanvas:SetScript('OnMouseDown', M.MapCanvas_OnMouseDown)
MapCanvas:SetScript('OnMouseUp', E.noop) MapCanvas:SetScript('OnMouseUp', E.noop)
MapCanvas:SetMaskTexture()
_G.HybridMinimap.CircleMask:StripTextures() _G.HybridMinimap.CircleMask:StripTextures()
end end

9
Interface/AddOns/ElvUI/Core/Modules/Misc/LootRoll.lua

@ -260,9 +260,9 @@ function M:START_LOOT_ROLL(_, rollID, rollTime)
if cancelled_rolls[rollID] then return end if cancelled_rolls[rollID] then return end
local db = E.db.general.lootRoll local db = E.db.general.lootRoll
local link = GetLootRollItemLink(rollID) local itemLink = GetLootRollItemLink(rollID)
local texture, name, count, quality, bop, canNeed, canGreed, canDisenchant = GetLootRollItemInfo(rollID) local texture, name, count, quality, bop, canNeed, canGreed, canDisenchant = GetLootRollItemInfo(rollID)
local _, _, _, itemLevel, _, _, _, _, _, _, _, itemClassID, _, bindType = GetItemInfo(link) local _, _, _, itemLevel, _, _, _, _, itemEquipLoc, _, _, itemClassID, itemSubClassID, bindType = GetItemInfo(itemLink)
local color = ITEM_QUALITY_COLORS[quality] local color = ITEM_QUALITY_COLORS[quality]
local f = M:LootFrame_GetFrame() local f = M:LootFrame_GetFrame()
@ -271,14 +271,15 @@ function M:START_LOOT_ROLL(_, rollID, rollTime)
f.rollID = rollID f.rollID = rollID
f.time = rollTime f.time = rollTime
f.button.link = link f.button.link = itemLink
f.button.rollID = rollID f.button.rollID = rollID
f.button:RegisterEvent('MODIFIER_STATE_CHANGED') f.button:RegisterEvent('MODIFIER_STATE_CHANGED')
f.button.icon:SetTexture(texture) f.button.icon:SetTexture(texture)
f.button.stack:SetShown(count > 1) f.button.stack:SetShown(count > 1)
f.button.stack:SetText(count) f.button.stack:SetText(count)
f.button.ilvl:SetShown(B:IsItemEligibleForItemLevelDisplay(itemClassID, itemSubClassID, itemEquipLoc, quality))
f.button.ilvl:SetText(itemLevel) f.button.ilvl:SetText(itemLevel)
f.button.questIcon:SetShown(B:GetItemQuestInfo(link, bindType, itemClassID)) f.button.questIcon:SetShown(B:GetItemQuestInfo(itemLink, bindType, itemClassID))
f.need:SetEnabled(canNeed) f.need:SetEnabled(canNeed)
f.greed:SetEnabled(canGreed) f.greed:SetEnabled(canGreed)

29
Interface/AddOns/ElvUI/Core/Modules/Misc/TotemTracker.lua

@ -12,31 +12,33 @@ local MAX_TOTEMS = MAX_TOTEMS
-- SHAMAN_TOTEM_PRIORITIES does not work here because we need to swap 3/4 instead of 1/2 -- SHAMAN_TOTEM_PRIORITIES does not work here because we need to swap 3/4 instead of 1/2
local priority = E.myclass == 'SHAMAN' and { [1]=1, [2]=2, [3]=4, [4]=3 } or STANDARD_TOTEM_PRIORITIES local priority = E.myclass == 'SHAMAN' and { [1]=1, [2]=2, [3]=4, [4]=3 } or STANDARD_TOTEM_PRIORITIES
function T:UpdateButton(button, totem, show) function T:UpdateButton(button, totem)
if show and totem then if not (button and totem) then return end
local _, _, startTime, duration, icon = GetTotemInfo(totem.slot)
local haveTotem, _, startTime, duration, icon = GetTotemInfo(totem.slot)
button:SetShown(haveTotem and duration > 0)
if haveTotem then
button.iconTexture:SetTexture(icon) button.iconTexture:SetTexture(icon)
button.cooldown:SetCooldown(startTime, duration) button.cooldown:SetCooldown(startTime, duration)
totem:ClearAllPoints() if totem:GetParent() ~= button.holder then
totem:SetParent(button.holder) totem:ClearAllPoints()
totem:SetAllPoints(button.holder) totem:SetParent(button.holder)
totem:SetAllPoints(button.holder)
end
end end
button:SetShown(show)
end end
function T:HideTotem() function T:HideTotem()
local i = priority[self.layoutIndex] T:UpdateButton(T.bar[priority[self.layoutIndex]], self)
T:UpdateButton(T.bar[i], self, false)
end end
function T:Update() function T:Update()
if E.Retail then if E.Retail then
for totem in next, _G.TotemFrame.totemPool.activeObjects do for totem in next, _G.TotemFrame.totemPool.activeObjects do
local i = priority[totem.layoutIndex] T:UpdateButton(T.bar[priority[totem.layoutIndex]], totem)
T:UpdateButton(T.bar[i], totem, true)
if totem:GetScript('OnHide') ~= T.HideTotem then if totem:GetScript('OnHide') ~= T.HideTotem then
totem:SetScript('OnHide', T.HideTotem) totem:SetScript('OnHide', T.HideTotem)
@ -44,8 +46,7 @@ function T:Update()
end end
else else
for i = 1, MAX_TOTEMS do for i = 1, MAX_TOTEMS do
local totem = _G['TotemFrameTotem'..i] T:UpdateButton(T.bar[priority[i]], _G['TotemFrameTotem'..i])
T:UpdateButton(T.bar[priority[i]], totem, totem and totem:IsShown())
end end
end end
end end

2
Interface/AddOns/ElvUI/Core/Modules/Nameplates/Nameplates.lua

@ -450,7 +450,7 @@ function NP:GetClassAnchor()
end end
function NP:SetupTarget(nameplate, removed) function NP:SetupTarget(nameplate, removed)
if not NP.db.units then return end if not (NP.db.units and NP.db.units.TARGET) then return end
local TCP = _G.ElvNP_TargetClassPower local TCP = _G.ElvNP_TargetClassPower
local cp = NP.db.units.TARGET.classpower local cp = NP.db.units.TARGET.classpower

44
Interface/AddOns/ElvUI/Core/Modules/Tooltip/Tooltip.lua

@ -129,19 +129,11 @@ function TT:GameTooltip_SetDefaultAnchor(tt, parent)
statusBar:Point('TOPLEFT', tt, 'BOTTOMLEFT', E.Border, -spacing) statusBar:Point('TOPLEFT', tt, 'BOTTOMLEFT', E.Border, -spacing)
statusBar:Point('TOPRIGHT', tt, 'BOTTOMRIGHT', -E.Border, -spacing) statusBar:Point('TOPRIGHT', tt, 'BOTTOMRIGHT', -E.Border, -spacing)
statusBar.anchoredToTop = nil statusBar.anchoredToTop = nil
if statusBar.text then
statusBar.text:Point('CENTER', statusBar, 0, 0)
end
elseif position == 'TOP' and not statusBar.anchoredToTop then elseif position == 'TOP' and not statusBar.anchoredToTop then
statusBar:ClearAllPoints() statusBar:ClearAllPoints()
statusBar:Point('BOTTOMLEFT', tt, 'TOPLEFT', E.Border, spacing) statusBar:Point('BOTTOMLEFT', tt, 'TOPLEFT', E.Border, spacing)
statusBar:Point('BOTTOMRIGHT', tt, 'TOPRIGHT', -E.Border, spacing) statusBar:Point('BOTTOMRIGHT', tt, 'TOPRIGHT', -E.Border, spacing)
statusBar.anchoredToTop = true statusBar.anchoredToTop = true
if statusBar.text then
statusBar.text:Point('CENTER', statusBar, 0, 0)
end
end end
end end
@ -801,7 +793,11 @@ function TT:MODIFIER_STATE_CHANGED()
if not GameTooltip:IsForbidden() and GameTooltip:IsShown() then if not GameTooltip:IsForbidden() and GameTooltip:IsShown() then
local owner = GameTooltip:GetOwner() local owner = GameTooltip:GetOwner()
if owner == _G.UIParent and UnitExists('mouseover') then if owner == _G.UIParent and UnitExists('mouseover') then
GameTooltip:SetUnit('mouseover') if E.Retail then
GameTooltip:RefreshData()
else
GameTooltip:SetUnit('mouseover')
end
elseif owner and owner:GetParent() == _G.SpellBookSpellIconsFrame then elseif owner and owner:GetParent() == _G.SpellBookSpellIconsFrame then
AB.SpellButtonOnEnter(owner, nil, GameTooltip) AB.SpellButtonOnEnter(owner, nil, GameTooltip)
end end
@ -969,12 +965,21 @@ function TT:SetTooltipFonts()
end end
end end
function TT:WorldCursorTooltipUpdate(_, state) function TT:GameTooltip_Hide()
if GameTooltip:IsForbidden() then return end if GameTooltip:IsForbidden() then return end
local statusBar = GameTooltip.StatusBar
if statusBar and statusBar:IsShown() then
statusBar:Hide()
end
end
function TT:WorldCursorTooltipUpdate(_, state)
if GameTooltip:IsForbidden() or TT.db.cursorAnchor then return end
-- recall this, something called Show and stopped it (now with refade option) -- recall this, something called Show and stopped it (now with refade option)
-- cursor anchor is always hidden right away regardless -- cursor anchor is always hidden right away regardless
if state == 0 and not TT.db.cursorAnchor then if state == 0 then
if TT.db.fadeOut then if TT.db.fadeOut then
GameTooltip:FadeOut() GameTooltip:FadeOut()
else else
@ -989,12 +994,15 @@ function TT:Initialize()
if not E.private.tooltip.enable then return end if not E.private.tooltip.enable then return end
TT.Initialized = true TT.Initialized = true
GameTooltip.StatusBar = GameTooltipStatusBar local statusBar = GameTooltipStatusBar
GameTooltip.StatusBar:Height(TT.db.healthBar.height) statusBar:Height(TT.db.healthBar.height)
GameTooltip.StatusBar:SetScript('OnValueChanged', nil) -- Do we need to unset this? statusBar:SetScript('OnValueChanged', nil) -- Do we need to unset this?
GameTooltip.StatusBar.text = GameTooltip.StatusBar:CreateFontString(nil, 'OVERLAY') GameTooltip.StatusBar = statusBar
GameTooltip.StatusBar.text:Point('CENTER', GameTooltip.StatusBar, 0, 0)
GameTooltip.StatusBar.text:FontTemplate(LSM:Fetch('font', TT.db.healthBar.font), TT.db.healthBar.fontSize, TT.db.healthBar.fontOutline) local statusText = statusBar:CreateFontString(nil, 'OVERLAY')
statusText:FontTemplate(LSM:Fetch('font', TT.db.healthBar.font), TT.db.healthBar.fontSize, TT.db.healthBar.fontOutline)
statusText:Point('CENTER', statusBar, 0, 0)
statusBar.text = statusText
--Tooltip Fonts --Tooltip Fonts
if not GameTooltip.hasMoney then if not GameTooltip.hasMoney then
@ -1027,6 +1035,8 @@ function TT:Initialize()
AddTooltipPostCall(TooltipDataType.Spell, TT.GameTooltip_OnTooltipSetSpell) AddTooltipPostCall(TooltipDataType.Spell, TT.GameTooltip_OnTooltipSetSpell)
AddTooltipPostCall(TooltipDataType.Item, TT.GameTooltip_OnTooltipSetItem) AddTooltipPostCall(TooltipDataType.Item, TT.GameTooltip_OnTooltipSetItem)
AddTooltipPostCall(TooltipDataType.Unit, TT.GameTooltip_OnTooltipSetUnit) AddTooltipPostCall(TooltipDataType.Unit, TT.GameTooltip_OnTooltipSetUnit)
TT:SecureHook(GameTooltip, 'Hide', 'GameTooltip_Hide') -- dont use OnHide use Hide directly
else else
TT:SecureHookScript(GameTooltip, 'OnTooltipSetSpell', TT.GameTooltip_OnTooltipSetSpell) TT:SecureHookScript(GameTooltip, 'OnTooltipSetSpell', TT.GameTooltip_OnTooltipSetSpell)
TT:SecureHookScript(GameTooltip, 'OnTooltipSetItem', TT.GameTooltip_OnTooltipSetItem) TT:SecureHookScript(GameTooltip, 'OnTooltipSetItem', TT.GameTooltip_OnTooltipSetItem)

5
Interface/AddOns/ElvUI/Core/Modules/UnitFrames/UnitFrames.lua

@ -1121,6 +1121,11 @@ function UF:DisableBlizzard()
_G.UIParent:UnregisterEvent('GROUP_ROSTER_UPDATE') _G.UIParent:UnregisterEvent('GROUP_ROSTER_UPDATE')
end end
-- shutdown monk stagger bar background updates
if disable.player and _G.MonkStaggerBar then
_G.MonkStaggerBar:UnregisterAllEvents()
end
-- shutdown some background updates on party unitframes -- shutdown some background updates on party unitframes
if disable.party and _G.CompactPartyFrame then if disable.party and _G.CompactPartyFrame then
_G.CompactPartyFrame:UnregisterAllEvents() _G.CompactPartyFrame:UnregisterAllEvents()

2
Interface/AddOns/ElvUI/ElvUI_Classic.toc

@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r |cfd9b9b9bClassic|r ## Title: |cff1784d1ElvUI|r |cfd9b9b9bClassic|r
## Notes: User Interface Replacement ## Notes: User Interface Replacement
## Author: Elv, Simpy ## Author: Elv, Simpy
## Version: 13.04 ## Version: 13.06
## SavedVariables: ElvDB, ElvPrivateDB ## SavedVariables: ElvDB, ElvPrivateDB
## SavedVariablesPerCharacter: ElvCharacterDB ## SavedVariablesPerCharacter: ElvCharacterDB
## OptionalDeps: SharedMedia, Tukui, Masque ## OptionalDeps: SharedMedia, Tukui, Masque

2
Interface/AddOns/ElvUI/ElvUI_Mainline.toc

@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r ## Title: |cff1784d1ElvUI|r
## Notes: User Interface Replacement ## Notes: User Interface Replacement
## Author: Elv, Simpy ## Author: Elv, Simpy
## Version: 13.04 ## Version: 13.06
## SavedVariables: ElvDB, ElvPrivateDB ## SavedVariables: ElvDB, ElvPrivateDB
## SavedVariablesPerCharacter: ElvCharacterDB ## SavedVariablesPerCharacter: ElvCharacterDB
## OptionalDeps: SharedMedia, Tukui, Masque, Blizzard_PetJournal ## OptionalDeps: SharedMedia, Tukui, Masque, Blizzard_PetJournal

2
Interface/AddOns/ElvUI/ElvUI_Wrath.toc

@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r |cfd9b9b9bWrath|r ## Title: |cff1784d1ElvUI|r |cfd9b9b9bWrath|r
## Notes: User Interface Replacement ## Notes: User Interface Replacement
## Author: Elv, Simpy ## Author: Elv, Simpy
## Version: 13.04 ## Version: 13.06
## SavedVariables: ElvDB, ElvPrivateDB ## SavedVariables: ElvDB, ElvPrivateDB
## SavedVariablesPerCharacter: ElvCharacterDB ## SavedVariablesPerCharacter: ElvCharacterDB
## OptionalDeps: SharedMedia, Tukui, Masque ## OptionalDeps: SharedMedia, Tukui, Masque

60
Interface/AddOns/ElvUI/Mainline/Modules/DataTexts/SpecSwitch.lua

@ -2,7 +2,7 @@ local E, L, V, P, G = unpack(ElvUI)
local DT = E:GetModule('DataTexts') local DT = E:GetModule('DataTexts')
local _G = _G local _G = _G
local ipairs, tinsert = ipairs, tinsert local ipairs, tinsert, tremove = ipairs, tinsert, tremove
local format, next, strjoin = format, next, strjoin local format, next, strjoin = format, next, strjoin
local GetLootSpecialization = GetLootSpecialization local GetLootSpecialization = GetLootSpecialization
@ -21,13 +21,11 @@ local ShowUIPanel = ShowUIPanel
local C_SpecializationInfo_GetAllSelectedPvpTalentIDs = C_SpecializationInfo.GetAllSelectedPvpTalentIDs local C_SpecializationInfo_GetAllSelectedPvpTalentIDs = C_SpecializationInfo.GetAllSelectedPvpTalentIDs
local C_Traits_GetConfigInfo = C_Traits.GetConfigInfo local C_Traits_GetConfigInfo = C_Traits.GetConfigInfo
local LoadConfig = C_ClassTalents.LoadConfig
local GetHasStarterBuild = C_ClassTalents.GetHasStarterBuild local GetHasStarterBuild = C_ClassTalents.GetHasStarterBuild
local GetStarterBuildActive = C_ClassTalents.GetStarterBuildActive local GetStarterBuildActive = C_ClassTalents.GetStarterBuildActive
local SetStarterBuildActive = C_ClassTalents.SetStarterBuildActive
local GetConfigIDsBySpecID = C_ClassTalents.GetConfigIDsBySpecID local GetConfigIDsBySpecID = C_ClassTalents.GetConfigIDsBySpecID
local GetLastSelectedSavedConfigID = C_ClassTalents.GetLastSelectedSavedConfigID local GetLastSelectedSavedConfigID = C_ClassTalents.GetLastSelectedSavedConfigID
local UpdateLastSelectedSavedConfigID = C_ClassTalents.UpdateLastSelectedSavedConfigID local CanUseClassTalents = PlayerUtil.CanUseClassTalents
local LOOT = LOOT local LOOT = LOOT
local UNKNOWN = UNKNOWN local UNKNOWN = UNKNOWN
@ -59,22 +57,27 @@ local specText = '|T%s:14:14:0:0:64:64:4:60:4:60|t %s'
local function starter_checked() local function starter_checked()
return GetStarterBuildActive() return GetStarterBuildActive()
end end
local function starter_func(_, arg1)
SetStarterBuildActive(true)
UpdateLastSelectedSavedConfigID(arg1, STARTER_ID)
end
local function loadout_checked(data) local function loadout_checked(data)
return data and data.arg1 and data.arg2 == GetLastSelectedSavedConfigID(data.arg1) return data and data.arg1 == DT.ClassTalentsID
end end
local function loadout_func(_, arg1, arg2)
LoadConfig(arg2, true)
if GetLastSelectedSavedConfigID(arg1) ~= STARTER_ID then local loadout_func
SetStarterBuildActive(false) do
local loadoutID
local function loadout_callback(_, configID)
return configID == loadoutID
end end
UpdateLastSelectedSavedConfigID(arg1, arg2) loadout_func = function(_, arg1)
if not _G.ClassTalentFrame then
_G.ClassTalentFrame_LoadUI()
end
loadoutID = arg1
_G.ClassTalentFrame.TalentsTab:LoadConfigByPredicate(loadout_callback)
end
end end
local function menu_checked(data) return data and data.arg1 == GetLootSpecialization() end local function menu_checked(data) return data and data.arg1 == GetLootSpecialization() end
@ -83,7 +86,7 @@ local function menu_func(_, arg1) SetLootSpecialization(arg1) end
local function spec_checked(data) return data and data.arg1 == GetSpecialization() end local function spec_checked(data) return data and data.arg1 == GetSpecialization() end
local function spec_func(_, arg1) SetSpecialization(arg1) end local function spec_func(_, arg1) SetSpecialization(arg1) end
local function OnEvent(self, event) local function OnEvent(self, event, loadoutID)
lastPanel = self lastPanel = self
if #menuList == 2 then if #menuList == 2 then
@ -106,25 +109,38 @@ local function OnEvent(self, event)
return return
end end
if E.mylevel >= 10 and ( event == 'CONFIG_COMMIT_FAILED' or event == 'ELVUI_FORCE_UPDATE' or event == 'TRAIT_CONFIG_UPDATED' or event == 'TRAIT_CONFIG_DELETED' ) then if (event == 'CONFIG_COMMIT_FAILED' or event == 'ELVUI_FORCE_UPDATE' or event == 'TRAIT_CONFIG_DELETED') and CanUseClassTalents() then
if not DT.ClassTalentsID then
DT.ClassTalentsID = (GetHasStarterBuild() and GetStarterBuildActive() and STARTER_ID) or GetLastSelectedSavedConfigID(ID)
end
local builds = GetConfigIDsBySpecID(ID) local builds = GetConfigIDsBySpecID(ID)
if builds and not builds[STARTER_ID] and GetHasStarterBuild() then if builds and GetHasStarterBuild() then
tinsert(builds, STARTER_ID) tinsert(builds, STARTER_ID)
end end
if event == 'TRAIT_CONFIG_DELETED' then
for index = #loadoutList, 2, -1 do -- reverse loop to remove the deleted config from the loadout list
local loadout = loadoutList[index]
if loadout and loadout.arg1 == loadoutID then
tremove(loadoutList, index)
end
end
end
for index, configID in next, builds do for index, configID in next, builds do
if configID == STARTER_ID then if configID == STARTER_ID then
loadoutList[index + 1] = { text = STARTER_TEXT, checked = starter_checked, func = starter_func, arg1 = ID } loadoutList[index + 1] = { text = STARTER_TEXT, checked = starter_checked, func = loadout_func, arg1 = STARTER_ID }
else else
local configInfo = C_Traits_GetConfigInfo(configID) local configInfo = C_Traits_GetConfigInfo(configID)
loadoutList[index + 1] = { text = configInfo and configInfo.name or UNKNOWN, checked = loadout_checked, func = loadout_func, arg1 = ID, arg2 = configID } loadoutList[index + 1] = { text = configInfo and configInfo.name or UNKNOWN, checked = loadout_checked, func = loadout_func, arg1 = configID }
end end
end end
end end
local activeLoadout = DEFAULT_TEXT local activeLoadout = DEFAULT_TEXT
for index, loadout in next, loadoutList do for index, loadout in next, loadoutList do
if index > 1 and loadout:checked(loadout.arg1, loadout.arg2) then if index > 1 and loadout.arg1 == DT.ClassTalentsID then
activeLoadout = loadout.text activeLoadout = loadout.text
break break
end end
@ -183,7 +199,7 @@ local function OnEnter()
for index, loadout in next, loadoutList do for index, loadout in next, loadoutList do
if index > 1 then if index > 1 then
local text = loadout:checked(loadout.arg1, loadout.arg2) and activeString or inactiveString local text = loadout:checked() and activeString or inactiveString
DT.tooltip:AddLine(strjoin(' - ', loadout.text, text), 1, 1, 1) DT.tooltip:AddLine(strjoin(' - ', loadout.text, text), 1, 1, 1)
end end
end end
@ -254,4 +270,4 @@ local function ValueColorUpdate()
end end
E.valueColorUpdateFuncs[ValueColorUpdate] = true E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Talent/Loot Specialization', nil, { 'PLAYER_TALENT_UPDATE', 'ACTIVE_TALENT_GROUP_CHANGED', 'PLAYER_LOOT_SPEC_UPDATED', 'CONFIG_COMMIT_FAILED', 'TRAIT_CONFIG_UPDATED', 'TRAIT_CONFIG_DELETED' }, OnEvent, nil, OnClick, OnEnter, nil, L["Talent/Loot Specialization"]) DT:RegisterDatatext('Talent/Loot Specialization', nil, { 'PLAYER_TALENT_UPDATE', 'ACTIVE_TALENT_GROUP_CHANGED', 'PLAYER_LOOT_SPEC_UPDATED', 'TRAIT_CONFIG_DELETED' }, OnEvent, nil, OnClick, OnEnter, nil, L["Talent/Loot Specialization"])

21
Interface/AddOns/ElvUI/Mainline/Modules/Skins/Character.lua

@ -102,6 +102,18 @@ local function EquipmentUpdateItems()
end end
end end
local function EquipmentUpdateNavigation()
local navi = _G.EquipmentFlyoutFrame.NavigationFrame
if not navi then return end
navi:ClearAllPoints()
navi:Point('TOPLEFT', _G.EquipmentFlyoutFrameButtons, 'BOTTOMLEFT', 0, -E.Border - E.Spacing)
navi:Point('TOPRIGHT', _G.EquipmentFlyoutFrameButtons, 'BOTTOMRIGHT', 0, -E.Border - E.Spacing)
navi:StripTextures()
navi:SetTemplate('Transparent')
end
local function TabTextureCoords(tex, x1) local function TabTextureCoords(tex, x1)
if x1 ~= 0.16001 then if x1 ~= 0.16001 then
tex:SetTexCoord(0.16001, 0.86, 0.16, 0.86) tex:SetTexCoord(0.16001, 0.86, 0.16, 0.86)
@ -260,15 +272,12 @@ function S:CharacterFrame()
_G.EquipmentFlyoutFrameHighlight:StripTextures() _G.EquipmentFlyoutFrameHighlight:StripTextures()
_G.EquipmentFlyoutFrameButtons.bg1:SetAlpha(0) _G.EquipmentFlyoutFrameButtons.bg1:SetAlpha(0)
_G.EquipmentFlyoutFrameButtons:DisableDrawLayer('ARTWORK') _G.EquipmentFlyoutFrameButtons:DisableDrawLayer('ARTWORK')
_G.EquipmentFlyoutFrame.NavigationFrame:StripTextures()
_G.EquipmentFlyoutFrame.NavigationFrame:SetTemplate('Transparent')
_G.EquipmentFlyoutFrame.NavigationFrame:Point('TOPLEFT', _G.EquipmentFlyoutFrameButtons, 'BOTTOMLEFT', 0, -E.Border - E.Spacing)
_G.EquipmentFlyoutFrame.NavigationFrame:Point('TOPRIGHT', _G.EquipmentFlyoutFrameButtons, 'BOTTOMRIGHT', 0, -E.Border - E.Spacing)
S:HandleNextPrevButton(_G.EquipmentFlyoutFrame.NavigationFrame.PrevButton) S:HandleNextPrevButton(_G.EquipmentFlyoutFrame.NavigationFrame.PrevButton)
S:HandleNextPrevButton(_G.EquipmentFlyoutFrame.NavigationFrame.NextButton) S:HandleNextPrevButton(_G.EquipmentFlyoutFrame.NavigationFrame.NextButton)
-- Swap item flyout frame (shown when holding alt over a slot) hooksecurefunc('EquipmentFlyout_SetBackgroundTexture', EquipmentUpdateNavigation)
hooksecurefunc('EquipmentFlyout_UpdateItems', EquipmentUpdateItems) hooksecurefunc('EquipmentFlyout_UpdateItems', EquipmentUpdateItems) -- Swap item flyout frame (shown when holding alt over a slot)
-- Icon in upper right corner of character frame -- Icon in upper right corner of character frame
_G.CharacterFramePortrait:Kill() _G.CharacterFramePortrait:Kill()

490
Interface/AddOns/ElvUI_Libraries/Core/LibActionButton-1.0/LibActionButton-1.0.lua

@ -1,7 +1,7 @@
-- License: LICENSE.txt -- License: LICENSE.txt
local MAJOR_VERSION = "LibActionButton-1.0-ElvUI" local MAJOR_VERSION = "LibActionButton-1.0-ElvUI"
local MINOR_VERSION = 35 -- the real minor version is 100 local MINOR_VERSION = 37 -- the real minor version is 102
local LibStub = LibStub local LibStub = LibStub
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
@ -18,6 +18,9 @@ local WoWClassic = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)
local WoWBCC = (WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC) local WoWBCC = (WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC)
local WoWWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC) local WoWWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
-- Enable custom flyouts for WoW Retail
local UseCustomFlyout = WoWRetail
local KeyBound = LibStub("LibKeyBound-1.0", true) local KeyBound = LibStub("LibKeyBound-1.0", true)
local CBH = LibStub("CallbackHandler-1.0") local CBH = LibStub("CallbackHandler-1.0")
local LCG = LibStub("LibButtonGlow-1.0", true) local LCG = LibStub("LibButtonGlow-1.0", true)
@ -54,6 +57,9 @@ lib.AuraButtons = AuraButtons
lib.ChargeCooldowns = lib.ChargeCooldowns or {} lib.ChargeCooldowns = lib.ChargeCooldowns or {}
lib.NumChargeCooldowns = lib.NumChargeCooldowns or 0 lib.NumChargeCooldowns = lib.NumChargeCooldowns or 0
lib.FlyoutInfo = lib.FlyoutInfo or {}
lib.FlyoutButtons = lib.FlyoutButtons or {}
lib.ACTION_HIGHLIGHT_MARKS = lib.ACTION_HIGHLIGHT_MARKS or setmetatable({}, { __index = ACTION_HIGHLIGHT_MARKS }) lib.ACTION_HIGHLIGHT_MARKS = lib.ACTION_HIGHLIGHT_MARKS or setmetatable({}, { __index = ACTION_HIGHLIGHT_MARKS })
lib.callbacks = lib.callbacks or CBH:New(lib) lib.callbacks = lib.callbacks or CBH:New(lib)
@ -106,6 +112,8 @@ local UpdateAuraCooldowns -- Simpy
local AURA_COOLDOWNS_ENABLED = true local AURA_COOLDOWNS_ENABLED = true
local AURA_COOLDOWNS_DURATION = 0 local AURA_COOLDOWNS_DURATION = 0
local GetFlyoutHandler
local InitializeEventHandler, OnEvent, ForAllButtons, OnUpdate local InitializeEventHandler, OnEvent, ForAllButtons, OnUpdate
local RangeFont local RangeFont
@ -270,18 +278,26 @@ function lib:CreateButton(id, name, header, config)
SetupSecureSnippets(button) SetupSecureSnippets(button)
WrapOnClick(button) WrapOnClick(button)
-- if there is no button yet, initialize events later
local InitializeEvents = not next(ButtonRegistry)
-- Store the button in the registry, needed for event and OnUpdate handling -- Store the button in the registry, needed for event and OnUpdate handling
if not next(ButtonRegistry) then
InitializeEventHandler()
end
ButtonRegistry[button] = true ButtonRegistry[button] = true
-- setup button configuration
button:UpdateConfig(config) button:UpdateConfig(config)
-- run an initial update -- run an initial update
button:UpdateAction() button:UpdateAction()
UpdateHotkeys(button) UpdateHotkeys(button)
button:SetAttribute("LABUseCustomFlyout", UseCustomFlyout)
-- initialize events
if InitializeEvents then
InitializeEventHandler()
end
-- somewhat of a hack for the Flyout buttons to not error. -- somewhat of a hack for the Flyout buttons to not error.
button.action = 0 button.action = 0
@ -290,6 +306,10 @@ function lib:CreateButton(id, name, header, config)
return button return button
end end
function lib:GetSpellFlyoutFrame()
return lib.flyoutHandler
end
function SetupSecureSnippets(button) function SetupSecureSnippets(button)
button:SetAttribute("_custom", Custom.RunCustom) button:SetAttribute("_custom", Custom.RunCustom)
-- secure UpdateState(self, state) -- secure UpdateState(self, state)
@ -428,6 +448,10 @@ function SetupSecureSnippets(button)
]], [[ ]], [[
self:RunAttribute("UpdateState", self:GetAttribute("state")) self:RunAttribute("UpdateState", self:GetAttribute("state"))
]]) ]])
if UseCustomFlyout then
button.header:SetFrameRef("flyoutHandler", GetFlyoutHandler())
end
end end
function WrapOnClick(button) function WrapOnClick(button)
@ -436,6 +460,17 @@ function WrapOnClick(button)
if self:GetAttribute("type") == "action" then if self:GetAttribute("type") == "action" then
local type, action = GetActionInfo(self:GetAttribute("action")) local type, action = GetActionInfo(self:GetAttribute("action"))
if type == "flyout" and self:GetAttribute("LABUseCustomFlyout") then
local flyoutHandler = owner:GetFrameRef("flyoutHandler")
if not down and flyoutHandler then
flyoutHandler:SetAttribute("flyoutParentHandle", self)
flyoutHandler:RunAttribute("HandleFlyout", action)
end
self:CallMethod("UpdateFlyout")
return false
end
return (button == "Keybind") and "LeftButton" or nil, format("%s|%s", tostring(type), tostring(action)) return (button == "Keybind") and "LeftButton" or nil, format("%s|%s", tostring(type), tostring(action))
end end
@ -452,7 +487,10 @@ end
-- Dynamically handle release casting ~Simpy -- Dynamically handle release casting ~Simpy
local function UpdateReleaseCasting(self, down) local function UpdateReleaseCasting(self, down)
if down then -- being locked, prevents mod key clicks on up because of SecureActionButton_OnClick in retail if self.isFlyout then -- the flyout spell
self:RegisterForClicks('AnyDown', 'AnyUp')
elseif self.isFlyoutButton -- the bar button
or down then -- being locked, prevents mod key clicks on up because of SecureActionButton_OnClick in retail
self:RegisterForClicks('AnyUp') self:RegisterForClicks('AnyUp')
elseif not self.pressReleaseAction then elseif not self.pressReleaseAction then
self:RegisterForClicks(self.config.clickOnDown and 'AnyDown' or 'AnyUp') self:RegisterForClicks(self.config.clickOnDown and 'AnyDown' or 'AnyUp')
@ -465,21 +503,25 @@ end
-- prevent pickup calling spells ~Simpy -- prevent pickup calling spells ~Simpy
function Generic:OnButtonEvent(event, key, down) function Generic:OnButtonEvent(event, key, down)
if not GetCVarBool('lockActionBars') then return end -- not locked if event == "GLOBAL_MOUSE_UP" then
self:UnregisterEvent(event)
local clickDown = self.config.clickOnDown or self.pressReleaseAction UpdateFlyout(self)
if not clickDown then return end -- not key downing elseif GetCVarBool('lockActionBars') then
local clickDown = self.config.clickOnDown or self.pressReleaseAction
if not clickDown then return end -- not key downing
if event == 'MODIFIER_STATE_CHANGED' then if event == 'MODIFIER_STATE_CHANGED' then
if GetModifiedClick('PICKUPACTION') == strsub(key, 2) then if GetModifiedClick('PICKUPACTION') == strsub(key, 2) then
UpdateReleaseCasting(self, down == 1) UpdateReleaseCasting(self, down == 1)
end
elseif event == 'OnEnter' then
local action = GetModifiedClick('PICKUPACTION')
local dragDown = action == 'SHIFT' and IsShiftKeyDown() or action == 'ALT' and IsAltKeyDown() or action == 'CTRL' and IsControlKeyDown()
UpdateReleaseCasting(self, dragDown)
elseif event == 'OnLeave' then
UpdateReleaseCasting(self, not clickDown)
end end
elseif event == 'OnEnter' then
local action = GetModifiedClick('PICKUPACTION')
local dragDown = action == 'SHIFT' and IsShiftKeyDown() or action == 'ALT' and IsAltKeyDown() or action == 'CTRL' and IsControlKeyDown()
UpdateReleaseCasting(self, dragDown)
elseif event == 'OnLeave' then
UpdateReleaseCasting(self, not self.config.clickOnDown)
end end
end end
@ -518,8 +560,7 @@ function Generic:ClearStates()
wipe(self.state_actions) wipe(self.state_actions)
end end
function Generic:SetState(state, kind, action) function Generic:SetStateFromHandlerInsecure(state, kind, action)
if not state then state = self:GetAttribute("state") end
state = tostring(state) state = tostring(state)
-- we allow a nil kind for setting a empty state -- we allow a nil kind for setting a empty state
if not kind then kind = "empty" end if not kind then kind = "empty" end
@ -546,6 +587,13 @@ function Generic:SetState(state, kind, action)
self.state_types[state] = kind self.state_types[state] = kind
self.state_actions[state] = action self.state_actions[state] = action
end
function Generic:SetState(state, kind, action)
if not state then state = self:GetAttribute("state") end
state = tostring(state)
self:SetStateFromHandlerInsecure(state, kind, action)
self:UpdateState(state) self:UpdateState(state)
end end
@ -618,6 +666,357 @@ function Generic:UpdateAlpha()
UpdateCooldown(self) UpdateCooldown(self)
end end
-----------------------------------------------------------
--- flyouts
local DiscoverFlyoutSpells, UpdateFlyoutSpells, UpdateFlyoutHandlerScripts, FlyoutUpdateQueued
if UseCustomFlyout then
-- params: self, flyoutID
local FlyoutHandleFunc = [[
local SPELLFLYOUT_DEFAULT_SPACING = 4
local SPELLFLYOUT_INITIAL_SPACING = 7
local SPELLFLYOUT_FINAL_SPACING = 9
local parent = self:GetAttribute("flyoutParentHandle")
if not parent then return end
if self:IsShown() and self:GetParent() == parent then
self:Hide()
return
end
local flyoutID = ...
local info = LAB_FlyoutInfo[flyoutID]
if not info then print("LAB: Flyout missing with ID " .. flyoutID) return end
local oldParent = self:GetParent()
self:SetParent(parent)
local direction = parent:GetAttribute("flyoutDirection") or "UP"
local usedSlots = 0
local prevButton
for slotID, slotInfo in ipairs(info.slots) do
if slotInfo.isKnown then
usedSlots = usedSlots + 1
local slotButton = self:GetFrameRef("flyoutButton" .. usedSlots)
-- set secure action attributes
slotButton:SetAttribute("type", "spell")
slotButton:SetAttribute("spell", slotInfo.spellID)
-- custom ones for elvui
slotButton:SetAttribute("spellName", slotInfo.spellName)
-- set LAB attributes
slotButton:SetAttribute("labtype-0", "spell")
slotButton:SetAttribute("labaction-0", slotInfo.spellID)
-- run LAB updates
slotButton:CallMethod("SetStateFromHandlerInsecure", 0, "spell", slotInfo.overrideSpellID or slotInfo.spellID)
slotButton:CallMethod("UpdateAction")
slotButton:ClearAllPoints()
if direction == "UP" then
if prevButton then
slotButton:SetPoint("BOTTOM", prevButton, "TOP", 0, SPELLFLYOUT_DEFAULT_SPACING)
else
slotButton:SetPoint("BOTTOM", self, "BOTTOM", 0, SPELLFLYOUT_INITIAL_SPACING)
end
elseif direction == "DOWN" then
if prevButton then
slotButton:SetPoint("TOP", prevButton, "BOTTOM", 0, -SPELLFLYOUT_DEFAULT_SPACING)
else
slotButton:SetPoint("TOP", self, "TOP", 0, -SPELLFLYOUT_INITIAL_SPACING)
end
elseif direction == "LEFT" then
if prevButton then
slotButton:SetPoint("RIGHT", prevButton, "LEFT", -SPELLFLYOUT_DEFAULT_SPACING, 0)
else
slotButton:SetPoint("RIGHT", self, "RIGHT", -SPELLFLYOUT_INITIAL_SPACING, 0)
end
elseif direction == "RIGHT" then
if prevButton then
slotButton:SetPoint("LEFT", prevButton, "RIGHT", SPELLFLYOUT_DEFAULT_SPACING, 0)
else
slotButton:SetPoint("LEFT", self, "LEFT", SPELLFLYOUT_INITIAL_SPACING, 0)
end
end
slotButton:Show()
prevButton = slotButton
end
end
-- hide excess buttons
for i = usedSlots + 1, self:GetAttribute("numFlyoutButtons") do
local slotButton = self:GetFrameRef("flyoutButton" .. i)
if slotButton then
slotButton:Hide()
end
end
if usedSlots == 0 then
self:Hide()
return
end
-- calculate extent for the long dimension
-- 3 pixel extra initial padding, button size + padding, and everything at 0.8 scale
local extent = (3 + (45 + 4) * usedSlots) * 0.8
self:ClearAllPoints()
if direction == "UP" then
self:SetPoint("BOTTOM", parent, "TOP")
self:SetWidth(45)
self:SetHeight(extent)
elseif direction == "DOWN" then
self:SetPoint("TOP", parent, "BOTTOM")
self:SetWidth(45)
self:SetHeight(extent)
elseif direction == "LEFT" then
self:SetPoint("RIGHT", parent, "LEFT")
self:SetWidth(extent)
self:SetHeight(45)
elseif direction == "RIGHT" then
self:SetPoint("LEFT", parent, "RIGHT")
self:SetWidth(extent)
self:SetHeight(45)
end
self:SetFrameStrata("DIALOG")
self:Show()
self:CallMethod("ShowFlyoutInsecure", direction)
if oldParent and oldParent:GetAttribute("LABUseCustomFlyout") then
oldParent:CallMethod("UpdateFlyout")
end
]]
local SPELLFLYOUT_INITIAL_SPACING = 7
local function ShowFlyoutInsecure(self, direction)
self.Background.End:ClearAllPoints()
self.Background.Start:ClearAllPoints()
if direction == "UP" then
self.Background.End:SetPoint("TOP", 0, SPELLFLYOUT_INITIAL_SPACING)
SetClampedTextureRotation(self.Background.End, 0)
SetClampedTextureRotation(self.Background.VerticalMiddle, 0)
self.Background.Start:SetPoint("TOP", self.Background.VerticalMiddle, "BOTTOM")
SetClampedTextureRotation(self.Background.Start, 0)
self.Background.HorizontalMiddle:Hide()
self.Background.VerticalMiddle:Show()
self.Background.VerticalMiddle:ClearAllPoints()
self.Background.VerticalMiddle:SetPoint("TOP", self.Background.End, "BOTTOM")
self.Background.VerticalMiddle:SetPoint("BOTTOM", 0, 0)
elseif direction == "DOWN" then
self.Background.End:SetPoint("BOTTOM", 0, -SPELLFLYOUT_INITIAL_SPACING)
SetClampedTextureRotation(self.Background.End, 180)
SetClampedTextureRotation(self.Background.VerticalMiddle, 180)
self.Background.Start:SetPoint("BOTTOM", self.Background.VerticalMiddle, "TOP")
SetClampedTextureRotation(self.Background.Start, 180)
self.Background.HorizontalMiddle:Hide()
self.Background.VerticalMiddle:Show()
self.Background.VerticalMiddle:ClearAllPoints()
self.Background.VerticalMiddle:SetPoint("BOTTOM", self.Background.End, "TOP")
self.Background.VerticalMiddle:SetPoint("TOP", 0, -0)
elseif direction == "LEFT" then
self.Background.End:SetPoint("LEFT", -SPELLFLYOUT_INITIAL_SPACING, 0)
SetClampedTextureRotation(self.Background.End, 270)
SetClampedTextureRotation(self.Background.HorizontalMiddle, 180)
self.Background.Start:SetPoint("LEFT", self.Background.HorizontalMiddle, "RIGHT")
SetClampedTextureRotation(self.Background.Start, 270)
self.Background.VerticalMiddle:Hide()
self.Background.HorizontalMiddle:Show()
self.Background.HorizontalMiddle:ClearAllPoints()
self.Background.HorizontalMiddle:SetPoint("LEFT", self.Background.End, "RIGHT")
self.Background.HorizontalMiddle:SetPoint("RIGHT", -0, 0)
elseif direction == "RIGHT" then
self.Background.End:SetPoint("RIGHT", SPELLFLYOUT_INITIAL_SPACING, 0)
SetClampedTextureRotation(self.Background.End, 90)
SetClampedTextureRotation(self.Background.HorizontalMiddle, 0)
self.Background.Start:SetPoint("RIGHT", self.Background.HorizontalMiddle, "LEFT")
SetClampedTextureRotation(self.Background.Start, 90)
self.Background.VerticalMiddle:Hide()
self.Background.HorizontalMiddle:Show()
self.Background.HorizontalMiddle:ClearAllPoints()
self.Background.HorizontalMiddle:SetPoint("RIGHT", self.Background.End, "LEFT")
self.Background.HorizontalMiddle:SetPoint("LEFT", 0, 0)
end
if direction == "UP" or direction == "DOWN" then
self.Background.Start:SetWidth(47)
self.Background.HorizontalMiddle:SetWidth(47)
self.Background.VerticalMiddle:SetWidth(47)
self.Background.End:SetWidth(47)
else
self.Background.Start:SetHeight(47)
self.Background.HorizontalMiddle:SetHeight(47)
self.Background.VerticalMiddle:SetHeight(47)
self.Background.End:SetHeight(47)
end
end
function UpdateFlyoutHandlerScripts()
lib.flyoutHandler:SetAttribute("HandleFlyout", FlyoutHandleFunc)
lib.flyoutHandler.ShowFlyoutInsecure = ShowFlyoutInsecure
end
local function FlyoutOnShowHide(self)
local parent = self:GetParent()
if parent and parent.UpdateFlyout then
parent:UpdateFlyout()
end
end
function GetFlyoutHandler()
if not lib.flyoutHandler then
lib.flyoutHandler = CreateFrame("Frame", "LABFlyoutHandlerFrame", UIParent, "SecureHandlerBaseTemplate")
lib.flyoutHandler.Background = CreateFrame("Frame", nil, lib.flyoutHandler)
lib.flyoutHandler.Background:SetAllPoints()
lib.flyoutHandler.Background.End = lib.flyoutHandler.Background:CreateTexture(nil, "BACKGROUND")
lib.flyoutHandler.Background.End:SetAtlas("UI-HUD-ActionBar-IconFrame-FlyoutButton", true)
lib.flyoutHandler.Background.HorizontalMiddle = lib.flyoutHandler.Background:CreateTexture(nil, "BACKGROUND")
lib.flyoutHandler.Background.HorizontalMiddle:SetAtlas("_UI-HUD-ActionBar-IconFrame-FlyoutMidLeft", true)
lib.flyoutHandler.Background.HorizontalMiddle:SetHorizTile(true)
lib.flyoutHandler.Background.VerticalMiddle = lib.flyoutHandler.Background:CreateTexture(nil, "BACKGROUND")
lib.flyoutHandler.Background.VerticalMiddle:SetAtlas("!UI-HUD-ActionBar-IconFrame-FlyoutMid", true)
lib.flyoutHandler.Background.VerticalMiddle:SetVertTile(true)
lib.flyoutHandler.Background.Start = lib.flyoutHandler.Background:CreateTexture(nil, "BACKGROUND")
lib.flyoutHandler.Background.Start:SetAtlas("UI-HUD-ActionBar-IconFrame-FlyoutBottom", true)
lib.flyoutHandler.Background.Start:SetVertexColor(0.7, 0.7, 0.7)
lib.flyoutHandler.Background.HorizontalMiddle:SetVertexColor(0.7, 0.7, 0.7)
lib.flyoutHandler.Background.VerticalMiddle:SetVertexColor(0.7, 0.7, 0.7)
lib.flyoutHandler.Background.End:SetVertexColor(0.7, 0.7, 0.7)
lib.flyoutHandler:Hide()
lib.flyoutHandler:SetScript("OnShow", FlyoutOnShowHide)
lib.flyoutHandler:SetScript("OnHide", FlyoutOnShowHide)
lib.flyoutHandler:SetAttribute("numFlyoutButtons", 0)
UpdateFlyoutHandlerScripts()
end
return lib.flyoutHandler
end
-- sync flyout information to the restricted environment
local InSync = false
local function SyncFlyoutInfoToHandler()
if InCombatLockdown() or InSync then return end
InSync = true
local maxNumSlots = 0
local data = "LAB_FlyoutInfo = newtable();\n"
for flyoutID, info in pairs(lib.FlyoutInfo) do
if info.isKnown then
local numSlots = 0
data = data .. ("local info = newtable();LAB_FlyoutInfo[%d] = info;info.slots = newtable();\n"):format(flyoutID)
for slotID, slotInfo in ipairs(info.slots) do
data = data .. ("local info = newtable();LAB_FlyoutInfo[%d].slots[%d] = info;info.spellID = %d;info.overrideSpellID = %d;info.isKnown = %s;info.spellName = %s;\n"):format(flyoutID, slotID, slotInfo.spellID, slotInfo.overrideSpellID, slotInfo.isKnown and "true" or "nil", slotInfo.spellName and format('"%s"', slotInfo.spellName) or nil)
numSlots = numSlots + 1
end
if numSlots > maxNumSlots then
maxNumSlots = numSlots
end
end
end
-- load generated data into the restricted environment
GetFlyoutHandler():Execute(data)
if maxNumSlots > #lib.FlyoutButtons then
for i = #lib.FlyoutButtons + 1, maxNumSlots do
local button = lib:CreateButton(i, "LABFlyoutButton" .. i, lib.flyoutHandler, nil)
button:SetScale(0.8)
button:Hide()
button.isFlyout = true
-- wrap the onclick to hide the flyout after casting the spell
lib.flyoutHandler:WrapScript(button, "OnClick", [[ return nil, true ]], [[ if not down then owner:Hide() end ]])
-- disable drag and drop
button:SetAttribute("LABdisableDragNDrop", true)
-- link the button to the header
lib.flyoutHandler:SetFrameRef("flyoutButton" .. i, button)
table.insert(lib.FlyoutButtons, button)
lib.callbacks:Fire("OnFlyoutCreated", button)
end
lib.flyoutHandler:SetAttribute("numFlyoutButtons", #lib.FlyoutButtons)
end
InSync = false
end
-- discover all possible flyouts
function DiscoverFlyoutSpells()
-- 300 is a safe upper limit in 10.0.2, the highest known spell is 229
for flyoutID = 1, 300 do
local success, _, _, numSlots, isKnown = pcall(GetFlyoutInfo, flyoutID)
if success then
lib.FlyoutInfo[flyoutID] = { numSlots = numSlots, isKnown = isKnown, slots = {} }
for slotID = 1, numSlots do
local spellID, overrideSpellID, isKnownSlot, spellName = GetFlyoutSlotInfo(flyoutID, slotID)
-- hide empty pet slots from the flyout
local petIndex, petName = GetCallPetSpellInfo(spellID)
if petIndex and (not petName or petName == "") then
isKnownSlot = false
end
lib.FlyoutInfo[flyoutID].slots[slotID] = { spellID = spellID, spellName = spellName, overrideSpellID = overrideSpellID, isKnown = isKnownSlot }
end
end
end
SyncFlyoutInfoToHandler()
end
-- update flyout information (mostly the isKnown flag)
function UpdateFlyoutSpells()
if InCombatLockdown() then
FlyoutUpdateQueued = true
return
end
for flyoutID, data in pairs(lib.FlyoutInfo) do
local success, _, _, numSlots, isKnown = pcall(GetFlyoutInfo, flyoutID)
if success then
data.isKnown = isKnown
for slotID = 1, numSlots do
local spellID, overrideSpellID, isKnownSlot, spellName = GetFlyoutSlotInfo(flyoutID, slotID)
-- hide empty pet slots from the flyout
local petIndex, petName = GetCallPetSpellInfo(spellID)
if petIndex and (not petName or petName == "") then
isKnownSlot = false
end
data.slots[slotID].spellID = spellID
data.slots[slotID].spellName = spellName
data.slots[slotID].overrideSpellID = overrideSpellID
data.slots[slotID].isKnown = isKnownSlot
end
end
end
lib.callbacks:Fire("OnFlyoutSpells")
SyncFlyoutInfoToHandler()
end
end
----------------------------------------------------------- -----------------------------------------------------------
--- frame scripts --- frame scripts
@ -663,6 +1062,8 @@ function Generic:OnEnter()
end end
function Generic:OnLeave() function Generic:OnLeave()
UpdateFlyout(self)
if not GameTooltip:IsForbidden() then if not GameTooltip:IsForbidden() then
GameTooltip:Hide() GameTooltip:Hide()
end end
@ -701,6 +1102,8 @@ end
function Generic:PostClick(button, down) function Generic:PostClick(button, down)
UpdateButtonState(self) UpdateButtonState(self)
UpdateFlyout(self, down)
if self._receiving_drag and not InCombatLockdown() then if self._receiving_drag and not InCombatLockdown() then
if self._old_type then if self._old_type then
self:SetAttribute("type", self._old_type) self:SetAttribute("type", self._old_type)
@ -721,6 +1124,10 @@ function Generic:PostClick(button, down)
if self._state_type == "action" and lib.ACTION_HIGHLIGHT_MARKS[self._state_action] then if self._state_type == "action" and lib.ACTION_HIGHLIGHT_MARKS[self._state_action] then
ClearNewActionHighlight(self._state_action, false, false) ClearNewActionHighlight(self._state_action, false, false)
end end
if down and button ~= "Keybind" then
self:RegisterEvent("GLOBAL_MOUSE_UP")
end
end end
----------------------------------------------------------- -----------------------------------------------------------
@ -862,13 +1269,31 @@ function InitializeEventHandler()
lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_ADDED") lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_ADDED")
lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_UPDATE") lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_UPDATE")
if UseCustomFlyout then
lib.eventFrame:RegisterEvent("PLAYER_LOGIN")
lib.eventFrame:RegisterEvent("SPELLS_CHANGED")
lib.eventFrame:RegisterEvent("SPELL_FLYOUT_UPDATE")
end
lib.eventFrame:Show() lib.eventFrame:Show()
lib.eventFrame:SetScript("OnUpdate", OnUpdate) lib.eventFrame:SetScript("OnUpdate", OnUpdate)
if UseCustomFlyout and IsLoggedIn() then
DiscoverFlyoutSpells()
end
end end
local _lastFormUpdate = GetTime() local _lastFormUpdate = GetTime()
function OnEvent(frame, event, arg1, ...) function OnEvent(frame, event, arg1, ...)
if event == "UNIT_INVENTORY_CHANGED" or event == "LEARNED_SPELL_IN_TAB" then if event == "PLAYER_LOGIN" then
if UseCustomFlyout then
DiscoverFlyoutSpells()
end
elseif event == "SPELLS_CHANGED" or event == "SPELL_FLYOUT_UPDATE" then
if UseCustomFlyout then
UpdateFlyoutSpells()
end
elseif event == "UNIT_INVENTORY_CHANGED" or event == "LEARNED_SPELL_IN_TAB" then
local tooltipOwner = GameTooltip_GetOwnerForbidden() local tooltipOwner = GameTooltip_GetOwnerForbidden()
if tooltipOwner and ButtonRegistry[tooltipOwner] then if tooltipOwner and ButtonRegistry[tooltipOwner] then
tooltipOwner:SetTooltip() tooltipOwner:SetTooltip()
@ -970,6 +1395,11 @@ function OnEvent(frame, event, arg1, ...)
StopFlash(button) StopFlash(button)
end end
end end
if UseCustomFlyout and FlyoutUpdateQueued then
UpdateFlyoutSpells()
FlyoutUpdateQueued = nil
end
elseif event == "START_AUTOREPEAT_SPELL" then elseif event == "START_AUTOREPEAT_SPELL" then
for button in next, ActiveButtons do for button in next, ActiveButtons do
if button:IsAutoRepeat() then if button:IsAutoRepeat() then
@ -984,6 +1414,10 @@ function OnEvent(frame, event, arg1, ...)
end end
elseif event == "PET_STABLE_UPDATE" or event == "PET_STABLE_SHOW" then elseif event == "PET_STABLE_UPDATE" or event == "PET_STABLE_SHOW" then
ForAllButtons(Update) ForAllButtons(Update)
if event == "PET_STABLE_UPDATE" and UseCustomFlyout then
UpdateFlyoutSpells()
end
elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then
for button in next, ActiveButtons do for button in next, ActiveButtons do
local spellId = button:GetSpellId() local spellId = button:GetSpellId()
@ -1318,7 +1752,7 @@ function Update(self, fromUpdateConfig)
local updatePressRelease = IsPressHoldReleaseSpell and notInCombat local updatePressRelease = IsPressHoldReleaseSpell and notInCombat
if isTypeAction then if isTypeAction then
local actionType, actionID = GetActionInfo(self._state_action) local actionType, actionID = GetActionInfo(self._state_action)
local actionSpell, actionMacro = actionType == 'spell', actionType == 'macro' local actionSpell, actionMacro, actionFlyout = actionType == 'spell', actionType == 'macro', actionType == 'flyout'
local macroSpell = actionMacro and GetMacroSpell(actionID) or nil local macroSpell = actionMacro and GetMacroSpell(actionID) or nil
local spellID = (actionSpell and actionID) or macroSpell local spellID = (actionSpell and actionID) or macroSpell
local spellName = spellID and GetSpellInfo(spellID) or nil local spellName = spellID and GetSpellInfo(spellID) or nil
@ -1330,6 +1764,7 @@ function Update(self, fromUpdateConfig)
self:SetAttribute('typerelease', 'actionrelease') self:SetAttribute('typerelease', 'actionrelease')
end end
self.isFlyoutButton = actionFlyout
self.abilityName = spellName self.abilityName = spellName
AuraButtons.buttons[self] = spellName AuraButtons.buttons[self] = spellName
@ -1341,6 +1776,7 @@ function Update(self, fromUpdateConfig)
tinsert(AuraButtons.auras[spellName], self) tinsert(AuraButtons.auras[spellName], self)
end end
else else
self.isFlyoutButton = nil
self.abilityName = nil self.abilityName = nil
if updatePressRelease then if updatePressRelease then
@ -1821,7 +2257,6 @@ if ActionButton_UpdateFlyout then
-- based on ActionButton_UpdateFlyout in ActionButton.lua -- based on ActionButton_UpdateFlyout in ActionButton.lua
local actionType = GetActionInfo(self._state_action) local actionType = GetActionInfo(self._state_action)
if actionType == "flyout" then if actionType == "flyout" then
local isFlyoutShown = SpellFlyout and SpellFlyout:IsShown() and SpellFlyout:GetParent() == self local isFlyoutShown = SpellFlyout and SpellFlyout:IsShown() and SpellFlyout:GetParent() == self
local arrowDistance = isFlyoutShown and 1 or 4 local arrowDistance = isFlyoutShown and 1 or 4
@ -1856,7 +2291,7 @@ else
-- based on ActionButton_UpdateFlyout in ActionButton.lua -- based on ActionButton_UpdateFlyout in ActionButton.lua
local actionType = GetActionInfo(self._state_action) local actionType = GetActionInfo(self._state_action)
if actionType == "flyout" then if actionType == "flyout" then
local isMouseOverButton = GetMouseFocus() == self; local isMouseOverButton = GetMouseFocus() == self;
local isButtonDown local isButtonDown
if (isButtonDownOverride ~= nil) then if (isButtonDownOverride ~= nil) then
@ -1882,7 +2317,7 @@ else
self.FlyoutArrowContainer.FlyoutArrowPushed:Hide() self.FlyoutArrowContainer.FlyoutArrowPushed:Hide()
end end
local isFlyoutShown = SpellFlyout and SpellFlyout:IsShown() and SpellFlyout:GetParent() == self local isFlyoutShown = (SpellFlyout and SpellFlyout:IsShown() and SpellFlyout:GetParent() == self) or (lib.flyoutHandler and lib.flyoutHandler:IsShown() and lib.flyoutHandler:GetParent() == self)
local arrowDistance = isFlyoutShown and 1 or 4 local arrowDistance = isFlyoutShown and 1 or 4
-- Update arrow -- Update arrow
@ -1905,10 +2340,13 @@ else
flyoutArrowTexture:SetPoint("TOP", self, "TOP", 0, arrowDistance) flyoutArrowTexture:SetPoint("TOP", self, "TOP", 0, arrowDistance)
end end
lib.callbacks:Fire("OnFlyoutUpdate", self, flyoutArrowTexture)
-- return here, otherwise flyout is hidden -- return here, otherwise flyout is hidden
return return
end end
end end
self.FlyoutArrowContainer:Hide() self.FlyoutArrowContainer:Hide()
end end
end end
@ -2138,3 +2576,7 @@ if oldversion and next(lib.buttonRegistry) then
end end
end end
end end
if oldversion and lib.flyoutHandler then
UpdateFlyoutHandlerScripts()
end

13
Interface/AddOns/ElvUI_Libraries/Core/oUF/elements/stagger.lua

@ -40,7 +40,6 @@ local UnitHasVehiclePlayerFrameUI = UnitHasVehiclePlayerFrameUI
local UnitHealthMax = UnitHealthMax local UnitHealthMax = UnitHealthMax
local UnitIsUnit = UnitIsUnit local UnitIsUnit = UnitIsUnit
local UnitStagger = UnitStagger local UnitStagger = UnitStagger
-- GLOBALS: MonkStaggerBar
-- end block -- end block
-- sourced from FrameXML/Constants.lua -- sourced from FrameXML/Constants.lua
@ -217,12 +216,6 @@ local function Enable(self, unit)
element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
end end
MonkStaggerBar:UnregisterEvent('PLAYER_ENTERING_WORLD')
MonkStaggerBar:UnregisterEvent('PLAYER_SPECIALIZATION_CHANGED')
MonkStaggerBar:UnregisterEvent('UNIT_DISPLAYPOWER')
MonkStaggerBar:UnregisterEvent('UNIT_EXITED_VEHICLE')
MonkStaggerBar:UnregisterEvent('UPDATE_VEHICLE_ACTIONBAR')
-- do not change this without taking Visibility into account -- do not change this without taking Visibility into account
element:Hide() element:Hide()
@ -238,12 +231,6 @@ local function Disable(self)
self:UnregisterEvent('UNIT_AURA', Path) self:UnregisterEvent('UNIT_AURA', Path)
self:UnregisterEvent('UNIT_DISPLAYPOWER', VisibilityPath) self:UnregisterEvent('UNIT_DISPLAYPOWER', VisibilityPath)
self:UnregisterEvent('PLAYER_TALENT_UPDATE', VisibilityPath) self:UnregisterEvent('PLAYER_TALENT_UPDATE', VisibilityPath)
MonkStaggerBar:RegisterEvent('PLAYER_ENTERING_WORLD')
MonkStaggerBar:RegisterEvent('PLAYER_SPECIALIZATION_CHANGED')
MonkStaggerBar:RegisterEvent('UNIT_DISPLAYPOWER')
MonkStaggerBar:RegisterEvent('UNIT_EXITED_VEHICLE')
MonkStaggerBar:RegisterEvent('UPDATE_VEHICLE_ACTIONBAR')
end end
end end

2
Interface/AddOns/ElvUI_Options/Core/Tooltip.lua

@ -29,7 +29,7 @@ General.gender = ACH:Toggle(L["Gender"], L["Displays the gender of players."], 7
General.showElvUIUsers = ACH:Toggle(L["Show ElvUI Users"], L["Show ElvUI users and their version of ElvUI."], 8) General.showElvUIUsers = ACH:Toggle(L["Show ElvUI Users"], L["Show ElvUI users and their version of ElvUI."], 8)
General.itemQuality = ACH:Toggle(L["Item Quality"], L["Color tooltip border based on Item Quality."], 9) General.itemQuality = ACH:Toggle(L["Item Quality"], L["Color tooltip border based on Item Quality."], 9)
General.inspectDataEnable = ACH:Toggle(L["Inspect Data"], L["Display the item level and current specialization of the unit on modifier press."], 10, nil, nil, nil, nil, nil, nil, not E.Retail) General.inspectDataEnable = ACH:Toggle(L["Inspect Data"], L["Display the item level and current specialization of the unit on modifier press."], 10, nil, nil, nil, nil, nil, nil, not E.Retail)
General.fadeOut = ACH:Toggle(E.NewSign..L["Fade Out"], L["Fade out the tooltip when it disappers, instant otherwise. Cursor anchored tooltips are unaffected."], 11) General.fadeOut = ACH:Toggle(E.NewSign..L["Fade Out"], L["Fade out the tooltip when it disappers, instant otherwise. Cursor anchored tooltips are unaffected."], 11, nil, nil, nil, nil, nil, nil, not E.Retail)
General.colorAlpha = ACH:Range(L["OPACITY"], nil, 12, { isPercent = true, min = 0, max = 1, step = 0.01 }, nil, nil, function(info, value) E.db.tooltip[info[#info]] = value; Skins:StyleTooltips() end) General.colorAlpha = ACH:Range(L["OPACITY"], nil, 12, { isPercent = true, min = 0, max = 1, step = 0.01 }, nil, nil, function(info, value) E.db.tooltip[info[#info]] = value; Skins:StyleTooltips() end)
General.modifierGroup = ACH:Group(L["Spell/Item IDs"], nil, -2) General.modifierGroup = ACH:Group(L["Spell/Item IDs"], nil, -2)

2
Interface/AddOns/ElvUI_Options/Locales/deDE.lua

@ -1145,8 +1145,6 @@ L["Panel Snapping"] = "Fenster andocken"
L["Panel Texture (Left)"] = "Fenstertextur (Links)" L["Panel Texture (Left)"] = "Fenstertextur (Links)"
L["Panel Texture (Right)"] = "Fenstertextur (Rechts)" L["Panel Texture (Right)"] = "Fenstertextur (Rechts)"
L["Panel Transparency"] = "Leisten Transparenz" L["Panel Transparency"] = "Leisten Transparenz"
L["Panel Width (Bags)"] = "Leistenbreite (Taschen)"
L["Panel Width (Bank)"] = "Leistenbreite (Bank)"
L["Panel Width"] = "Leistenbreite" L["Panel Width"] = "Leistenbreite"
L["Panels"] = "Leisten" L["Panels"] = "Leisten"
L["Parchment Remover"] = "Pergament entfernen" L["Parchment Remover"] = "Pergament entfernen"

2
Interface/AddOns/ElvUI_Options/Locales/enUS.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = true
L["Panel Texture (Left)"] = true L["Panel Texture (Left)"] = true
L["Panel Texture (Right)"] = true L["Panel Texture (Right)"] = true
L["Panel Transparency"] = true L["Panel Transparency"] = true
L["Panel Width (Bags)"] = true
L["Panel Width (Bank)"] = true
L["Panel Width"] = true L["Panel Width"] = true
L["Panels"] = true L["Panels"] = true
L["Parchment Remover"] = true L["Parchment Remover"] = true

2
Interface/AddOns/ElvUI_Options/Locales/esMX.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = true
L["Panel Texture (Left)"] = "Textura del Panel Izquierdo" L["Panel Texture (Left)"] = "Textura del Panel Izquierdo"
L["Panel Texture (Right)"] = "Textura del Panel Derecho" L["Panel Texture (Right)"] = "Textura del Panel Derecho"
L["Panel Transparency"] = "Transparencia del Panel" L["Panel Transparency"] = "Transparencia del Panel"
L["Panel Width (Bags)"] = "Ancho del Panel (Bolsas)"
L["Panel Width (Bank)"] = "Ancho del Panel (Banco)"
L["Panel Width"] = "Anchura del Panel" L["Panel Width"] = "Anchura del Panel"
L["Panels"] = "Paneles" L["Panels"] = "Paneles"
L["Parchment Remover"] = true L["Parchment Remover"] = true

2
Interface/AddOns/ElvUI_Options/Locales/frFR.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = true
L["Panel Texture (Left)"] = "Texture de la fenêtre de discussion (Gauche)" L["Panel Texture (Left)"] = "Texture de la fenêtre de discussion (Gauche)"
L["Panel Texture (Right)"] = "Texture de la fenêtre de discussion (Droite)" L["Panel Texture (Right)"] = "Texture de la fenêtre de discussion (Droite)"
L["Panel Transparency"] = "Transparence du panneau" L["Panel Transparency"] = "Transparence du panneau"
L["Panel Width (Bags)"] = "Largeur du panneau (Sac)"
L["Panel Width (Bank)"] = "Largeur du panneau (Banque)"
L["Panel Width"] = "Largeur de la fenêtre de discussion" L["Panel Width"] = "Largeur de la fenêtre de discussion"
L["Panels"] = "Panneaux" L["Panels"] = "Panneaux"
L["Parchment Remover"] = "Suppression de la texture Parchemin" L["Parchment Remover"] = "Suppression de la texture Parchemin"

2
Interface/AddOns/ElvUI_Options/Locales/itIT.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = true
L["Panel Texture (Left)"] = true L["Panel Texture (Left)"] = true
L["Panel Texture (Right)"] = true L["Panel Texture (Right)"] = true
L["Panel Transparency"] = true L["Panel Transparency"] = true
L["Panel Width (Bags)"] = true
L["Panel Width (Bank)"] = true
L["Panel Width"] = true L["Panel Width"] = true
L["Panels"] = true L["Panels"] = true
L["Parchment Remover"] = true L["Parchment Remover"] = true

2
Interface/AddOns/ElvUI_Options/Locales/koKR.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = true
L["Panel Texture (Left)"] = "패널 텍스쳐 (왼쪽)" L["Panel Texture (Left)"] = "패널 텍스쳐 (왼쪽)"
L["Panel Texture (Right)"] = "패널 텍스쳐 (오른쪽)" L["Panel Texture (Right)"] = "패널 텍스쳐 (오른쪽)"
L["Panel Transparency"] = "탭을 반투명하게" L["Panel Transparency"] = "탭을 반투명하게"
L["Panel Width (Bags)"] = "통합가방 프레임 가로길이"
L["Panel Width (Bank)"] = "통합은행 프레임 가로길이"
L["Panel Width"] = "패널 가로길이" L["Panel Width"] = "패널 가로길이"
L["Panels"] = "패널" L["Panels"] = "패널"
L["Parchment Remover"] = true L["Parchment Remover"] = true

2
Interface/AddOns/ElvUI_Options/Locales/ptBR.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = true
L["Panel Texture (Left)"] = "Textura do Painel (Esquerdo)" L["Panel Texture (Left)"] = "Textura do Painel (Esquerdo)"
L["Panel Texture (Right)"] = "Textura do Painel (Direito)" L["Panel Texture (Right)"] = "Textura do Painel (Direito)"
L["Panel Transparency"] = "Transparência do Painel" L["Panel Transparency"] = "Transparência do Painel"
L["Panel Width (Bags)"] = "Largura do Painel (Bolsas)"
L["Panel Width (Bank)"] = "Largura do Painel (Banco)"
L["Panel Width"] = "Comprimento do Painel" L["Panel Width"] = "Comprimento do Painel"
L["Panels"] = "Painéis" L["Panels"] = "Painéis"
L["Parchment Remover"] = "Removedor de Pergaminho" L["Parchment Remover"] = "Removedor de Pergaminho"

2
Interface/AddOns/ElvUI_Options/Locales/ruRU.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = "Привязка панели"
L["Panel Texture (Left)"] = "Текстура левой панели" L["Panel Texture (Left)"] = "Текстура левой панели"
L["Panel Texture (Right)"] = "Текстура правой панели" L["Panel Texture (Right)"] = "Текстура правой панели"
L["Panel Transparency"] = "Прозрачность панели" L["Panel Transparency"] = "Прозрачность панели"
L["Panel Width (Bags)"] = "Ширина сумок"
L["Panel Width (Bank)"] = "Ширина банка"
L["Panel Width"] = "Ширина панели" L["Panel Width"] = "Ширина панели"
L["Panels"] = "Панели" L["Panels"] = "Панели"
L["Parchment Remover"] = "Удалить пергамент" L["Parchment Remover"] = "Удалить пергамент"

2
Interface/AddOns/ElvUI_Options/Locales/trTR.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = "Panel Yapistirma"
L["Panel Texture (Left)"] = "Panel Dokusu (Sol)" L["Panel Texture (Left)"] = "Panel Dokusu (Sol)"
L["Panel Texture (Right)"] = "Panel Dokusu (Sag)" L["Panel Texture (Right)"] = "Panel Dokusu (Sag)"
L["Panel Transparency"] = "Panel Seffafligi" L["Panel Transparency"] = "Panel Seffafligi"
L["Panel Width (Bags)"] = "Panel Genisligi (canta)"
L["Panel Width (Bank)"] = "Panel Genisligi (Banka)"
L["Panel Width"] = "Panel Genisligi" L["Panel Width"] = "Panel Genisligi"
L["Panels"] = "Panel" L["Panels"] = "Panel"
L["Parchment Remover"] = "Parsomenleri Kaldir" L["Parchment Remover"] = "Parsomenleri Kaldir"

4
Interface/AddOns/ElvUI_Options/Locales/zhCN.lua

@ -1139,9 +1139,7 @@ L["Panel Snapping"] = "面板吸附"
L["Panel Texture (Left)"] = "聊天框材质(左)" L["Panel Texture (Left)"] = "聊天框材质(左)"
L["Panel Texture (Right)"] = "聊天框材质(右)" L["Panel Texture (Right)"] = "聊天框材质(右)"
L["Panel Transparency"] = "面板透明" L["Panel Transparency"] = "面板透明"
L["Panel Width (Bags)"] = "背包面板宽度" L["Panel Width"] = "框架面板宽度"
L["Panel Width (Bank)"] = "银行面板宽度"
L["Panel Width"] = "聊天框宽度"
L["Panels"] = "面板" L["Panels"] = "面板"
L["Parchment Remover"] = "移除羊皮纸" L["Parchment Remover"] = "移除羊皮纸"
L["Parent"] = "跟随框架" L["Parent"] = "跟随框架"

2
Interface/AddOns/ElvUI_Options/Locales/zhTW.lua

@ -1139,8 +1139,6 @@ L["Panel Snapping"] = "面板吸附"
L["Panel Texture (Left)"] = "面板材質(左)" L["Panel Texture (Left)"] = "面板材質(左)"
L["Panel Texture (Right)"] = "面板材質(右)" L["Panel Texture (Right)"] = "面板材質(右)"
L["Panel Transparency"] = "面板透明" L["Panel Transparency"] = "面板透明"
L["Panel Width (Bags)"] = "框架寬度 (背包)"
L["Panel Width (Bank)"] = "框架寬度 (銀行)"
L["Panel Width"] = "面板寛度" L["Panel Width"] = "面板寛度"
L["Panels"] = "面板" L["Panels"] = "面板"
L["Parchment Remover"] = "移除羊皮紙" L["Parchment Remover"] = "移除羊皮紙"

7
Interface/AddOns/ElvUI_SLE/CHANGELOG.txt

@ -1,3 +1,6 @@
v4.50 11/16/22 v4.51 11/22/22
• fixed most prepatch 2 issues • fixed friends datatext error
• fixed currency datatext error
• fixed anima count error
• fixed minimap instance indicator

4
Interface/AddOns/ElvUI_SLE/ElvUI_SLE.toc

@ -1,14 +1,14 @@
## Interface: 100002 ## Interface: 100002
## Title: |cff1784d1ElvUI|r |cff9482c9Shadow & Light|r ## Title: |cff1784d1ElvUI|r |cff9482c9Shadow & Light|r
## Author: Darth Predator, Repooc ## Author: Darth Predator, Repooc
## Version: 4.50 ## Version: 4.51
## Notes: Plugin-edit for |cff1784d1ElvUI|r adding additional features. ## Notes: Plugin-edit for |cff1784d1ElvUI|r adding additional features.
## Notes-ruRU: Плагин-редакция для |cff1784d1ElvUI|r, добавляющий новые функции. ## Notes-ruRU: Плагин-редакция для |cff1784d1ElvUI|r, добавляющий новые функции.
## URL: http://tukui.org/ ## URL: http://tukui.org/
## RequiredDeps: ElvUI ## RequiredDeps: ElvUI
## OptionalDeps: AddonSkins, BigWigs, Clique, Hermes, xCT+ ## OptionalDeps: AddonSkins, BigWigs, Clique, Hermes, xCT+
## DefaultState: Enabled ## DefaultState: Enabled
## X-ElvVersion: 13.02 ## X-ElvVersion: 13.06
## X-Curse-Project-ID: 39618 ## X-Curse-Project-ID: 39618
## X-Wago-ID: 7x61q261 ## X-Wago-ID: 7x61q261
## SavedVariables: SLE_ArmoryDB ## SavedVariables: SLE_ArmoryDB

5
Interface/AddOns/ElvUI_SLE/locales/english.lua

@ -697,12 +697,15 @@ L["SLE_EM_TAGS_HELP"] = [[Following tags and parameters are eligible for setting
|cff3cbf27party|r - when you are in a group of any description. Can be of specified size, e.g. [party:4] - if in a group of total size 4; |cff3cbf27party|r - when you are in a group of any description. Can be of specified size, e.g. [party:4] - if in a group of total size 4;
|cff3cbf27raid|r - when you are in a raid group. Can be of specified size like party option; |cff3cbf27raid|r - when you are in a raid group. Can be of specified size like party option;
|cff3cbf27spec|r - specified spec. Usage [spec:<number>] number is the index of desired spec as seen in spec tab; |cff3cbf27spec|r - specified spec. Usage [spec:<number>] number is the index of desired spec as seen in spec tab;
|cff3cbf27talent|r - specified talent. Usage [talent:<tier>/<column>] tier is the row going from 1 on lvl 15 to 7 and lvl 100, column is the column in said row from 1 to 3; |cff3cbf27talent|r - specified talent. Usage [talent:(<id>|<name>)] checks if a given talent is known by spell id or name;
|cff3cbf27instance|r - if in instance. Can be of specified instance type - [instance:<type>]. Types are party, raid and scenario. If not specified will be true for any instance; |cff3cbf27instance|r - if in instance. Can be of specified instance type - [instance:<type>]. Types are party, raid and scenario. If not specified will be true for any instance;
|cff3cbf27pvp|r - if on BG, arena or world pvp area. Available arguments: pvp, arena; |cff3cbf27pvp|r - if on BG, arena or world pvp area. Available arguments: pvp, arena;
|cff3cbf27difficulty|r - defines the difficulty of the instance. Arguments are: normal, heroic, lfr, challenge, mythic; |cff3cbf27difficulty|r - defines the difficulty of the instance. Arguments are: normal, heroic, lfr, challenge, mythic;
|cff3cbf27effectivelevel|r - effective level refers to your level when you are scaled, e.g. timewalking |cff3cbf27effectivelevel|r - effective level refers to your level when you are scaled, e.g. timewalking
|cff3cbf27warmode|r - checks if you have warmode enabled |cff3cbf27warmode|r - checks if you have warmode enabled
|cff3cbf27event|r - checks if any event in a /-separated list of ids is active
You can also prepend no to any available tag to negate the result.
Example: [solo] Set1; [party:4, spec:3] Set2; [instance:raid, difficulty:heroic] Set3 Example: [solo] Set1; [party:4, spec:3] Set2; [instance:raid, difficulty:heroic] Set3
]] ]]

4
Interface/AddOns/ElvUI_SLE/modules/blizzard.lua

@ -22,7 +22,7 @@ B.Frames = {
LFGDungeonReadyDialog = true, LFGDungeonReadyDialog = true,
LFGDungeonReadyStatus = true, LFGDungeonReadyStatus = true,
LootFrame = true, LootFrame = true,
MailFrame = true, -- MailFrame = true,
MerchantFrame = true, MerchantFrame = true,
PVEFrame = true, PVEFrame = true,
PetStableFrame = true, PetStableFrame = true,
@ -378,8 +378,6 @@ function B:Initialize()
self:Hide() self:Hide()
end end
end) end)
end end
SLE:RegisterModule(B:GetName()) SLE:RegisterModule(B:GetName())

291
Interface/AddOns/ElvUI_SLE/modules/datatexts/currency.lua

@ -3,61 +3,37 @@ local DT = E.DataTexts
local B = E.Bags local B = E.Bags
local _G = _G local _G = _G
local type, wipe, pairs, ipairs, sort = type, wipe, pairs, ipairs, sort local type, tonumber, wipe, pairs, ipairs, sort = type, tonumber, wipe, pairs, ipairs, sort
local format, strjoin, tinsert = format, strjoin, tinsert local format, strjoin, tostring, tinsert = format, strjoin, tostring, tinsert
local tonumber, unpack = tonumber, unpack
local GetMoney = GetMoney local GetMoney = GetMoney
local IsControlKeyDown = IsControlKeyDown local IsControlKeyDown, IsShiftKeyDown = IsControlKeyDown, IsShiftKeyDown
local IsLoggedIn = IsLoggedIn local IsLoggedIn = IsLoggedIn
local IsShiftKeyDown = IsShiftKeyDown
local BreakUpLargeNumbers = BreakUpLargeNumbers local BreakUpLargeNumbers = BreakUpLargeNumbers
local C_WowTokenPublic_UpdateMarketPrice = C_WowTokenPublic.UpdateMarketPrice
local Ticker local C_WowTokenPublic_GetCurrentMarketPrice = C_WowTokenPublic.GetCurrentMarketPrice
-- local CURRENCY = CURRENCY --Needed if I decide to add watched currency from backpack local C_Timer_NewTicker = C_Timer.NewTicker
-- local MAX_WATCHED_TOKENS = MAX_WATCHED_TOKENS --Needed if I decide to add watched currency from backpack
local Profit, Spent = 0, 0
local resetCountersFormatter = strjoin('', '|cffaaaaaa', L["Reset Session Data: Hold Ctrl + Right Click"], '|r')
local resetInfoFormatter = strjoin('', '|cffaaaaaa', L["Reset Character Data: Hold Shift + Right Click"], '|r')
local PRIEST_COLOR = RAID_CLASS_COLORS.PRIEST
local BONUS_ROLL_REWARD_MONEY = BONUS_ROLL_REWARD_MONEY
local iconString = '|T%s:16:16:0:0:64:64:4:60:4:60|t'
local GetItemSpell = GetItemSpell
local C_Container_GetContainerItemLink = C_Container.GetContainerItemLink local C_Container_GetContainerItemLink = C_Container.GetContainerItemLink
local C_Container_GetContainerNumSlots = C_Container.GetContainerNumSlots local C_Container_GetContainerNumSlots = C_Container.GetContainerNumSlots
local C_Container_GetContainerItemInfo = C_Container.GetContainerItemInfo local C_Container_GetContainerItemInfo = C_Container.GetContainerItemInfo
local C_Container_GetBagName = C_Container.GetBagName local C_Container_GetBagName = C_Container.GetBagName
local C_CurrencyInfo_GetBackpackCurrencyInfo = C_CurrencyInfo.GetBackpackCurrencyInfo
local C_CurrencyInfo_GetCurrencyInfo = C_CurrencyInfo.GetCurrencyInfo
local C_Item_IsAnimaItemByID = C_Item.IsAnimaItemByID local C_Item_IsAnimaItemByID = C_Item.IsAnimaItemByID
local GetItemSpell = GetItemSpell
local C_WowTokenPublic_UpdateMarketPrice = C_WowTokenPublic.UpdateMarketPrice local BONUS_ROLL_REWARD_MONEY = BONUS_ROLL_REWARD_MONEY
local C_WowTokenPublic_GetCurrentMarketPrice = C_WowTokenPublic.GetCurrentMarketPrice local MAX_WATCHED_TOKENS = MAX_WATCHED_TOKENS or 3
local CURRENCY = CURRENCY
local C_Timer_NewTicker = C_Timer.NewTicker local PRIEST_COLOR = RAID_CLASS_COLORS.PRIEST
local menuList = {} local Profit, Spent, Ticker, goldText = 0, 0
local resetCountersFormatter = strjoin('', '|cffaaaaaa', L["Reset Session Data: Hold Ctrl + Right Click"], '|r')
local resetInfoFormatter = strjoin('', '|cffaaaaaa', L["Reset Character Data: Hold Shift + Right Click"], '|r')
DT.CurrencyList = { GOLD = BONUS_ROLL_REWARD_MONEY, BACKPACK = 'Backpack' } local menuList, myGold = {}, {}
local animaSpellID = { [347555] = 3, [345706] = 5, [336327] = 35, [336456] = 250 } local animaSpellID = { [347555] = 3, [345706] = 5, [336327] = 35, [336456] = 250 }
local totalGold, totalHorde, totalAlliance = 0, 0, 0
local function sortFunction(a, b) local iconString = '|T%s:16:16:0:0:64:64:4:60:4:60|t'
return a.amount > b.amount DT.CurrencyList = { GOLD = BONUS_ROLL_REWARD_MONEY, BACKPACK = 'Backpack' }
end
local function deleteCharacter(self, realm, name)
ElvDB.gold[realm][name] = nil
ElvDB.class[realm][name] = nil
ElvDB.faction[realm][name] = nil
if name == E.myname and realm == E.myrealm then
OnEvent(self)
end
end
local function OnClick(self, btn) local function OnClick(self, btn)
if btn == 'RightButton' then if btn == 'RightButton' then
@ -76,8 +52,8 @@ local function OnClick(self, btn)
end end
end end
DT:SetEasyMenuAnchor(DT.EasyMenu, self) E:SetEasyMenuAnchor(E.EasyMenu, self)
_G.EasyMenu(menuList, DT.EasyMenu, nil, nil, nil, 'MENU') _G.EasyMenu(menuList, E.EasyMenu, nil, nil, nil, 'MENU')
elseif IsControlKeyDown() then elseif IsControlKeyDown() then
Profit = 0 Profit = 0
Spent = 0 Spent = 0
@ -87,25 +63,18 @@ local function OnClick(self, btn)
end end
end end
local function GetInfo(id)
local info = C_CurrencyInfo_GetCurrencyInfo(id)
if info then
return info.name, info.quantity, info.maxQuantity, (info.iconFileID and format(iconString, info.iconFileID)) or '136012'
end
end
local function AddInfo(id) local function AddInfo(id)
local name, num, max, icon = GetInfo(id) local info, name, icon = DT:CurrencyInfo(id)
if name then if name then
local textRight = '%s' local textRight = '%s'
if E.global.datatexts.settings.Currencies.maxCurrency and max and max > 0 then if E.global.datatexts.settings.Currencies.maxCurrency and info.maxQuantity and info.maxQuantity > 0 then
textRight = '%s / '..BreakUpLargeNumbers(max) textRight = '%s / '..BreakUpLargeNumbers(info.maxQuantity)
end end
DT.tooltip:AddDoubleLine(format('%s %s', icon, name), format(textRight, BreakUpLargeNumbers(num)), 1, 1, 1, 1, 1, 1)
DT.tooltip:AddDoubleLine(format('%s %s', icon, name), format(textRight, BreakUpLargeNumbers(info.quantity)), 1, 1, 1, 1, 1, 1)
end end
end end
-- ElvUI Currencies Function
local shownHeaders = {} local shownHeaders = {}
local function AddHeader(id, addLine) local function AddHeader(id, addLine)
if (not E.global.datatexts.settings.Currencies.headers) or shownHeaders[id] then return end if (not E.global.datatexts.settings.Currencies.headers) or shownHeaders[id] then return end
@ -118,31 +87,117 @@ local function AddHeader(id, addLine)
shownHeaders[id] = true shownHeaders[id] = true
end end
local goldText local function sortFunction(a, b)
local function OnEvent(self) return a.amount > b.amount
end
local function deleteCharacter(_, realm, name)
ElvDB.gold[realm][name] = nil
ElvDB.class[realm][name] = nil
ElvDB.faction[realm][name] = nil
DT:ForceUpdate_DataText('S&L Currencies')
end
local function updateTotal(faction, change)
if faction == 'Alliance' then
totalAlliance = totalAlliance + change
elseif faction == 'Horde' then
totalHorde = totalHorde + change
end
totalGold = totalGold + change
end
local function updateGold(self, updateAll, goldChange)
local textOnly = not E.global.datatexts.settings.Gold.goldCoins and true or false
local style = E.global.datatexts.settings.Gold.goldFormat or 'BLIZZARD'
if updateAll then
wipe(myGold)
wipe(menuList)
totalGold, totalHorde, totalAlliance = 0, 0, 0
tinsert(menuList, { text = '', isTitle = true, notCheckable = true })
tinsert(menuList, { text = 'Delete Character', isTitle = true, notCheckable = true })
local realmN = 1
for realm in pairs(ElvDB.serverID[E.serverID]) do
tinsert(menuList, realmN, { text = 'Delete All - '..realm, notCheckable = true, func = function() ElvDB.gold[realm] = {} DT:ForceUpdate_DataText('Gold') end })
realmN = realmN + 1
for name in pairs(ElvDB.gold[realm]) do
local faction = ElvDB.faction[realm][name]
local gold = ElvDB.gold[realm][name]
if gold then
local color = E:ClassColor(ElvDB.class[realm][name]) or PRIEST_COLOR
tinsert(myGold, {
name = name,
realm = realm,
amount = gold,
amountText = E:FormatMoney(gold, style, textOnly),
faction = faction or '',
r = color.r, g = color.g, b = color.b,
})
tinsert(menuList, {
text = format('%s - %s', name, realm),
notCheckable = true,
func = function() deleteCharacter(self, realm, name) end
})
updateTotal(faction, gold)
end
end
end
else
for _, info in ipairs(myGold) do
if info.name == E.myname and info.realm == E.myrealm then
info.amount = ElvDB.gold[E.myrealm][E.myname]
info.amountText = E:FormatMoney(ElvDB.gold[E.myrealm][E.myname], style, textOnly)
break
end
end
if goldChange then
updateTotal(E.myfaction, goldChange)
end
end
end
local function UpdateMarketPrice()
return C_WowTokenPublic_UpdateMarketPrice()
end
local function OnEvent(self, event)
if not IsLoggedIn() then return end if not IsLoggedIn() then return end
if E.Retail and not Ticker then if E.Retail and not Ticker then
C_WowTokenPublic_UpdateMarketPrice() C_WowTokenPublic_UpdateMarketPrice()
Ticker = C_Timer_NewTicker(60, function() C_WowTokenPublic_UpdateMarketPrice() end) Ticker = C_Timer_NewTicker(60, UpdateMarketPrice)
end end
ElvDB = ElvDB or {} if event == 'ELVUI_FORCE_UPDATE' then
ElvDB = ElvDB or {}
ElvDB.gold = ElvDB.gold or {} ElvDB.gold = ElvDB.gold or {}
ElvDB.gold[E.myrealm] = ElvDB.gold[E.myrealm] or {} ElvDB.gold[E.myrealm] = ElvDB.gold[E.myrealm] or {}
ElvDB.class = ElvDB.class or {} ElvDB.class = ElvDB.class or {}
ElvDB.class[E.myrealm] = ElvDB.class[E.myrealm] or {} ElvDB.class[E.myrealm] = ElvDB.class[E.myrealm] or {}
ElvDB.class[E.myrealm][E.myname] = E.myclass ElvDB.class[E.myrealm][E.myname] = E.myclass
ElvDB.faction = ElvDB.faction or {} ElvDB.faction = ElvDB.faction or {}
ElvDB.faction[E.myrealm] = ElvDB.faction[E.myrealm] or {} ElvDB.faction[E.myrealm] = ElvDB.faction[E.myrealm] or {}
ElvDB.faction[E.myrealm][E.myname] = E.myfaction ElvDB.faction[E.myrealm][E.myname] = E.myfaction
ElvDB.serverID = ElvDB.serverID or {} ElvDB.serverID = ElvDB.serverID or {}
ElvDB.serverID[E.serverID] = ElvDB.serverID[E.serverID] or {} ElvDB.serverID[E.serverID] = ElvDB.serverID[E.serverID] or {}
ElvDB.serverID[E.serverID][E.myrealm] = true ElvDB.serverID[E.serverID][E.myrealm] = true
end
--prevent an error possibly from really old profiles --prevent an error possibly from really old profiles
local oldMoney = ElvDB.gold[E.myrealm][E.myname] local oldMoney = ElvDB.gold[E.myrealm][E.myname]
@ -162,13 +217,15 @@ local function OnEvent(self)
Profit = Profit + Change Profit = Profit + Change
end end
updateGold(self, event == 'ELVUI_FORCE_UPDATE', Change)
goldText = E:FormatMoney(GetMoney(), E.global.datatexts.settings.Currencies.goldFormat or 'BLIZZARD', not E.global.datatexts.settings.Currencies.goldCoins) goldText = E:FormatMoney(GetMoney(), E.global.datatexts.settings.Currencies.goldFormat or 'BLIZZARD', not E.global.datatexts.settings.Currencies.goldCoins)
local displayed = E.global.datatexts.settings.Currencies.displayedCurrency local displayed = E.global.datatexts.settings.Currencies.displayedCurrency
if displayed == 'BACKPACK' then if displayed == 'BACKPACK' then
local displayString local displayString
for i = 1, 3 do for i = 1, 3 do
local info = C_CurrencyInfo_GetBackpackCurrencyInfo(i) local info = DT:BackpackCurrencyInfo(i)
if info and info.quantity then if info and info.quantity then
displayString = (i > 1 and displayString..' ' or '')..format('%s %s', format(iconString, info.iconFileID), E:ShortValue(info.quantity)) displayString = (i > 1 and displayString..' ' or '')..format('%s %s', format(iconString, info.iconFileID), E:ShortValue(info.quantity))
end end
@ -181,16 +238,16 @@ local function OnEvent(self)
local id = tonumber(displayed) local id = tonumber(displayed)
if not id then return end if not id then return end
local name, num, _, icon = GetInfo(id) local info, name, icon = DT:CurrencyInfo(id)
if not name then return end if not name then return end
local style = E.global.datatexts.settings.Currencies.displayStyle local style = E.global.datatexts.settings.Currencies.displayStyle
if style == 'ICON' then if style == 'ICON' then
self.text:SetFormattedText('%s %s', icon, E:ShortValue(num)) self.text:SetFormattedText('%s %s', icon, E:ShortValue(info.quantity))
elseif style == 'ICON_TEXT' then elseif style == 'ICON_TEXT' then
self.text:SetFormattedText('%s %s %s', icon, name, E:ShortValue(num)) self.text:SetFormattedText('%s %s %s', icon, name, E:ShortValue(info.quantity))
else --ICON_TEXT_ABBR else --ICON_TEXT_ABBR
self.text:SetFormattedText('%s %s %s', icon, E:AbbreviateString(name), E:ShortValue(num)) self.text:SetFormattedText('%s %s %s', icon, E:AbbreviateString(name), E:ShortValue(info.quantity))
end end
end end
end end
@ -199,15 +256,15 @@ local function getTotalAnima()
local total = 0 local total = 0
for i = 0, NUM_BAG_SLOTS do for i = 0, NUM_BAG_SLOTS do
local bagName = C_Container.GetBagName(i) local bagName = C_Container_GetBagName(i)
if bagName then if bagName then
for slotID = 1, C_Container_GetContainerNumSlots(i) do for slotID = 1, C_Container_GetContainerNumSlots(i) do
local link = C_Container_GetContainerItemLink(i, slotID) local link = C_Container_GetContainerItemLink(i, slotID)
local count = select(2, C_Container_GetContainerItemInfo(i, slotID))
if link and C_Item_IsAnimaItemByID(link) then if link and C_Item_IsAnimaItemByID(link) then
local itemInfo = C_Container_GetContainerItemInfo(i, slotID)
local _, spellID = GetItemSpell(link) local _, spellID = GetItemSpell(link)
total = total + animaSpellID[spellID] * count total = total + animaSpellID[spellID] * itemInfo.stackCount
end end
end end
end end
@ -216,7 +273,6 @@ local function getTotalAnima()
return total return total
end end
local myGold = {}
local function OnEnter() local function OnEnter()
DT.tooltip:ClearLines() DT.tooltip:ClearLines()
@ -224,6 +280,7 @@ local function OnEnter()
local style = E.global.datatexts.settings.Gold.goldFormat or 'BLIZZARD' local style = E.global.datatexts.settings.Gold.goldFormat or 'BLIZZARD'
DT.tooltip:AddLine(L["Session:"]) DT.tooltip:AddLine(L["Session:"])
DT.tooltip:AddDoubleLine(L["Earned:"], E:FormatMoney(Profit, style, textOnly), 1, 1, 1, 1, 1, 1) DT.tooltip:AddDoubleLine(L["Earned:"], E:FormatMoney(Profit, style, textOnly), 1, 1, 1, 1, 1, 1)
DT.tooltip:AddDoubleLine(L["Spent:"], E:FormatMoney(Spent, style, textOnly), 1, 1, 1, 1, 1, 1) DT.tooltip:AddDoubleLine(L["Spent:"], E:FormatMoney(Spent, style, textOnly), 1, 1, 1, 1, 1, 1)
if Profit < Spent then if Profit < Spent then
@ -231,38 +288,10 @@ local function OnEnter()
elseif (Profit-Spent)>0 then elseif (Profit-Spent)>0 then
DT.tooltip:AddDoubleLine(L["Profit:"], E:FormatMoney(Profit-Spent, style, textOnly), 0, 1, 0, 1, 1, 1) DT.tooltip:AddDoubleLine(L["Profit:"], E:FormatMoney(Profit-Spent, style, textOnly), 0, 1, 0, 1, 1, 1)
end end
DT.tooltip:AddLine(' ')
local totalGold, totalHorde, totalAlliance = 0, 0, 0 DT.tooltip:AddLine(' ')
DT.tooltip:AddLine(L["Character: "]) DT.tooltip:AddLine(L["Character: "])
wipe(myGold)
for realm in pairs(ElvDB.serverID[E.serverID]) do
for k, _ in pairs(ElvDB.gold[realm]) do
if ElvDB.gold[realm][k] then
local color = E:ClassColor(ElvDB.class[realm][k]) or PRIEST_COLOR
tinsert(myGold,
{
name = k,
realm = realm,
amount = ElvDB.gold[realm][k],
amountText = E:FormatMoney(ElvDB.gold[realm][k], style, textOnly),
faction = ElvDB.faction[realm][k] or '',
r = color.r, g = color.g, b = color.b,
}
)
end
if ElvDB.faction[realm][k] == 'Alliance' then
totalAlliance = totalAlliance+ElvDB.gold[realm][k]
elseif ElvDB.faction[realm][k] == 'Horde' then
totalHorde = totalHorde+ElvDB.gold[realm][k]
end
totalGold = totalGold+ElvDB.gold[realm][k]
end
end
sort(myGold, sortFunction) sort(myGold, sortFunction)
for _, g in ipairs(myGold) do for _, g in ipairs(myGold) do
@ -283,6 +312,7 @@ local function OnEnter()
DT.tooltip:AddLine(' ') DT.tooltip:AddLine(' ')
end end
DT.tooltip:AddDoubleLine(L["Total: "], E:FormatMoney(totalGold, style, textOnly), 1, 1, 1, 1, 1, 1) DT.tooltip:AddDoubleLine(L["Total: "], E:FormatMoney(totalGold, style, textOnly), 1, 1, 1, 1, 1, 1)
DT.tooltip:AddLine(' ') DT.tooltip:AddLine(' ')
wipe(shownHeaders) wipe(shownHeaders)
@ -311,34 +341,41 @@ local function OnEnter()
DT.tooltip:AddLine(' ') DT.tooltip:AddLine(' ')
end end
local anima = getTotalAnima() if E.Retail then
if anima > 0 then local anima = getTotalAnima()
DT.tooltip:AddDoubleLine(L["Anima:"], anima, 0, .8, 1, 1, 1, 1) if anima > 0 then
DT.tooltip:AddDoubleLine(L["Anima:"], anima, 0, .8, 1, 1, 1, 1)
DT.tooltip:AddLine(' ')
end
DT.tooltip:AddLine(' ') DT.tooltip:AddLine(' ')
DT.tooltip:AddDoubleLine(L["WoW Token:"], E:FormatMoney(C_WowTokenPublic_GetCurrentMarketPrice() or 0, style, textOnly), 0, .8, 1, 1, 1, 1)
end
if E.Retail or E.Wrath then
for i = 1, MAX_WATCHED_TOKENS do
local info, name = DT:BackpackCurrencyInfo(i)
if not name then break end
if i == 1 then
DT.tooltip:AddLine(' ')
DT.tooltip:AddLine(CURRENCY)
end
if info.quantity then
DT.tooltip:AddDoubleLine(format(iconString, info.iconFileID, name), info.quantity, 1, 1, 1, 1, 1, 1)
end
end
end end
DT.tooltip:AddDoubleLine(L["WoW Token:"], E:FormatMoney(C_WowTokenPublic_GetCurrentMarketPrice() or 0, style, textOnly), 0, .8, 1, 1, 1, 1)
-- ElvUI Gold DT -> Watched Backpack Currencies
-- for i = 1, MAX_WATCHED_TOKENS do
-- local info = C_CurrencyInfo_GetBackpackCurrencyInfo(i)
-- if info then
-- if i == 1 then
-- DT.tooltip:AddLine(' ')
-- DT.tooltip:AddLine(CURRENCY)
-- end
-- if info.quantity then
-- DT.tooltip:AddDoubleLine(format('%s %s', format(iconString, info.iconFileID), info.name), BreakUpLargeNumbers(info.quantity), 1, 1, 1, 1, 1, 1)
-- end
-- end
-- end
local grayValue = B:GetGraysValue() local grayValue = B:GetGraysValue()
if grayValue > 0 then if grayValue > 0 then
DT.tooltip:AddLine(' ') DT.tooltip:AddLine(' ')
DT.tooltip:AddDoubleLine(L["Grays"], E:FormatMoney(grayValue, style, textOnly), nil, nil, nil, 1, 1, 1) DT.tooltip:AddDoubleLine(L["Grays"], E:FormatMoney(grayValue, style, textOnly), nil, nil, nil, 1, 1, 1)
end end
DT.tooltip:AddLine(' ')
DT.tooltip:AddDoubleLine(L["Gold"]..':', goldText, nil, nil, nil, 1, 1, 1)
DT.tooltip:AddLine(' ') DT.tooltip:AddLine(' ')
DT.tooltip:AddLine(resetCountersFormatter) DT.tooltip:AddLine(resetCountersFormatter)
DT.tooltip:AddLine(resetInfoFormatter) DT.tooltip:AddLine(resetInfoFormatter)

3
Interface/AddOns/ElvUI_SLE/modules/datatexts/friends.lua

@ -575,7 +575,6 @@ function OnEnter(self)
tooltip:SmartAnchorTo(self) tooltip:SmartAnchorTo(self)
tooltip:SetAutoHideDelay(E.db.sle.dt.friends.tooltipAutohide, self) tooltip:SetAutoHideDelay(E.db.sle.dt.friends.tooltipAutohide, self)
tooltip:SetScript("OnShow", function(ttskinself) ttskinself:SetTemplate('Transparent') end)
end end
line = tooltip:AddLine() line = tooltip:AddLine()
@ -760,4 +759,4 @@ local function ValueColorUpdate(hex)
end end
E.valueColorUpdateFuncs[ValueColorUpdate] = true E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('S&L Friends', 'S&L', {"BN_FRIEND_ACCOUNT_ONLINE", "BN_FRIEND_ACCOUNT_OFFLINE", "BN_FRIEND_INFO_CHANGED", "FRIENDLIST_UPDATE", "CHAT_MSG_SYSTEM", "MODIFIER_STATE_CHANGED"}, OnEvent, nil, OnClick, OnEnter, nil, 'S&L Friends') DT:RegisterDatatext('S&L Friends', 'S&L', {"BN_FRIEND_ACCOUNT_ONLINE", "BN_FRIEND_ACCOUNT_OFFLINE", "BN_FRIEND_INFO_CHANGED", "FRIENDLIST_UPDATE", "CHAT_MSG_SYSTEM", "MODIFIER_STATE_CHANGED"}, OnEvent, nil, OnClick, OnEnter, nil, 'S&L Friends')

37
Interface/AddOns/ElvUI_SLE/modules/equipmanager.lua

@ -100,26 +100,25 @@ EM.TagsTable = {
return false return false
end end
end, end,
--Talent selected. [talent:tier/column] --Talent selected. [talent:spell id|name]
['talent'] = function(tier, column) ['talent'] = function(idOrName)
tier, column = tonumber(tier), tonumber(column) local activeConfigID = C_ClassTalents.GetActiveConfigID()
if not (tier or column) then local configInfo = C_Traits.GetConfigInfo(activeConfigID)
return false local treeID = configInfo.treeIDs[1]
end local nodeIDs = C_Traits.GetTreeNodes(treeID)
if tier < 0 or tier > 7 then local passed = false
SLE:Print(format(L["SLE_EM_TAG_INVALID_TALENT_TIER"], tier), 'error') for _, nodeID in next, nodeIDs do
return false local nodeInfo = C_Traits.GetNodeInfo(activeConfigID, nodeID)
end for _, entryID in next, nodeInfo.entryIDs do
if column < 0 or column > 3 then local entryInfo = C_Traits.GetEntryInfo(activeConfigID, entryID)
SLE:Print(format(L["SLE_EM_TAG_INVALID_TALENT_COLUMN"], column), 'error') local definitionInfo = C_Traits.GetDefinitionInfo(entryInfo.definitionID)
return false local purchased = nodeInfo.ranksPurchased > 0
end passed = purchased and (definitionInfo.spellID == tonumber(idOrName) or GetSpellInfo(definitionInfo.spellID) == idOrName)
local _, _, _, selected = GetTalentInfo(tier, column, 1) if passed then break end
if selected then end
return true if passed then break end
else
return false
end end
return passed
end, end,
--If in instanse. Optional arg [instance:type] - party, raid, scenario --If in instanse. Optional arg [instance:type] - party, raid, scenario
['instance'] = function(dungeonType) ['instance'] = function(dungeonType)

89
Interface/AddOns/ElvUI_SLE/modules/minimap/instance.lua

@ -5,12 +5,12 @@ local I = SLE.InstDif
local _G = _G local _G = _G
local format = format local format = format
local sub = string.utf8sub local sub = string.utf8sub
local IsAddOnLoaded = IsAddOnLoaded
local GetDifficultyInfo = GetDifficultyInfo local GetDifficultyInfo = GetDifficultyInfo
I.BlizzDif = _G["MiniMapInstanceDifficulty"] local InstanceDifficulty = _G.MinimapCluster.InstanceDifficulty
I.BlizzGDif = _G["GuildInstanceDifficulty"] local Instance = InstanceDifficulty.Instance
I.BlizzCM = _G["MiniMapChallengeMode"] local ChallengeMode = InstanceDifficulty.ChallengeMode
local Guild = InstanceDifficulty.Guild
local Difficulties = { local Difficulties = {
[1] = 'normal', --5ppl normal [1] = 'normal', --5ppl normal
@ -33,12 +33,12 @@ local Difficulties = {
} }
function I:CreateText() function I:CreateText()
I.frame = CreateFrame("Frame", "MiniMapDifFrame", _G["Minimap"]) I.frame = CreateFrame('Frame', 'SL_MinimapDifficultyFrame', _G.Minimap)
I.frame:Size(50, 20) I.frame:Size(50, 20)
I.frame.text = I.frame:CreateFontString(nil, 'OVERLAY') I.frame.text = I.frame:CreateFontString(nil, 'OVERLAY')
I.frame.text:SetPoint("CENTER", I.frame, "CENTER") I.frame.text:SetPoint('CENTER', I.frame, 'CENTER')
I.frame.icon = I.frame:CreateFontString(nil, 'OVERLAY') I.frame.icon = I.frame:CreateFontString(nil, 'OVERLAY')
I.frame.icon:SetPoint("LEFT", I.frame.text, "RIGHT", 4, 0) I.frame.icon:SetPoint('LEFT', I.frame.text, 'RIGHT', 4, 0)
self:SetFonts() self:SetFonts()
end end
@ -52,7 +52,7 @@ end
function I:InstanceCheck() function I:InstanceCheck()
local isInstance, InstanseType = IsInInstance() local isInstance, InstanseType = IsInInstance()
local show = false local show = false
if isInstance and InstanseType ~= "pvp" and InstanseType ~= "arena" then show = true end if isInstance and InstanseType ~= 'pvp' and InstanseType ~= 'arena' then show = true end
return show return show
end end
@ -60,22 +60,22 @@ function I:GuildEmblem()
-- table -- table
local char = {} local char = {}
-- check if Blizzard_GuildUI is loaded -- check if Blizzard_GuildUI is loaded
if not IsAddOnLoaded("Blizzard_GuildUI") then LoadAddOn("Blizzard_GuildUI") end -- if not IsAddOnLoaded("Blizzard_GuildUI") then LoadAddOn("Blizzard_GuildUI") end
if _G["GuildFrameTabardEmblem"] then if Guild then
char.guildTexCoord = {_G["GuildFrameTabardEmblem"]:GetTexCoord()} char.guildTexCoord = {Guild.Emblem:GetTexCoord()}
else else
char.guildTexCoord = false char.guildTexCoord = false
end end
if IsInGuild() and char.guildTexCoord then if char.guildTexCoord and IsInGuild() then
return "|TInterface\\GuildFrame\\GuildEmblemsLG_01:24:24:-4:1:32:32:"..(char.guildTexCoord[1]*32)..":"..(char.guildTexCoord[7]*32)..":"..(char.guildTexCoord[2]*32)..":"..(char.guildTexCoord[8]*32).."|t" return '|TInterface\\GuildFrame\\GuildEmblemsLG_01:24:24:-4:1:32:32:'..(char.guildTexCoord[1]*32)..':'..(char.guildTexCoord[7]*32)..':'..(char.guildTexCoord[2]*32)..':'..(char.guildTexCoord[8]*32)..'|t'
else else
return "" return ''
end end
end end
function I:UpdateFrame() function I:UpdateFrame()
local db = I.db local db = I.db
I.frame:Point("TOPLEFT", _G["Minimap"], "TOPLEFT", db.xoffset, db.yoffset) I.frame:Point('TOPLEFT', _G.Minimap, 'TOPLEFT', db.xoffset, db.yoffset)
I:SetFonts() I:SetFonts()
if db.enable then if db.enable then
I.frame.text:Show() I.frame.text:Show()
@ -95,11 +95,11 @@ function I:GetColor(dif)
end end
end end
function I:GenerateText(event, guild, force) function I:GenerateText(_, guild)
I.frame.icon:SetText("") I.frame.icon:SetText('')
if not I:InstanceCheck() then if not I:InstanceCheck() then
I.frame.text:SetText("") I.frame.text:SetText('')
else else
local text, isHeroic, isChallengeMode local text, isHeroic, isChallengeMode
local groupType, difficulty, difficultyName, _, _, _, _, instanceGroupSize = select(2, GetInstanceInfo()) local groupType, difficulty, difficultyName, _, _, _, _, instanceGroupSize = select(2, GetInstanceInfo())
@ -107,10 +107,10 @@ function I:GenerateText(event, guild, force)
local r, g, b = I:GetColor(difficulty) local r, g, b = I:GetColor(difficulty)
if (difficulty >= 3 and difficulty <= 7) or difficulty == 9 or E.db.sle.minimap.instance.onlyNumber then if (difficulty >= 3 and difficulty <= 7) or difficulty == 9 or E.db.sle.minimap.instance.onlyNumber then
text = format("|cff%02x%02x%02x%s|r", r, g, b, instanceGroupSize) text = format('|cff%02x%02x%02x%s|r', r, g, b, instanceGroupSize)
else else
difficultyName = sub(difficultyName, 1 , 1) difficultyName = sub(difficultyName, 1 , 1)
text = format(instanceGroupSize.." |cff%02x%02x%02x%s|r", r, g, b, difficultyName) text = format(instanceGroupSize..' |cff%02x%02x%02x%s|r', r, g, b, difficultyName)
end end
I.frame.text:SetText(text) I.frame.text:SetText(text)
@ -119,23 +119,23 @@ function I:GenerateText(event, guild, force)
local logo = I:GuildEmblem() local logo = I:GuildEmblem()
I.frame.icon:SetText(logo) I.frame.icon:SetText(logo)
end end
I.BlizzDif:Hide() Instance:Hide()
I.BlizzCM:Hide() ChallengeMode:Hide()
I.BlizzGDif:Hide() Guild:Hide()
if not I.db.enable then if not I.db.enable then
if not I.BlizzDif:IsShown() and (groupType == "raid" or isHeroic) and not guild then if not Instance:IsShown() and (groupType == 'raid' or isHeroic) and not guild then
I.BlizzDif:Show() Instance:Show()
I.BlizzCM:Hide() ChallengeMode:Hide()
I.BlizzGDif:Hide() Guild:Hide()
elseif not I.BlizzCM:IsShown() and isChallengeMode and not guild then elseif not ChallengeMode:IsShown() and isChallengeMode and not guild then
I.BlizzDif:Hide() Instance:Hide()
I.BlizzCM:Show() ChallengeMode:Show()
I.BlizzGDif:Hide() Guild:Hide()
elseif guild then elseif guild then
I.BlizzDif:Hide() Instance:Hide()
I.BlizzCM:Hide() ChallengeMode:Hide()
I.BlizzGDif:Show() Guild:Show()
end end
end end
end end
@ -146,19 +146,18 @@ function I:Initialize()
if not SLE.initialized or not E.private.general.minimap.enable then return end if not SLE.initialized or not E.private.general.minimap.enable then return end
I.db = E.db.sle.minimap.instance I.db = E.db.sle.minimap.instance
self:CreateText() I:CreateText()
I.BlizzDif:HookScript("OnShow", function(self) if I.db.enable then self:Hide() end end) Instance:HookScript('OnShow', function(frame) if I.db.enable then frame:Hide() end end)
I.BlizzGDif:HookScript("OnShow", function(self) if I.db.enable then self:Hide() end end) Guild:HookScript('OnShow', function(frame) if I.db.enable then frame:Hide() end end)
I.BlizzCM:HookScript("OnShow", function(self) if I.db.enable then self:Hide() end end) ChallengeMode:HookScript('OnShow', function(frame) if I.db.enable then frame:Hide() end end)
self:RegisterEvent("LOADING_SCREEN_DISABLED", "GenerateText") I:RegisterEvent('LOADING_SCREEN_DISABLED', 'GenerateText')
self:RegisterEvent("GROUP_ROSTER_UPDATE", "GenerateText") I:RegisterEvent('GROUP_ROSTER_UPDATE', 'GenerateText')
-- self:RegisterEvent("ZONE_CHANGED_NEW_AREA", "GenerateText") I:RegisterEvent('GUILD_PARTY_STATE_UPDATED', 'GenerateText')
self:RegisterEvent("GUILD_PARTY_STATE_UPDATED", "GenerateText") I:UpdateFrame()
self:UpdateFrame()
hooksecurefunc("MiniMapInstanceDifficulty_Update", I.GenerateText) hooksecurefunc(MinimapCluster.InstanceDifficulty, 'Update', I.GenerateText)
function I:ForUpdateAll() function I:ForUpdateAll()
I.db = E.db.sle.minimap.instance I.db = E.db.sle.minimap.instance
@ -166,4 +165,4 @@ function I:Initialize()
end end
end end
SLE:RegisterModule(I:GetName()) SLE:RegisterModule(I:GetName())

74
Interface/AddOns/ElvUI_SLE/modules/professions/deconstruct.lua

@ -6,7 +6,7 @@ local LCG = E.Libs.ButtonGlow
--GLOBALS: unpack, select, CreateFrame, VIDEO_OPTIONS_ENABLED, VIDEO_OPTIONS_DISABLED --GLOBALS: unpack, select, CreateFrame, VIDEO_OPTIONS_ENABLED, VIDEO_OPTIONS_DISABLED
local _G = _G local _G = _G
local format, strfind, strmatch, strsplit, gsub = format, strfind, strmatch, strsplit, gsub local format, strfind, strsplit, gsub = format, strfind, strsplit, gsub
local GetItemInfo, GetTradeTargetItemLink = GetItemInfo, GetTradeTargetItemLink local GetItemInfo, GetTradeTargetItemLink = GetItemInfo, GetTradeTargetItemLink
local InCombatLockdown = InCombatLockdown local InCombatLockdown = InCombatLockdown
local LOCKED = LOCKED local LOCKED = LOCKED
@ -139,7 +139,7 @@ function Pr:ApplyDeconstruct(itemLink, itemId, spell, spellType, r, g, b)
Pr.DeconstructionReal:SetAttribute('target-slot', slot:GetID()) Pr.DeconstructionReal:SetAttribute('target-slot', slot:GetID())
Pr.DeconstructionReal:SetAllPoints(slot) Pr.DeconstructionReal:SetAllPoints(slot)
Pr.DeconstructionReal:Show() Pr.DeconstructionReal:Show()
if E.private.sle.professions.deconButton.style == "BIG" then if E.private.sle.professions.deconButton.style == "BIG" then
ActionButton_ShowOverlayGlow(Pr.DeconstructionReal) ActionButton_ShowOverlayGlow(Pr.DeconstructionReal)
elseif E.private.sle.professions.deconButton.style == "SMALL" then elseif E.private.sle.professions.deconButton.style == "SMALL" then
@ -169,7 +169,7 @@ end
function Pr:IsUnlockable(itemLink) function Pr:IsUnlockable(itemLink)
local workLink local workLink
if _G["TradeFrame"]:IsShown() then if _G.TradeFrame:IsShown() then
workLink = GetTradeTargetItemLink(7) workLink = GetTradeTargetItemLink(7)
else else
local slot = GetMouseFocus() local slot = GetMouseFocus()
@ -194,8 +194,8 @@ function Pr:DeconstructParser(tt, data)
local ownerName = owner and owner.GetName and owner:GetName() local ownerName = owner and owner.GetName and owner:GetName()
if ownerName and (strfind(ownerName, 'ElvUI_Container') or strfind(ownerName, 'ElvUI_BankContainer')) then if ownerName and (strfind(ownerName, 'ElvUI_Container') or strfind(ownerName, 'ElvUI_BankContainer')) then
local itemId = data.id local itemId = data.id
if not itemId or itemId == "" then return end if not itemId or itemId == '' then return end
local hyperlink local hyperlink
if data.guid then if data.guid then
hyperlink = C_Item.GetItemLinkByGUID(data.guid); hyperlink = C_Item.GetItemLinkByGUID(data.guid);
@ -205,21 +205,21 @@ function Pr:DeconstructParser(tt, data)
if not hyperlink then return end if not hyperlink then return end
if(itemId and not InCombatLockdown()) and (Pr.DeconstructMode == true or (E.global.sle.LOCK.TradeOpen and self:GetOwner():GetName() == "TradeRecipientItem7ItemButton")) then if(itemId and not InCombatLockdown()) and (Pr.DeconstructMode == true or (E.global.sle.LOCK.TradeOpen and self:GetOwner():GetName() == 'TradeRecipientItem7ItemButton')) then
local r, g, b local r, g, b
if lib:IsOpenable(itemId) and Pr:IsUnlockable(hyperlink) then if lib:IsOpenable(itemId) and Pr:IsUnlockable(hyperlink) then
r, g, b = 0, 1, 1 r, g, b = 0, 1, 1
Pr:ApplyDeconstruct(hyperlink, itemId, Pr.LOCKname, "spell", r, g, b) Pr:ApplyDeconstruct(hyperlink, itemId, Pr.LOCKname, 'spell', r, g, b)
elseif lib:IsOpenableProfession(itemId) and Pr:IsUnlockable(hyperlink) then elseif lib:IsOpenableProfession(itemId) and Pr:IsUnlockable(hyperlink) then
r, g, b = 0, 1, 1 r, g, b = 0, 1, 1
local hasKey = HaveKey() local hasKey = HaveKey()
Pr:ApplyDeconstruct(hyperlink, itemId, hasKey, "item", r, g, b) Pr:ApplyDeconstruct(hyperlink, itemId, hasKey, 'item', r, g, b)
elseif lib:IsProspectable(itemId) then elseif lib:IsProspectable(itemId) then
r, g, b = 1, 0, 0 r, g, b = 1, 0, 0
Pr:ApplyDeconstruct(hyperlink, itemId, Pr.PROSPECTname, "spell", r, g, b) Pr:ApplyDeconstruct(hyperlink, itemId, Pr.PROSPECTname, 'spell', r, g, b)
elseif lib:IsMillable(itemId) then elseif lib:IsMillable(itemId) then
r, g, b = 1, 0, 0 r, g, b = 1, 0, 0
Pr:ApplyDeconstruct(hyperlink, itemId, Pr.MILLname, "spell", r, g, b) Pr:ApplyDeconstruct(hyperlink, itemId, Pr.MILLname, 'spell', r, g, b)
elseif Pr.DEname then elseif Pr.DEname then
local isArtRelic local isArtRelic
local itemName, _, itemQuality, _, _, itemClass, itemSubclass, _, equipSlot = GetItemInfo(itemId) local itemName, _, itemQuality, _, _, itemClass, itemSubclass, _, equipSlot = GetItemInfo(itemId)
@ -229,7 +229,7 @@ function Pr:DeconstructParser(tt, data)
end end
if normalItem or isArtRelic then if normalItem or isArtRelic then
r, g, b = 1, 0, 0 r, g, b = 1, 0, 0
Pr:ApplyDeconstruct(hyperlink, itemId, Pr.DEname, "spell", r, g, b) Pr:ApplyDeconstruct(hyperlink, itemId, Pr.DEname, 'spell', r, g, b)
end end
end end
end end
@ -239,48 +239,48 @@ end
function Pr:GetDeconMode() function Pr:GetDeconMode()
local text local text
if Pr.DeconstructMode then if Pr.DeconstructMode then
text = "|cff00FF00 "..VIDEO_OPTIONS_ENABLED.."|r" text = '|cff00FF00 '..VIDEO_OPTIONS_ENABLED..'|r'
else else
text = "|cffFF0000 "..VIDEO_OPTIONS_DISABLED.."|r" text = '|cffFF0000 '..VIDEO_OPTIONS_DISABLED..'|r'
end end
return text return text
end end
function Pr:Construct_BagButton() function Pr:Construct_BagButton()
Pr.DeconstructButton = CreateFrame("Button", "SLE_DeconButton", _G["ElvUI_ContainerFrame"], "BackdropTemplate") Pr.DeconstructButton = CreateFrame('Button', 'SLE_DeconButton', _G.ElvUI_ContainerFrame, 'BackdropTemplate')
Pr.DeconstructButton:SetSize(16 + E.Border, 16 + E.Border) Pr.DeconstructButton:SetSize(16 + E.Border, 16 + E.Border)
Pr.DeconstructButton:SetTemplate() Pr.DeconstructButton:SetTemplate()
Pr.DeconstructButton.ttText = L["Deconstruct Mode"] Pr.DeconstructButton.ttText = L["Deconstruct Mode"]
Pr.DeconstructButton.ttText2 = format(L["Allow you to disenchant/mill/prospect/unlock items.\nClick to toggle.\nCurrent state: %s."], Pr:GetDeconMode()) Pr.DeconstructButton.ttText2 = format(L["Allow you to disenchant/mill/prospect/unlock items.\nClick to toggle.\nCurrent state: %s."], Pr:GetDeconMode())
Pr.DeconstructButton:SetScript("OnEnter", B.Tooltip_Show) Pr.DeconstructButton:SetScript('OnEnter', B.Tooltip_Show)
Pr.DeconstructButton:SetScript("OnLeave", GameTooltip_Hide) Pr.DeconstructButton:SetScript('OnLeave', GameTooltip_Hide)
Pr.DeconstructButton:SetPoint("RIGHT", _G["ElvUI_ContainerFrame"].bagsButton, "LEFT", -5, 0) Pr.DeconstructButton:SetPoint('RIGHT', _G.ElvUI_ContainerFrame.bagsButton, 'LEFT', -5, 0)
Pr.DeconstructButton:SetNormalTexture("Interface\\ICONS\\INV_Rod_Cobalt") Pr.DeconstructButton:SetNormalTexture([[Interface\ICONS\INV_Rod_Cobalt]])
Pr.DeconstructButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords)) Pr.DeconstructButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
Pr.DeconstructButton:GetNormalTexture():SetInside() Pr.DeconstructButton:GetNormalTexture():SetInside()
Pr.DeconstructButton:StyleButton(nil, true) Pr.DeconstructButton:StyleButton(nil, true)
Pr.DeconstructButton:SetScript("OnClick", function(frame) Pr.DeconstructButton:SetScript('OnClick', function(frame)
Pr.DeconstructMode = not Pr.DeconstructMode Pr.DeconstructMode = not Pr.DeconstructMode
if Pr.DeconstructMode then if Pr.DeconstructMode then
Pr.DeconstructButton:SetNormalTexture("Interface\\ICONS\\INV_Rod_EnchantedCobalt") Pr.DeconstructButton:SetNormalTexture([[Interface\ICONS\INV_Rod_EnchantedCobalt]])
if E.private.sle.professions.deconButton.buttonGlow then ActionButton_ShowOverlayGlow(Pr.DeconstructButton) end if E.private.sle.professions.deconButton.buttonGlow then ActionButton_ShowOverlayGlow(Pr.DeconstructButton) end
else else
Pr.DeconstructButton:SetNormalTexture("Interface\\ICONS\\INV_Rod_Cobalt") Pr.DeconstructButton:SetNormalTexture([[Interface\ICONS\INV_Rod_Cobalt]])
ActionButton_HideOverlayGlow(Pr.DeconstructButton) ActionButton_HideOverlayGlow(Pr.DeconstructButton)
end end
Pr.DeconstructButton.ttText2 = format(L["Allow you to disenchant/mill/prospect/unlock items.\nClick to toggle.\nCurrent state: %s."], Pr:GetDeconMode()) Pr.DeconstructButton.ttText2 = format(L["Allow you to disenchant/mill/prospect/unlock items.\nClick to toggle.\nCurrent state: %s."], Pr:GetDeconMode())
B.Tooltip_Show(frame) B.Tooltip_Show(frame)
end) end)
--Moving Elv's stuff --Moving Elv's stuff
_G["ElvUI_ContainerFrame"].vendorGraysButton:SetPoint("RIGHT", Pr.DeconstructButton, "LEFT", -5, 0) _G.ElvUI_ContainerFrame.vendorGraysButton:SetPoint('RIGHT', Pr.DeconstructButton, 'LEFT', -5, 0)
end end
function Pr:ConstructRealDecButton() function Pr:ConstructRealDecButton()
Pr.DeconstructionReal = CreateFrame('Button', "SLE_DeconReal", E.UIParent, 'SecureActionButtonTemplate, AutoCastShineTemplate') Pr.DeconstructionReal = CreateFrame('Button', 'SLE_DeconReal', E.UIParent, 'SecureActionButtonTemplate, AutoCastShineTemplate')
Pr.DeconstructionReal:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end) Pr.DeconstructionReal:SetScript('OnEvent', function(obj, event, ...) obj[event](obj, ...) end)
Pr.DeconstructionReal:RegisterForClicks('AnyUp', 'AnyDown') Pr.DeconstructionReal:RegisterForClicks('AnyUp', 'AnyDown')
Pr.DeconstructionReal:SetFrameStrata("TOOLTIP") Pr.DeconstructionReal:SetFrameStrata('TOOLTIP')
Pr.DeconstructionReal.TipLines = {} Pr.DeconstructionReal.TipLines = {}
Pr.DeconstructionReal.OnLeave = function(frame) Pr.DeconstructionReal.OnLeave = function(frame)
@ -290,23 +290,23 @@ function Pr:ConstructRealDecButton()
else else
frame:ClearAllPoints() frame:ClearAllPoints()
frame:SetAlpha(1) frame:SetAlpha(1)
if _G["GameTooltip"] then _G["GameTooltip"]:Hide() end if _G.GameTooltip then _G.GameTooltip:Hide() end
frame:Hide() frame:Hide()
-- LCG.AutoCastGlow_Stop(frame) -- LCG.AutoCastGlow_Stop(frame) --! Leave here in in case of lib swap back
LCG.HideOverlayGlow(frame) LCG.HideOverlayGlow(frame)
-- LCG.ButtonGlow_Stop(frame) -- LCG.ButtonGlow_Stop(frame) --! Leave here in in case of lib swap back
ActionButton_HideOverlayGlow(frame) ActionButton_HideOverlayGlow(frame)
end end
end end
Pr.DeconstructionReal.SetTip = function(f) Pr.DeconstructionReal.SetTip = function(f)
_G["GameTooltip"]:SetOwner(f,"ANCHOR_LEFT",0,4) _G.GameTooltip:SetOwner(f,'ANCHOR_LEFT',0,4)
_G["GameTooltip"]:ClearLines() _G.GameTooltip:ClearLines()
_G["GameTooltip"]:SetBagItem(f.Bag, f.Slot) _G.GameTooltip:SetBagItem(f.Bag, f.Slot)
end end
Pr.DeconstructionReal:SetScript("OnEnter", Pr.DeconstructionReal.SetTip) Pr.DeconstructionReal:SetScript('OnEnter', Pr.DeconstructionReal.SetTip)
Pr.DeconstructionReal:SetScript("OnLeave", function() Pr.DeconstructionReal:OnLeave() end) Pr.DeconstructionReal:SetScript('OnLeave', function() Pr.DeconstructionReal:OnLeave() end)
Pr.DeconstructionReal:Hide() Pr.DeconstructionReal:Hide()
function Pr.DeconstructionReal:PLAYER_REGEN_ENABLED() function Pr.DeconstructionReal:PLAYER_REGEN_ENABLED()
@ -332,16 +332,16 @@ function Pr:InitializeDeconstruct()
local function Hiding() local function Hiding()
Pr.DeconstructMode = false Pr.DeconstructMode = false
Pr.DeconstructButton:SetNormalTexture("Interface\\ICONS\\INV_Rod_Cobalt") Pr.DeconstructButton:SetNormalTexture([[Interface\ICONS\INV_Rod_Cobalt]])
ActionButton_HideOverlayGlow(Pr.DeconstructButton) ActionButton_HideOverlayGlow(Pr.DeconstructButton)
Pr.DeconstructionReal:OnLeave() Pr.DeconstructionReal:OnLeave()
end end
_G["ElvUI_ContainerFrame"]:HookScript("OnHide", Hiding) _G.ElvUI_ContainerFrame:HookScript('OnHide', Hiding)
TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Item, function(tt, data) Pr:DeconstructParser(tt, data) end) TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Item, function(tt, data) Pr:DeconstructParser(tt, data) end)
Pr:Blacklisting("DE") Pr:Blacklisting('DE')
Pr:Blacklisting("LOCK") Pr:Blacklisting('LOCK')
Get_ArtRelic() Get_ArtRelic()
end end

19
Interface/AddOns/ElvUI_SLE/modules/tooltips/tooltip.lua

@ -1,25 +1,24 @@
local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local TT = E.Tooltip local TT = E.Tooltip
--GLOBALS: unpack, select, hooksecurefunc
local _G = _G local _G = _G
local TooltipDataType = Enum.TooltipDataType local TooltipDataType = Enum.TooltipDataType
-- local iconPath = [[Interface\AddOns\ElvUI_SLE\media\textures\]]
local iconPath = [[Interface\AddOns\ElvUI_SLE\media\textures\afk\factionlogo\blizzard\]] local iconPath = [[Interface\AddOns\ElvUI_SLE\media\textures\afk\factionlogo\blizzard\]]
local function OnTooltipSetUnit(tt, data) local function OnTooltipSetUnit(tt)
if not SLE.initialized then return end if not SLE.initialized then return end
if not E.db.sle.tooltip.showFaction then return end if not E.db.sle.tooltip.showFaction then return end
local unit = select(2, tt:GetUnit()) local unit = select(2, tt:GetUnit())
if (UnitIsPlayer(unit)) then if UnitIsPlayer(unit) then
local text = _G["GameTooltipTextLeft1"]:GetText() local text = _G.GameTooltipTextLeft1:GetText()
local faction = UnitFactionGroup(unit) local faction = UnitFactionGroup(unit) or 'Neutral'
if not faction then faction = "Neutral" end if text and faction then
-- |TTexturePath:size1:size2:xoffset:yoffset:dimx:dimy:coordx1:coordx2:coordy1:coordy2|t -- |TTexturePath:size1:size2:xoffset:yoffset:dimx:dimy:coordx1:coordx2:coordy1:coordy2|t
-- _G["GameTooltipTextLeft1"]:SetText("|T"..iconPath..faction..".tga:15:15:0:0:64:64:2:56:2:56|t "..text) -- _G["GameTooltipTextLeft1"]:SetText("|T"..iconPath..faction..".tga:15:15:0:0:64:64:2:56:2:56|t "..text)
_G["GameTooltipTextLeft1"]:SetText("|T"..iconPath..faction..".tga:0:0:0:0:128:128:28:100:28:100|t "..text) _G.GameTooltipTextLeft1:SetText('|T'..iconPath..faction..'.tga:0:0:0:0:128:128:28:100:28:100|t '..text)
end
end end
end end

6
Interface/AddOns/ElvUI_SLE/options/minimap/instance_c.lua

@ -22,7 +22,7 @@ local function configTable()
name = L["Enable"], name = L["Enable"],
desc = L["Show instance difficulty info as text."], desc = L["Show instance difficulty info as text."],
disabled = function() return not E.private.general.minimap.enable end, disabled = function() return not E.private.general.minimap.enable end,
set = function(info, value) E.db.sle.minimap.instance[ info[#info] ] = value; I:GenerateText(nil, nil, true) end, set = function(info, value) E.db.sle.minimap.instance[ info[#info] ] = value; I:GenerateText() end,
}, },
xoffset = { xoffset = {
order = 3, type = 'range', name = L["X-Offset"], min = -300, max = 300, step = 1, order = 3, type = 'range', name = L["X-Offset"], min = -300, max = 300, step = 1,
@ -37,7 +37,7 @@ local function configTable()
type = 'toggle', type = 'toggle',
name = L["Only Number"], name = L["Only Number"],
disabled = function() return not E.private.general.minimap.enable or not E.db.sle.minimap.instance.enable end, disabled = function() return not E.private.general.minimap.enable or not E.db.sle.minimap.instance.enable end,
set = function(info, value) E.db.sle.minimap.instance[ info[#info] ] = value; I:GenerateText(nil, nil, true) end, set = function(info, value) E.db.sle.minimap.instance[ info[#info] ] = value; I:GenerateText() end,
}, },
fontGroup = { fontGroup = {
order = 6, order = 6,
@ -107,4 +107,4 @@ local function configTable()
} }
end end
tinsert(SLE.Configs, configTable) tinsert(SLE.Configs, configTable)

50
Interface/AddOns/Rematch/Main.lua

@ -241,6 +241,7 @@ function rematch:InitSavedVars()
end end
end end
end end
settings.SelectedTab = settings.SelectedTab or 1 settings.SelectedTab = settings.SelectedTab or 1
settings.MiniMinimized = nil -- disabling this setting settings.MiniMinimized = nil -- disabling this setting
rematch:ValidateTeams() -- make sure teams are okay rematch:ValidateTeams() -- make sure teams are okay
@ -743,6 +744,36 @@ function rematch.SlashHandler(msg)
msg = SecureCmdOptionParse(msg) msg = SecureCmdOptionParse(msg)
if msg:lower()=="debug" then if msg:lower()=="debug" then
rematch:ShowDebugDialog() rematch:ShowDebugDialog()
elseif msg:lower()=="queuedebug" then -- watch for pets being removed from the queue
setmetatable(RematchSettings,{
__newIndex = function(self,key,value)
if key=="LevelingQueue" and not rematch.Level25PetLeavingQueue then
local text = GetAddOnMetadata("Rematch","Version").." LevelingQueue reassigned from "..Rematch:CallerID()
Rematch:ShowMultiLineDialog("Leveling Queue Pet Deleted!",text)
end
end
})
setmetatable(RematchSettings.LevelingQueue,{
__newIndex = function(self,key,value)
if not value and not rematch.Level25PetLeavingQueue then
local text = GetAddOnMetadata("Rematch","Version").." Setting "..(key or "nil").." to "..(value or "nil").." from "..Rematch:CallerID()
Rematch:ShowMultiLineDialog("Leveling Queue Pet Deleted!",text)
end
end
})
hooksecurefunc("tremove",function(self,index)
if self==RematchSettings.LevelingQueue and not rematch.Level25PetLeavingQueue then
local text = GetAddOnMetadata("Rematch","Version").." Removing index "..(index or "nil").." from "..Rematch:CallerID()
Rematch:ShowMultiLineDialog("Leveling Queue Pet Deleted!",text)
end
end)
hooksecurefunc(table,"remove",function(self,index)
if self==RematchSettings.LevelingQueue and not rematch.Level25PetLeavingQueue then
local text = GetAddOnMetadata("Rematch","Version").." Removing index "..(index or "nil").." from "..Rematch:CallerID()
Rematch:ShowMultiLineDialog("Leveling Queue Pet Deleted!",text)
end
end)
rematch:print("Now watching for anything trying to remove pets from the leveling queue. If you get a popup that says Leveling Queue Pet Deleted! at the top, please copy and paste the contents in a comment on Rematch or PM Gello at wowinterface or curse, thanks! (This monitoring only lasts until you logout/reload.)")
elseif msg:trim():len()>0 then elseif msg:trim():len()>0 then
-- going to desensitize the passed name so "aki the chosen" works for "Aki the Chosen" -- going to desensitize the passed name so "aki the chosen" works for "Aki the Chosen"
local name = format("^%s$",rematch:DesensitizeText(msg)) local name = format("^%s$",rematch:DesensitizeText(msg))
@ -791,6 +822,24 @@ function rematch:ShutdownAddon()
Rematch.ToggleNotes = function() end Rematch.ToggleNotes = function() end
end end
function rematch:ShowMultiLineDialog(title,text)
-- data collected, now show dialog
local dialog = rematch:ShowDialog("MultiLineDialog",300,300,title,nil,nil,nil,OKAY)
dialog.MultiLine:SetPoint("TOP",0,-38)
dialog.MultiLine:SetSize(262,224)
dialog.MultiLine:Show()
dialog:SetContext("settings",text)
dialog.MultiLine.EditBox:SetScript("OnTextChanged",function(self)
if self:GetText()~=dialog:GetContext("settings") then
self:SetText(dialog:GetContext("settings"))
self:SetCursorPosition(0)
self:HighlightText(0)
self:SetFocus(true)
end
end)
dialog.MultiLine.EditBox:SetText("")
end
-- /rematch debug displays a dialog containing enabled options and various settings the user can copy to a post/comment to help debug -- /rematch debug displays a dialog containing enabled options and various settings the user can copy to a post/comment to help debug
function rematch:ShowDebugDialog() function rematch:ShowDebugDialog()
local data = {} local data = {}
@ -981,3 +1030,4 @@ function rematch:SetFootnoteIcon(button,icon)
end end
end end
end end

8
Interface/AddOns/Rematch/Process/QueueProcess.lua

@ -122,7 +122,9 @@ function rematch:ProcessQueue()
else else
local petInfo = rematch.petInfo:Fetch(petID) local petInfo = rematch.petInfo:Fetch(petID)
if petInfo.valid then -- only remove valid pets that can't level if petInfo.valid then -- only remove valid pets that can't level
rematch.Level25PetLeavingQueue = true
tremove(queue,i) -- remove pets that can't level (or that are already in queue) tremove(queue,i) -- remove pets that can't level (or that are already in queue)
rematch.Level25PetLeavingQueue = nil
end end
end end
end end
@ -266,6 +268,7 @@ end
-- to add/move a pet to the top of the queue: index=1 -- to add/move a pet to the top of the queue: index=1
-- to add/move a pet to the end of the queue: index=#queue+1 -- to add/move a pet to the end of the queue: index=#queue+1
function rematch:InsertPetToQueue(index,petID) function rematch:InsertPetToQueue(index,petID)
rematch.Level25PetLeavingQueue = true
local isNew = true -- assume pet is new local isNew = true -- assume pet is new
local oldQueueSize = #queue -- before we add something, note size of queue local oldQueueSize = #queue -- before we add something, note size of queue
-- check if pet already exists in queue; if so replace it with a placeholder 0 -- check if pet already exists in queue; if so replace it with a placeholder 0
@ -289,9 +292,11 @@ function rematch:InsertPetToQueue(index,petID)
rematch:MaybeSlotNewLevelingPet(petID) rematch:MaybeSlotNewLevelingPet(petID)
end end
rematch:UpdateQueue() rematch:UpdateQueue()
rematch.Level25PetLeavingQueue = nil
end end
function rematch:RemovePetFromQueue(petID) function rematch:RemovePetFromQueue(petID)
rematch.Level25PetLeavingQueue = true
for i=#queue,1,-1 do for i=#queue,1,-1 do
if queue[i]==petID then if queue[i]==petID then
tremove(queue,i) tremove(queue,i)
@ -299,6 +304,7 @@ function rematch:RemovePetFromQueue(petID)
end end
rematch.outgoingQueuedPetID = petID -- note this pet for ProcessQueue within the UpdateUI rematch.outgoingQueuedPetID = petID -- note this pet for ProcessQueue within the UpdateUI
rematch:UpdateQueue() rematch:UpdateQueue()
rematch.Level25PetLeavingQueue = nil
end end
-- this should be the only place to add many pets to the end of the queue -- this should be the only place to add many pets to the end of the queue
@ -507,6 +513,7 @@ end
-- a time (initial login?), so for a workaround invalid pets are allowed to remain in the queue and the user can remove them; 99% of -- a time (initial login?), so for a workaround invalid pets are allowed to remain in the queue and the user can remove them; 99% of
-- time this is when a pet in the queue is caged or released) -- time this is when a pet in the queue is caged or released)
function rematch:RemoveInvalidPetsFromQueue() function rematch:RemoveInvalidPetsFromQueue()
rematch.Level25PetLeavingQueue = true
for i=#queue,1,-1 do for i=#queue,1,-1 do
local petInfo = rematch.petInfo:Fetch(queue[i]) local petInfo = rematch.petInfo:Fetch(queue[i])
if not petInfo.valid then if not petInfo.valid then
@ -514,4 +521,5 @@ function rematch:RemoveInvalidPetsFromQueue()
end end
end end
rematch:UpdateQueue() rematch:UpdateQueue()
rematch.Level25PetLeavingQueue = nil
end end

16
Interface/AddOns/Rematch/Process/Roster.lua

@ -31,7 +31,7 @@ roster.ownedNeedsUpdated = true -- becomes true when we need to expand filters t
rematch:InitModule(function() rematch:InitModule(function()
settings = RematchSettings settings = RematchSettings
roster:RegisterEvent("PET_JOURNAL_LIST_UPDATE") roster:RegisterEvent("UPDATE_SUMMONPETS_ACTION")
roster:SetScript("OnEvent",function(self,event,...) roster[event](self,...) end) roster:SetScript("OnEvent",function(self,event,...) roster[event](self,...) end)
roster.isStrongCache = rematch:CreateODTable() -- used by IsStrong() function roster.isStrongCache = rematch:CreateODTable() -- used by IsStrong() function
end) end)
@ -47,6 +47,17 @@ function rematch:UpdateRoster()
rematch:StartTimer("RosterUpdate",0,rematch.UpdateUI) rematch:StartTimer("RosterUpdate",0,rematch.UpdateUI)
end end
--[[ As of 10.0.2, using UPDATE_SUMMONPETS_ACTION to test whether pets are loaded on login ]]
-- using this to know when pets are loaded
function roster:UPDATE_SUMMONPETS_ACTION()
roster:UnregisterEvent("UPDATE_SUMMONPETS_ACTION")
roster:RegisterEvent("PET_JOURNAL_LIST_UPDATE")
roster:RegisterEvent("NEW_PET_ADDED")
roster:RegisterEvent("PET_JOURNAL_PET_DELETED")
roster:PET_JOURNAL_LIST_UPDATE() -- start first check
end
--[[ PET_JOURNAL_LIST_UPDATE --[[ PET_JOURNAL_LIST_UPDATE
Just about everything that changes pets (added/removed, renamed, stoned for level/rarity, etc) Just about everything that changes pets (added/removed, renamed, stoned for level/rarity, etc)
@ -99,6 +110,9 @@ function roster:PET_JOURNAL_LIST_UPDATE()
rematch:UpdateUI() rematch:UpdateUI()
end end
roster.NEW_PET_ADDED = roster.PET_JOURNAL_LIST_UPDATE
roster.PET_JOURNAL_PET_DELETED = roster.PET_JOURNAL_LIST_UPDATE
-- this is only registered while "Other","CurrentZone" filter enabled -- this is only registered while "Other","CurrentZone" filter enabled
function roster:ZONE_CHANGED_NEW_AREA() function roster:ZONE_CHANGED_NEW_AREA()
if roster:GetFilter("Other","CurrentZone") then if roster:GetFilter("Other","CurrentZone") then

2
Interface/AddOns/Rematch/Rematch.toc

@ -2,7 +2,7 @@
## Title: Rematch ## Title: Rematch
## Notes: A pet journal alternative for managing pets and teams. ## Notes: A pet journal alternative for managing pets and teams.
## Author: Gello ## Author: Gello
## Version: 4.14.6 ## Version: 4.14.7
## X-WoWI-ID: 22190 ## X-WoWI-ID: 22190
## X-Wago-ID: e56nOpK9 ## X-Wago-ID: e56nOpK9
## X-Curse-Project-ID: 66047 ## X-Curse-Project-ID: 66047

9
Interface/AddOns/Rematch/Utils.lua

@ -672,6 +672,15 @@ function rematch:DebugStack()
return "\124cffc0c0c0"..table.concat(callers,", ") return "\124cffc0c0c0"..table.concat(callers,", ")
end end
-- returns where the calling function was called from
function rematch:CallerID()
local where = (debugstack():match(".-\n.-\n.-\n.-\\AddOns\\.-\\(.-:%d+.-)\n") or ""):gsub("\"]","")
if where:len()==0 then
where = (debugstack():match(".-\n.-\n.-\\AddOns\\.-\\(.-:%d+.-)\n") or ""):gsub("\"]","")
end
return where:len()>0 and where or debugstack()
end
-- Summoning/dismissing all pets are on GCD, but not all petIDs think so! -- Summoning/dismissing all pets are on GCD, but not all petIDs think so!
-- For the toolbar cooldown display and Keep Companion option, we need to be aware -- For the toolbar cooldown display and Keep Companion option, we need to be aware
-- of the GCD. If a GCD petID isn't already discovered, it will go through the -- of the GCD. If a GCD petID isn't already discovered, it will go through the

4
Interface/AddOns/Rematch/changelog.txt

@ -1,3 +1,7 @@
11/21/2022 version 4.14.7
- Changed event to trigger on pets loading from PET_JOURNAL_LIST_UPDATE to UPDATE_SUMMONPETS_ACTION.
- Added '/rematch queuedebug' slash command to monitor pets being deleted from the queue. Anyone who is experiencing their queue emptying: Run this command anytime after you log in and go about your business. If you get a popup that says Leveling Queue Pet Deleted! at the top, copy and paste its contents in a comment or PM to Gello at wowinterface or curse. The monitoring from this command ends on a logout/reload.
11/20/2022 version 4.14.6 11/20/2022 version 4.14.6
- Pets are no longer automatically removed from the leveling queue when they are found missing or invalid - this includes when they are caged or released. - Pets are no longer automatically removed from the leveling queue when they are found missing or invalid - this includes when they are caged or released.
- When a leveling queue pet is missing or invalid (likely due to being caged or released), a "Missing or Invalid Pet" will be in the queue in its place. - When a leveling queue pet is missing or invalid (likely due to being caged or released), a "Missing or Invalid Pet" will be in the queue in its place.

Loading…
Cancel
Save