Skip to content

Commit 8b82c16

Browse files
committed
13.58
2 parents 8e5ac82 + e13fd42 commit 8b82c16

17 files changed

+228
-149
lines changed

ElvUI/Classic/Filters/Filters.lua

+139-74
Large diffs are not rendered by default.

ElvUI/Classic/Modules/Blizzard/ColorPicker.lua

+37-32
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ local function UpdateAlphaText(alpha)
3131
_G.ColorPPBoxA:SetText(alpha)
3232
end
3333

34-
local function UpdateAlpha(tbox)
35-
local num = tbox:GetNumber()
36-
if num > 100 then
37-
tbox:SetText(100)
38-
num = 100
39-
end
40-
41-
_G.OpacitySliderFrame:SetValue(1 - (num * 0.01))
42-
end
43-
4434
local function expandFromThree(r, g, b)
4535
return strjoin('',r,r,g,g,b,b)
4636
end
@@ -117,27 +107,7 @@ local function delayCall()
117107
end
118108

119109
local last = {r = 0, g = 0, b = 0, a = 0}
120-
local function onColorSelect(frame, r, g, b)
121-
if frame.noColorCallback then
122-
return -- prevent error from E:GrabColorPickerValues, better note in that function
123-
elseif r ~= last.r or g ~= last.g or b ~= last.b then
124-
last.r, last.g, last.b = r, g, b
125-
else -- colors match so we don't need to update, most likely mouse is held down
126-
return
127-
end
128-
129-
_G.ColorSwatch:SetColorTexture(r, g, b)
130-
UpdateColorTexts(r, g, b)
131-
132-
if not frame:IsVisible() then
133-
delayCall()
134-
elseif not delayFunc then
135-
delayFunc = ColorPickerFrame.func
136-
E:Delay(delayWait, delayCall)
137-
end
138-
end
139-
140-
local function onValueChanged(_, value)
110+
local function onAlphaValueChanged(_, value)
141111
local alpha = alphaValue(value)
142112
if last.a ~= alpha then
143113
last.a = alpha
@@ -160,13 +130,48 @@ local function onValueChanged(_, value)
160130
end
161131
end
162132

133+
local function UpdateAlpha(tbox)
134+
local num = tbox:GetNumber()
135+
if num > 100 then
136+
tbox:SetText(100)
137+
num = 100
138+
end
139+
140+
local value = 1 - (num * 0.01)
141+
_G.OpacitySliderFrame:SetValue(value)
142+
-- onAlphaValueChanged(nil, value)
143+
end
144+
145+
local function onColorSelect(frame, r, g, b)
146+
if frame.noColorCallback then
147+
return -- prevent error from E:GrabColorPickerValues, better note in that function
148+
elseif r ~= last.r or g ~= last.g or b ~= last.b then
149+
last.r, last.g, last.b = r, g, b
150+
else -- colors match so we don't need to update, most likely mouse is held down
151+
return
152+
end
153+
154+
_G.ColorSwatch:SetColorTexture(r, g, b)
155+
UpdateColorTexts(r, g, b)
156+
-- UpdateAlphaText()
157+
158+
if not frame:IsVisible() then
159+
delayCall()
160+
elseif not delayFunc then -- ColorPickerFrame.func is from stock Ace3 widget not the ElvUI variant
161+
delayFunc = ColorPickerFrame.swatchFunc or ColorPickerFrame.func
162+
E:Delay(delayWait, delayCall)
163+
end
164+
end
165+
163166
function BL:EnhanceColorPicker()
164167
if E:IsAddOnEnabled('ColorPickerPlus') then return end
165168

166169
if E.Retail then
167170
ColorPickerFrame.Border:Hide()
168171
end
169172

173+
ColorPickerFrame.swatchFunc = E.noop -- REMOVE THIS LATER IF WE CAN? errors on Footer.OkayButton
174+
170175
local Header = ColorPickerFrame.Header or _G.ColorPickerFrameHeader
171176
Header:StripTextures()
172177
Header:ClearAllPoints()
@@ -184,7 +189,7 @@ function BL:EnhanceColorPicker()
184189

185190
-- Memory Fix, Colorpicker will call the self.func() 100x per second, causing fps/memory issues,
186191
-- We overwrite these two scripts and set a limit on how often we allow a call their update functions
187-
_G.OpacitySliderFrame:SetScript('OnValueChanged', onValueChanged)
192+
_G.OpacitySliderFrame:SetScript('OnValueChanged', onAlphaValueChanged)
188193

189194
-- Keep the colors updated
190195
ColorPickerFrame:SetScript('OnColorSelect', onColorSelect)

ElvUI/Core/General/StatusReport.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ function E:UpdateStatusFrame()
252252
if E.Retail then
253253
Section3.Content.Line6.Text:SetFormattedText('Specialization: |cff4beb2c%s|r', GetSpecName() or UNKNOWN)
254254
elseif E.Classic then
255-
Section3.Content.Line6.Text:SetFormattedText('Hardcore: |cff4beb2c%s|r', E.ClassicHC and 'Yes' or 'No')
255+
Section3.Content.Line6.Text:SetFormattedText('Game Mode: |cff4beb2c%s|r', E.ClassicHC and 'Hardcore' or E.ClassicSOD and 'Seasonal' or 'Normal')
256256
end
257257

258258
StatusFrame.TitleLogoFrame.LogoTop:SetVertexColor(unpack(E.media.rgbvaluecolor))

ElvUI/ElvUI_Classic.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Title: |cff1784d1ElvUI|r |cfd9b9b9bClassic|r
22
## Notes: User Interface Replacement
33
## Author: Elv, Simpy
4-
## Version: 13.57
4+
## Version: 13.58
55
## SavedVariables: ElvDB, ElvPrivateDB
66
## SavedVariablesPerCharacter: ElvCharacterDB
77
## OptionalDeps: SharedMedia, Tukui, Masque

ElvUI/ElvUI_Mainline.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Title: |cff1784d1ElvUI|r
22
## Notes: User Interface Replacement
33
## Author: Elv, Simpy
4-
## Version: 13.57
4+
## Version: 13.58
55
## SavedVariables: ElvDB, ElvPrivateDB
66
## SavedVariablesPerCharacter: ElvCharacterDB
77
## OptionalDeps: SharedMedia, Tukui, Masque

ElvUI/ElvUI_Wrath.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Title: |cff1784d1ElvUI|r |cfd9b9b9bWrath|r
22
## Notes: User Interface Replacement
33
## Author: Elv, Simpy
4-
## Version: 13.57
4+
## Version: 13.58
55
## SavedVariables: ElvDB, ElvPrivateDB
66
## SavedVariablesPerCharacter: ElvCharacterDB
77
## OptionalDeps: SharedMedia, Tukui, Masque

ElvUI/Mainline/Modules/Blizzard/ColorPicker.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ local function onColorSelect(frame, r, g, b)
163163
if not frame:IsVisible() then
164164
delayCall()
165165
elseif not delayFunc then
166-
delayFunc = ColorPickerFrame.func
166+
delayFunc = ColorPickerFrame.swatchFunc
167167

168168
if delayFunc then
169169
E:Delay(delayWait, delayCall)

ElvUI_Libraries/Core/Ace3/AceGUI-3.0/AceGUI-3.0.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- Widgets -->
1515
<Script file="widgets\AceGUIWidget-Button-ElvUI.lua"/>
1616
<Script file="widgets\AceGUIWidget-CheckBox.lua"/>
17-
<Script file="widgets\AceGUIWidget-ColorPicker.lua"/>
17+
<Script file="widgets\AceGUIWidget-ColorPicker-ElvUI.lua"/>
1818
<Script file="widgets\AceGUIWidget-DropDown.lua"/>
1919
<Script file="widgets\AceGUIWidget-DropDown-Items.lua"/>
2020
<Script file="widgets\AceGUIWidget-EditBox-ElvUI.lua"/>

ElvUI_Libraries/Core/Ace3/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua ElvUI_Libraries/Core/Ace3/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker-ElvUI.lua

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
--[[-----------------------------------------------------------------------------
22
ColorPicker Widget
33
-------------------------------------------------------------------------------]]
4-
local Type, Version = "ColorPicker-ElvUI", 27
4+
local Type, Version = "ColorPicker-ElvUI", 28
55
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
66
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
77

8+
local IsRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
9+
810
local pairs = pairs
911

1012
local CreateFrame, UIParent = CreateFrame, UIParent
@@ -21,6 +23,12 @@ local function ColorCallback(self, r, g, b, a, isAlpha)
2123
-- which is caused when we set values into the color picker again on `OnValueChanged`
2224
if ColorPickerFrame.noColorCallback then return end
2325

26+
-- no change, skip update
27+
if r == self.r and g == self.g and b == self.b and a == self.a then
28+
return
29+
end
30+
31+
-- no alpha option
2432
if not self.HasAlpha then
2533
a = 1
2634
end
@@ -57,12 +65,13 @@ local function ColorSwatch_OnClick(frame)
5765
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
5866
ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
5967
ColorPickerFrame:SetClampedToScreen(true)
68+
ColorPickerFrame:EnableMouse(true) -- Make sure the background isn't click-through
6069

61-
ColorPickerFrame.func = function()
70+
ColorPickerFrame.swatchFunc = function()
6271
local r, g, b = ColorPickerFrame:GetColorRGB()
6372
local alpha
6473

65-
if ColorPickerFrame.GetColorAlpha then
74+
if IsRetail then
6675
alpha = ColorPickerFrame:GetColorAlpha()
6776
else
6877
alpha = 1 - OpacitySliderFrame:GetValue()
@@ -76,7 +85,7 @@ local function ColorSwatch_OnClick(frame)
7685
local r, g, b = ColorPickerFrame:GetColorRGB()
7786
local alpha
7887

79-
if ColorPickerFrame.GetColorAlpha then
88+
if IsRetail then
8089
alpha = ColorPickerFrame:GetColorAlpha()
8190
else
8291
alpha = 1 - OpacitySliderFrame:GetValue()
@@ -87,7 +96,7 @@ local function ColorSwatch_OnClick(frame)
8796

8897
local r, g, b, a = self.r, self.g, self.b, self.a
8998
if self.HasAlpha then
90-
ColorPickerFrame.opacity = (ColorPickerFrame.GetColorAlpha and (a or 0)) or (1 - (a or 0))
99+
ColorPickerFrame.opacity = (IsRetail and (a or 0)) or (1 - (a or 0))
91100
end
92101

93102
if ColorPickerFrame.Content and ColorPickerFrame.Content.ColorPicker then
@@ -100,7 +109,7 @@ local function ColorSwatch_OnClick(frame)
100109
if ColorPPDefault and self.dR and self.dG and self.dB then
101110
local alpha = 1
102111
if self.dA then
103-
alpha = (ColorPickerFrame.GetColorAlpha and self.dA) or (1 - self.dA)
112+
alpha = (IsRetail and self.dA) or (1 - self.dA)
104113
end
105114

106115
if not ColorPPDefault.colors then
@@ -111,7 +120,7 @@ local function ColorSwatch_OnClick(frame)
111120
end
112121

113122
ColorPickerFrame.cancelFunc = function()
114-
ColorPickerFrame.func = nil
123+
ColorPickerFrame.swatchFunc = nil
115124
ColorPickerFrame.opacityFunc = nil
116125

117126
ColorCallback(self, r, g, b, a, true)

ElvUI_Libraries/Core/LibActionButton-1.0/LibActionButton-1.0.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- License: LICENSE.txt
22

33
local MAJOR_VERSION = "LibActionButton-1.0-ElvUI"
4-
local MINOR_VERSION = 49 -- the real minor version is 108
4+
local MINOR_VERSION = 50 -- the real minor version is 110
55

66
local LibStub = LibStub
77
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
@@ -2654,11 +2654,11 @@ Action.GetSpellId = function(self)
26542654
end
26552655
end
26562656
Action.GetLossOfControlCooldown = function(self) return GetActionLossOfControlCooldown(self._state_action) end
2657-
if C_UnitAuras then
2657+
if C_UnitAuras and C_UnitAuras.GetCooldownAuraBySpellID then
26582658
Action.GetPassiveCooldownSpellID = function(self)
26592659
local _actionType, actionID = GetActionInfo(self._state_action)
26602660
local onEquipPassiveSpellID
2661-
if actionID and not WoWClassic then
2661+
if actionID and C_ActionBar and C_ActionBar.GetItemActionOnEquipSpellID then
26622662
onEquipPassiveSpellID = C_ActionBar.GetItemActionOnEquipSpellID(self._state_action)
26632663
end
26642664
if onEquipPassiveSpellID then

ElvUI_Libraries/Core/LibRangeCheck-3.0/LibRangeCheck-3.0.lua

+21-21
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ License: MIT
4040
-- @class file
4141
-- @name LibRangeCheck-3.0
4242
local MAJOR_VERSION = "LibRangeCheck-3.0"
43-
local MINOR_VERSION = 9
43+
local MINOR_VERSION = 12
4444

4545
-- GLOBALS: LibStub, CreateFrame
4646

@@ -52,6 +52,7 @@ end
5252

5353
local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
5454
local isWrath = WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC
55+
local isEra = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
5556

5657
local next = next
5758
local type = type
@@ -86,11 +87,12 @@ local GetTime = GetTime
8687
local HandSlotId = GetInventorySlotInfo("HANDSSLOT")
8788
local math_floor = math.floor
8889
local UnitIsVisible = UnitIsVisible
90+
local Item = Item
8991

9092
local C_Timer_NewTicker = C_Timer.NewTicker
9193

9294
local InCombatLockdownRestriction
93-
if isRetail then
95+
if isRetail or isEra then
9496
InCombatLockdownRestriction = function(unit) return InCombatLockdown() and not UnitCanAttack("player", unit) end
9597
else
9698
InCombatLockdownRestriction = function() return false end
@@ -527,8 +529,8 @@ end
527529

528530
-- temporary stuff
529531

530-
local pendingItemRequest
531-
local itemRequestTimeoutAt
532+
local pendingItemRequest = {}
533+
local itemRequestTimeoutAt = {}
532534
local foundNewItems
533535
local cacheAllItems
534536
local friendItemRequests
@@ -678,7 +680,7 @@ local function createCheckerList(spellList, itemList, interactList)
678680
for range, items in pairs(itemList) do
679681
for i = 1, #items do
680682
local item = items[i]
681-
if GetItemInfo(item) then
683+
if Item:CreateFromItemID(item):IsItemDataCached() and GetItemInfo(item) then
682684
addChecker(res, range, nil, checkers_Item[item], "item:" .. item)
683685
break
684686
end
@@ -1233,8 +1235,9 @@ end
12331235

12341236
function lib:GET_ITEM_INFO_RECEIVED(event, item, success)
12351237
-- print("### GET_ITEM_INFO_RECEIVED: " .. tostring(item) .. ", " .. tostring(success))
1236-
if item == pendingItemRequest then
1237-
pendingItemRequest = nil
1238+
if pendingItemRequest[item] then
1239+
pendingItemRequest[item] = nil
1240+
itemRequestTimeoutAt[item] = nil
12381241
if not success then
12391242
self.failedItemRequests[item] = true
12401243
end
@@ -1253,40 +1256,37 @@ function lib:processItemRequests(itemRequests)
12531256
if not i then
12541257
itemRequests[range] = nil
12551258
break
1256-
elseif self.failedItemRequests[item] then
1259+
elseif Item:CreateFromItemID(item):IsItemEmpty() or self.failedItemRequests[item] then
12571260
-- print("### processItemRequests: failed: " .. tostring(item))
12581261
tremove(items, i)
1259-
elseif item == pendingItemRequest and GetTime() < itemRequestTimeoutAt then
1262+
elseif pendingItemRequest[item] and GetTime() < itemRequestTimeoutAt[item] then
12601263
return true -- still waiting for server response
12611264
elseif GetItemInfo(item) then
12621265
-- print("### processItemRequests: found: " .. tostring(item))
1263-
if itemRequestTimeoutAt then
1264-
-- print("### processItemRequests: new: " .. tostring(item))
1265-
foundNewItems = true
1266-
itemRequestTimeoutAt = nil
1267-
pendingItemRequest = nil
1268-
end
1266+
foundNewItems = true
1267+
itemRequestTimeoutAt[item] = nil
1268+
pendingItemRequest[item] = nil
12691269
if not cacheAllItems then
12701270
itemRequests[range] = nil
12711271
break
12721272
end
12731273
tremove(items, i)
1274-
elseif not itemRequestTimeoutAt then
1274+
elseif not itemRequestTimeoutAt[item] then
12751275
-- print("### processItemRequests: waiting: " .. tostring(item))
1276-
itemRequestTimeoutAt = GetTime() + ItemRequestTimeout
1277-
pendingItemRequest = item
1276+
itemRequestTimeoutAt[item] = GetTime() + ItemRequestTimeout
1277+
pendingItemRequest[item] = true
12781278
if not self.frame:IsEventRegistered("GET_ITEM_INFO_RECEIVED") then
12791279
self.frame:RegisterEvent("GET_ITEM_INFO_RECEIVED")
12801280
end
12811281
return true
1282-
elseif GetTime() >= itemRequestTimeoutAt then
1282+
elseif GetTime() >= itemRequestTimeoutAt[item] then
12831283
-- print("### processItemRequests: timeout: " .. tostring(item))
12841284
if cacheAllItems then
12851285
print(MAJOR_VERSION .. ": timeout for item: " .. tostring(item))
12861286
end
12871287
self.failedItemRequests[item] = true
1288-
itemRequestTimeoutAt = nil
1289-
pendingItemRequest = nil
1288+
itemRequestTimeoutAt[item] = nil
1289+
pendingItemRequest[item] = nil
12901290
tremove(items, i)
12911291
else
12921292
return true -- still waiting for server response

ElvUI_Libraries/ElvUI_Libraries_Classic.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Title: |cff1784d1ElvUI|r |cfd9b9b9bLibraries|r
22
## Notes: Libraries that power ElvUI
33
## Author: Elv, Simpy
4-
## Version: 13.57
4+
## Version: 13.58
55
## Interface: 11501
66
## OptionalDeps: LibHealComm-4.0
77
## X-oUF: ElvUF

ElvUI_Libraries/ElvUI_Libraries_Mainline.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Title: |cff1784d1ElvUI|r |cfd9b9b9bLibraries|r
22
## Notes: Libraries that power ElvUI
33
## Author: Elv, Simpy
4-
## Version: 13.57
4+
## Version: 13.58
55
## Interface: 100205
66
## X-oUF: ElvUF
77
## IconTexture: Interface\AddOns\ElvUI\Core\Media\Textures\LogoAddon

0 commit comments

Comments
 (0)