Skip to content

Commit 56a3974

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/8.0'
Conflicts: .pkgmeta
2 parents 9466c19 + 9b8f96a commit 56a3974

31 files changed

+2324
-3168
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ WeakAuras_Main.lua
22
WeakAuras_Options.lua
33
WeakAuras_Templates.lua
44
WeakAuras/Libs/
5-
.commit

.pkgmeta

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,24 @@
11
package-as: WeakAuras
22

33
externals:
4-
WeakAuras/Libs/LibStub:
5-
url: https://repos.wowace.com/wow/libstub/trunk
6-
WeakAuras/Libs/CallbackHandler-1.0:
7-
url: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
8-
WeakAuras/Libs/AceConfig-3.0:
9-
url: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0
10-
WeakAuras/Libs/AceConsole-3.0:
11-
url: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
12-
WeakAuras/Libs/AceGUI-3.0:
13-
url: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
14-
WeakAuras/Libs/AceEvent-3.0:
15-
url: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
16-
WeakAuras/Libs/AceGUI-3.0-SharedMediaWidgets:
17-
url: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk/AceGUI-3.0-SharedMediaWidgets
18-
WeakAuras/Libs/AceTimer-3.0:
19-
url: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
20-
WeakAuras/Libs/AceSerializer-3.0:
21-
url: https://repos.wowace.com/wow/ace3/trunk/AceSerializer-3.0
22-
WeakAuras/Libs/AceComm-3.0:
23-
url: https://repos.wowace.com/wow/ace3/trunk/AceComm-3.0
24-
WeakAuras/Libs/LibSharedMedia-3.0:
25-
url: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk/LibSharedMedia-3.0
26-
WeakAuras/Libs/LibDataBroker-1.1:
27-
url: git://github.com/tekkub/libdatabroker-1-1.git
28-
WeakAuras/Libs/LibCompress:
29-
url: https://repos.wowace.com/wow/libcompress/trunk
30-
WeakAuras/Libs/LibChatAnims:
31-
url: https://repos.wowace.com/wow/libchatanims/trunk/LibChatAnims
32-
WeakAuras/Libs/LibBabble-Race-3.0:
33-
url: https://repos.wowace.com/wow/libbabble-race-3-0/trunk
34-
WeakAuras/Libs/LibButtonGlow-1.0:
35-
url: https://repos.wowace.com/wow/libbuttonglow-1-0
36-
WeakAuras/Libs/LibSpellRange-1.0:
37-
url: git://github.com/ascott18/LibSpellRange-1.0.git
38-
WeakAuras/Libs/HereBeDragons-1.0:
39-
url: https://repos.wowace.com/wow/herebedragons
40-
WeakAuras/Libs/LibRangeCheck-2.0:
41-
url: https://repos.wowace.com/wow/librangecheck-2-0/trunk/LibRangeCheck-2.0
4+
WeakAuras/Libs/LibStub: https://repos.wowace.com/wow/libstub/trunk
5+
WeakAuras/Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
6+
WeakAuras/Libs/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0
7+
WeakAuras/Libs/AceConsole-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
8+
WeakAuras/Libs/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
9+
WeakAuras/Libs/AceEvent-3.0: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
10+
WeakAuras/Libs/AceGUI-3.0-SharedMediaWidgets: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk/AceGUI-3.0-SharedMediaWidgets
11+
WeakAuras/Libs/AceTimer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
12+
WeakAuras/Libs/AceSerializer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceSerializer-3.0
13+
WeakAuras/Libs/AceComm-3.0: https://repos.wowace.com/wow/ace3/trunk/AceComm-3.0
14+
WeakAuras/Libs/LibSharedMedia-3.0: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk/LibSharedMedia-3.0
15+
WeakAuras/Libs/LibDataBroker-1.1: git://github.com/tekkub/libdatabroker-1-1.git
16+
WeakAuras/Libs/LibCompress: https://repos.wowace.com/wow/libcompress/trunk
17+
WeakAuras/Libs/LibBabble-Race-3.0: https://repos.wowace.com/wow/libbabble-race-3-0/trunk
18+
WeakAuras/Libs/LibButtonGlow-1.0: https://repos.wowace.com/wow/libbuttonglow-1-0
19+
WeakAuras/Libs/LibSpellRange-1.0: git://github.com/ascott18/LibSpellRange-1.0.git
20+
WeakAuras/Libs/HereBeDragons: https://repos.wowace.com/wow/herebedragons
21+
WeakAuras/Libs/LibRangeCheck-2.0: https://repos.wowace.com/wow/librangecheck-2-0/trunk/LibRangeCheck-2.0
4222

4323
enable-nolib-creation: no
4424

WeakAuras/Bindings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<Binding name="WEAKAURASTOGGLE" header="WEAKAURAS" Category="ADDONS">
33
WeakAuras.OpenOptions()
44
</Binding>
5-
<Binding name="WEAKAURASSTARTPROFILING" header="WEAKAURAS" Category="ADDONS">
5+
<Binding name="WEAKAURASSTARTPROFILING" Category="ADDONS">
66
WeakAuras.StartProfile()
77
</Binding>
8-
<Binding name="WEAKAURASSTOPPROFILING" header="WEAKAURAS" Category="ADDONS">
8+
<Binding name="WEAKAURASSTOPPROFILING" Category="ADDONS">
99
WeakAuras.StopProfile()
1010
</Binding>
11-
<Binding name="WEAKAURASPRINTPROFILING" header="WEAKAURAS" Category="ADDONS">
11+
<Binding name="WEAKAURASPRINTPROFILING" Category="ADDONS">
1212
WeakAuras.PrintProfile()
1313
</Binding>
1414
</Bindings>

WeakAuras/BuffTrigger.lua

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ GetTriggerConditions(data, triggernum)
6060
Returns the potential conditions for a trigger
6161
]]--
6262

63+
-- luacheck: globals CombatLogGetCurrentEventInfo
6364

6465
-- Lua APIs
6566
local tinsert, wipe = table.insert, wipe
6667
local pairs, next, type = pairs, next, type
68+
local BUFF_MAX_DISPLAY = _G.BUFF_MAX_DISPLAY
69+
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
6770

6871
local WeakAuras = WeakAuras;
6972
local L = WeakAuras.L;
@@ -493,8 +496,10 @@ function WeakAuras.ScanAuras(unit)
493496
-- Update scan cache
494497
if(aura_scan_cache[unit][filter].up_to_date < index) then
495498
-- Query aura data
496-
name, _, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, index, filter);
497-
tooltip, debuffClass, tooltipSize = WeakAuras.GetAuraTooltipInfo(unit, index, filter);
499+
name, icon, count, debuffClass, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, index, filter);
500+
local tooltipSize1, tooltipSize2, tooltipSize3;
501+
tooltip, _, tooltipSize1, tooltipSize2, tooltipSize3 = WeakAuras.GetAuraTooltipInfo(unit, index, filter);
502+
tooltipSize = {tooltipSize1, tooltipSize2, tooltipSize3}
498503
aura_scan_cache[unit][filter][index] = aura_scan_cache[unit][filter][index] or {};
499504

500505
-- Save aura data to cache
@@ -539,7 +544,8 @@ function WeakAuras.ScanAuras(unit)
539544

540545
-- Aura conforms to trigger options?
541546
if(data.subcount) then
542-
count = tooltipSize;
547+
local index = data.subcountCount or 1;
548+
count = tooltipSize[index];
543549
end
544550
if(name and ((not data.count) or data.count(count)) and (data.ownOnly ~= false or not UnitIsUnit("player", unitCaster or "")) and data.scanFunc(name, tooltip, isStealable, spellId, debuffClass)) then
545551
-- Show display and handle clones
@@ -589,8 +595,18 @@ function WeakAuras.ScanAuras(unit)
589595

590596
for index, checkname in pairs(data.names) do
591597
-- Fetch aura data
592-
name, _, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, checkname, nil, filter);
593-
if (name) then
598+
-- TODO 8.0: Check if there is a better way than iterating all auras
599+
local detected
600+
for i = 1, BUFF_MAX_DISPLAY do
601+
name, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, i, filter);
602+
if not name then break end
603+
if name == checkname then
604+
detected = true
605+
break
606+
end
607+
end
608+
609+
if (detected) then
594610
WeakAuras.SetDynamicIconCache(name, spellId, icon);
595611
end
596612
checkPassed = false;
@@ -965,8 +981,20 @@ do
965981
local updateTriggerState = false;
966982
for triggernum, data in pairs(triggers) do
967983
local filter = data.debuffType..(data.ownOnly and "|PLAYER" or "");
968-
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId = UnitAura(unit, spellName, nil, filter);
969-
if(name and (data.spellId == nil or data.spellId == spellId)) then
984+
985+
-- TODO 8.0: Check if there is a better way than iterating all auras
986+
local detected
987+
local name, icon, count, duration, expirationTime, unitCaster, spellId, _
988+
for i = 1, BUFF_MAX_DISPLAY do
989+
name, icon, count, _, duration, expirationTime, unitCaster, _, _, spellId = UnitAura(unit, i, filter);
990+
if not name then break end
991+
if name == spellName then
992+
detected = true
993+
break
994+
end
995+
end
996+
997+
if(detected and (data.spellId == nil or data.spellId == spellId)) then
970998
data.GUIDs = data.GUIDs or {};
971999
data.GUIDs[destGUID] = data.GUIDs[destGUID] or {};
9721000
data.GUIDs[destGUID].name = spellName;
@@ -1108,7 +1136,7 @@ do
11081136
local function handleEvent(frame, event, ...)
11091137
WeakAuras.StartProfileSystem("bufftrigger - multi");
11101138
if(event == "COMBAT_LOG_EVENT_UNFILTERED") then
1111-
combatLog(...);
1139+
combatLog(CombatLogGetCurrentEventInfo());
11121140
elseif(event == "UNIT_TARGET") then
11131141
uidTrack(...);
11141142
elseif(event == "PLAYER_FOCUS_CHANGED") then
@@ -1133,8 +1161,20 @@ do
11331161
local updateTriggerState = false;
11341162
for triggernum, data in pairs(triggers) do
11351163
local filter = data.debuffType..(data.ownOnly and "|PLAYER" or "");
1136-
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId = UnitAura(uid, spellName, nil, filter);
1137-
if(name) then
1164+
1165+
-- TODO 8.0: Check if there is a better way than iterating all auras
1166+
local detected
1167+
local name, icon, count, duration, expirationTime, unitCaster, _
1168+
for i = 1, BUFF_MAX_DISPLAY do
1169+
name, icon, count, _, duration, expirationTime, unitCaster = UnitAura(uid, i, filter);
1170+
if not name then break end
1171+
if name == spellName then
1172+
detected = true
1173+
break
1174+
end
1175+
end
1176+
1177+
if(detected) then
11381178
data.GUIDs = data.GUIDs or {};
11391179
data.GUIDs[guid] = data.GUIDs[guid] or {};
11401180
data.GUIDs[guid].name = spellName;
@@ -1468,6 +1508,7 @@ function BuffTrigger.Add(data)
14681508
autoclone = trigger.autoclone,
14691509
groupclone = trigger.groupclone,
14701510
subcount = trigger.subcount,
1511+
subcountCount = trigger.subcountCount,
14711512
scanFunc = scanFunc,
14721513
debuffType = trigger.debuffType,
14731514
names = trigger.names,

0 commit comments

Comments
 (0)