Skip to content

Commit b67868c

Browse files
committed
Merge branch 'main' into ptr
2 parents c2ac5aa + 86408b0 commit b67868c

File tree

4 files changed

+54
-26
lines changed

4 files changed

+54
-26
lines changed

ElvUI/Cata/Modules/Skins/NonRaid.lua

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ function S:RaidInfoFrame()
1616
end
1717

1818
for _, texture in next, {
19-
_G.RaidInfoScrollFrameScrollBarBG,
20-
_G.RaidInfoScrollFrameScrollBarTop,
21-
_G.RaidInfoScrollFrameScrollBarBottom,
22-
_G.RaidInfoScrollFrameScrollBarMiddle,
19+
_G.RaidInfoScrollFrameBottom,
20+
_G.RaidInfoScrollFrameTop,
2321
} do
2422
texture:Kill()
2523
end
@@ -37,7 +35,7 @@ function S:RaidInfoFrame()
3735
RaidInfoFrame:SetTemplate('Transparent')
3836

3937
S:HandleCloseButton(_G.RaidInfoCloseButton,RaidInfoFrame)
40-
S:HandleTrimScrollBar(RaidInfoFrame.ScrollBar)
38+
S:HandleScrollBar(_G.RaidInfoScrollFrame.ScrollBar)
4139
S:HandleCheckBox(_G.RaidFrameAllAssistCheckButton)
4240
end
4341

ElvUI/Core/Modules/Chat/Chat.lua

+1
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ do --this can save some main file locals
405405
z['Player-6112-028A3A6D'] = ElvGreen -- [Horde] Hunter
406406
z['Player-6112-02A2F754'] = ElvGreen -- [Horde] Priest
407407
z['Player-6112-02A39E0E'] = ElvGreen -- [Horde] Warlock
408+
z['Player-6112-02BBE8AB'] = ElvGreen -- [Horde] Hunter 2
408409
-- Luckyone Seasonal (5827: Living Flame EU)
409410
z['Player-5827-0273D732'] = ElvGreen -- [Alliance] Hunter
410411
z['Player-5827-0273D63E'] = ElvGreen -- [Alliance] Paladin

ElvUI_Libraries/Core/oUF/elements/castbar.lua

+9-4
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,17 @@ local function SpecialActive(unit, filter)
140140
local index, speed = 1
141141
local name, _, _, _, _, _, _, _, _, spellID = oUF:GetAuraData(unit, index, filter)
142142
while name do
143+
speed = specialAuras[spellID];
144+
143145
if speed == 0.6 then
144146
return speed -- fastest speed
145-
else -- we have to check the entire table otherwise just to see if a faster one is available
146-
speed = specialAuras[spellID]
147147
end
148148

149149
index = index + 1
150150
name, _, _, _, _, _, _, _, _, spellID = oUF:GetAuraData(unit, index, filter)
151151
end
152152

153-
return speed
153+
return speed -- we have to check the entire table otherwise just to see if a faster one is available
154154
end
155155
-- end block
156156

@@ -345,7 +345,12 @@ local function CastStart(self, real, unit, castGUID, spellID, castTime)
345345
-- end block
346346

347347
element:SetMinMaxValues(0, element.max)
348-
element:SetValue(element.duration)
348+
349+
if element.SetValue_ then
350+
element:SetValue_(element.duration)
351+
else
352+
element:SetValue(element.duration)
353+
end
349354

350355
if(element.Icon) then element.Icon:SetTexture(texture or FALLBACK_ICON) end
351356
if(element.Shield) then element.Shield:SetShown(notInterruptible) end

ElvUI_Libraries/Core/oUF_Plugins/oUF_AuraBars.lua

+41-17
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ local oUF = ns.oUF
44
local VISIBLE = 1
55
local HIDDEN = 0
66

7+
local mod = mod
78
local wipe = wipe
89
local pcall = pcall
9-
local floor = floor
1010
local unpack = unpack
1111
local tinsert = tinsert
1212
local infinity = math.huge
@@ -20,18 +20,26 @@ local GameTooltip = GameTooltip
2020
local LibDispel = LibStub('LibDispel-1.0')
2121
local DebuffColors = LibDispel:GetDebuffTypeColor()
2222

23-
local DAY, HOUR, MINUTE = 86400, 3600, 60
24-
local function FormatTime(s)
25-
if s == infinity then return end
23+
local YEAR, DAY, HOUR, MINUTE = 31557600, 86400, 3600, 60
24+
local function FormatTime(sec)
25+
if sec == infinity then
26+
return
27+
end
2628

27-
if s < MINUTE then
28-
return '%.1fs', s
29-
elseif s < HOUR then
30-
return '%dm %ds', s/60%60, s%60
31-
elseif s < DAY then
32-
return '%dh %dm', s/(60*60), s/60%60
29+
if sec < MINUTE then
30+
return '%.1fs', sec
31+
elseif sec < HOUR then
32+
local mins = mod(sec, HOUR) / MINUTE
33+
local secs = mod(sec, MINUTE)
34+
return '%dm %ds', mins, secs
35+
elseif sec < DAY then
36+
local hrs = mod(sec, DAY) / HOUR
37+
local mins = mod(sec, HOUR) / MINUTE
38+
return '%dh %dm', hrs, mins
3339
else
34-
return '%dd %dh', s/DAY, (s / HOUR) - (floor(s/DAY) * 24)
40+
local days = mod(sec, YEAR) / DAY
41+
local hrs = mod(sec, DAY) / HOUR
42+
return '%dd %dh', days, hrs
3543
end
3644
end
3745

@@ -48,13 +56,23 @@ local function onLeave()
4856
GameTooltip:Hide()
4957
end
5058

59+
local function updateValue(bar, start)
60+
local remain = (bar.expiration - GetTime()) / (bar.modRate or 1)
61+
62+
if start and bar.SetValue_ then
63+
bar:SetValue_(remain / bar.duration)
64+
else
65+
bar:SetValue(remain / bar.duration)
66+
end
67+
68+
bar.timeText:SetFormattedText(FormatTime(remain))
69+
end
70+
5171
local function onUpdate(bar, elapsed)
5272
bar.elapsed = (bar.elapsed or 0) + elapsed
5373

5474
if bar.elapsed > 0.01 then
55-
local remain = (bar.expiration - GetTime()) / (bar.modRate or 1)
56-
bar:SetValue(remain / bar.duration)
57-
bar.timeText:SetFormattedText(FormatTime(remain))
75+
updateValue(bar)
5876

5977
bar.elapsed = 0
6078
end
@@ -140,7 +158,7 @@ local function updateBar(element, bar)
140158
end
141159
end
142160

143-
local function updateAura(element, unit, index, offset, filter, isDebuff, visible)
161+
local function auraUpdate(element, unit, index, offset, filter, isDebuff, visible)
144162
local name, texture, count, debuffType, duration, expiration, source, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, modRate, effect1, effect2, effect3 = oUF:GetAuraData(unit, index, filter)
145163

146164
if not name then return end
@@ -178,7 +196,13 @@ local function updateAura(element, unit, index, offset, filter, isDebuff, visibl
178196
canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, modRate, effect1, effect2, effect3)
179197

180198
updateBar(element, bar)
181-
bar:SetScript('OnUpdate', not bar.noTime and onUpdate or nil)
199+
200+
if bar.noTime then
201+
bar:SetScript('OnUpdate', nil)
202+
else
203+
updateValue(bar, true)
204+
bar:SetScript('OnUpdate', onUpdate)
205+
end
182206

183207
return show and VISIBLE or HIDDEN
184208
end
@@ -210,7 +234,7 @@ local function filterBars(element, unit, filter, limit, isDebuff, offset, dontHi
210234
local visible = 0
211235
local hidden = 0
212236
while(visible < limit) do
213-
local result = updateAura(element, unit, index, offset, filter, isDebuff, visible)
237+
local result = auraUpdate(element, unit, index, offset, filter, isDebuff, visible)
214238
if(not result) then
215239
break
216240
elseif(result == VISIBLE) then

0 commit comments

Comments
 (0)