Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/8.0'
Browse files Browse the repository at this point in the history
Conflicts:
	.pkgmeta
  • Loading branch information
Stanzilla committed Jul 17, 2018
2 parents 9466c19 + 9b8f96a commit 56a3974
Show file tree
Hide file tree
Showing 31 changed files with 2,324 additions and 3,168 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ WeakAuras_Main.lua
WeakAuras_Options.lua
WeakAuras_Templates.lua
WeakAuras/Libs/
.commit
56 changes: 18 additions & 38 deletions .pkgmeta
Original file line number Diff line number Diff line change
@@ -1,44 +1,24 @@
package-as: WeakAuras

externals:
WeakAuras/Libs/LibStub:
url: https://repos.wowace.com/wow/libstub/trunk
WeakAuras/Libs/CallbackHandler-1.0:
url: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
WeakAuras/Libs/AceConfig-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0
WeakAuras/Libs/AceConsole-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
WeakAuras/Libs/AceGUI-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
WeakAuras/Libs/AceEvent-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
WeakAuras/Libs/AceGUI-3.0-SharedMediaWidgets:
url: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk/AceGUI-3.0-SharedMediaWidgets
WeakAuras/Libs/AceTimer-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
WeakAuras/Libs/AceSerializer-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceSerializer-3.0
WeakAuras/Libs/AceComm-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceComm-3.0
WeakAuras/Libs/LibSharedMedia-3.0:
url: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk/LibSharedMedia-3.0
WeakAuras/Libs/LibDataBroker-1.1:
url: git://github.com/tekkub/libdatabroker-1-1.git
WeakAuras/Libs/LibCompress:
url: https://repos.wowace.com/wow/libcompress/trunk
WeakAuras/Libs/LibChatAnims:
url: https://repos.wowace.com/wow/libchatanims/trunk/LibChatAnims
WeakAuras/Libs/LibBabble-Race-3.0:
url: https://repos.wowace.com/wow/libbabble-race-3-0/trunk
WeakAuras/Libs/LibButtonGlow-1.0:
url: https://repos.wowace.com/wow/libbuttonglow-1-0
WeakAuras/Libs/LibSpellRange-1.0:
url: git://github.com/ascott18/LibSpellRange-1.0.git
WeakAuras/Libs/HereBeDragons-1.0:
url: https://repos.wowace.com/wow/herebedragons
WeakAuras/Libs/LibRangeCheck-2.0:
url: https://repos.wowace.com/wow/librangecheck-2-0/trunk/LibRangeCheck-2.0
WeakAuras/Libs/LibStub: https://repos.wowace.com/wow/libstub/trunk
WeakAuras/Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
WeakAuras/Libs/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0
WeakAuras/Libs/AceConsole-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
WeakAuras/Libs/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
WeakAuras/Libs/AceEvent-3.0: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
WeakAuras/Libs/AceGUI-3.0-SharedMediaWidgets: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk/AceGUI-3.0-SharedMediaWidgets
WeakAuras/Libs/AceTimer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
WeakAuras/Libs/AceSerializer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceSerializer-3.0
WeakAuras/Libs/AceComm-3.0: https://repos.wowace.com/wow/ace3/trunk/AceComm-3.0
WeakAuras/Libs/LibSharedMedia-3.0: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk/LibSharedMedia-3.0
WeakAuras/Libs/LibDataBroker-1.1: git://github.com/tekkub/libdatabroker-1-1.git
WeakAuras/Libs/LibCompress: https://repos.wowace.com/wow/libcompress/trunk
WeakAuras/Libs/LibBabble-Race-3.0: https://repos.wowace.com/wow/libbabble-race-3-0/trunk
WeakAuras/Libs/LibButtonGlow-1.0: https://repos.wowace.com/wow/libbuttonglow-1-0
WeakAuras/Libs/LibSpellRange-1.0: git://github.com/ascott18/LibSpellRange-1.0.git
WeakAuras/Libs/HereBeDragons: https://repos.wowace.com/wow/herebedragons
WeakAuras/Libs/LibRangeCheck-2.0: https://repos.wowace.com/wow/librangecheck-2-0/trunk/LibRangeCheck-2.0

enable-nolib-creation: no

Expand Down
6 changes: 3 additions & 3 deletions WeakAuras/Bindings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<Binding name="WEAKAURASTOGGLE" header="WEAKAURAS" Category="ADDONS">
WeakAuras.OpenOptions()
</Binding>
<Binding name="WEAKAURASSTARTPROFILING" header="WEAKAURAS" Category="ADDONS">
<Binding name="WEAKAURASSTARTPROFILING" Category="ADDONS">
WeakAuras.StartProfile()
</Binding>
<Binding name="WEAKAURASSTOPPROFILING" header="WEAKAURAS" Category="ADDONS">
<Binding name="WEAKAURASSTOPPROFILING" Category="ADDONS">
WeakAuras.StopProfile()
</Binding>
<Binding name="WEAKAURASPRINTPROFILING" header="WEAKAURAS" Category="ADDONS">
<Binding name="WEAKAURASPRINTPROFILING" Category="ADDONS">
WeakAuras.PrintProfile()
</Binding>
</Bindings>
61 changes: 51 additions & 10 deletions WeakAuras/BuffTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ GetTriggerConditions(data, triggernum)
Returns the potential conditions for a trigger
]]--

-- luacheck: globals CombatLogGetCurrentEventInfo

-- Lua APIs
local tinsert, wipe = table.insert, wipe
local pairs, next, type = pairs, next, type
local BUFF_MAX_DISPLAY = _G.BUFF_MAX_DISPLAY
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo

local WeakAuras = WeakAuras;
local L = WeakAuras.L;
Expand Down Expand Up @@ -493,8 +496,10 @@ function WeakAuras.ScanAuras(unit)
-- Update scan cache
if(aura_scan_cache[unit][filter].up_to_date < index) then
-- Query aura data
name, _, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, index, filter);
tooltip, debuffClass, tooltipSize = WeakAuras.GetAuraTooltipInfo(unit, index, filter);
name, icon, count, debuffClass, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, index, filter);
local tooltipSize1, tooltipSize2, tooltipSize3;
tooltip, _, tooltipSize1, tooltipSize2, tooltipSize3 = WeakAuras.GetAuraTooltipInfo(unit, index, filter);
tooltipSize = {tooltipSize1, tooltipSize2, tooltipSize3}
aura_scan_cache[unit][filter][index] = aura_scan_cache[unit][filter][index] or {};

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

-- Aura conforms to trigger options?
if(data.subcount) then
count = tooltipSize;
local index = data.subcountCount or 1;
count = tooltipSize[index];
end
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
-- Show display and handle clones
Expand Down Expand Up @@ -589,8 +595,18 @@ function WeakAuras.ScanAuras(unit)

for index, checkname in pairs(data.names) do
-- Fetch aura data
name, _, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, checkname, nil, filter);
if (name) then
-- TODO 8.0: Check if there is a better way than iterating all auras
local detected
for i = 1, BUFF_MAX_DISPLAY do
name, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, i, filter);
if not name then break end
if name == checkname then
detected = true
break
end
end

if (detected) then
WeakAuras.SetDynamicIconCache(name, spellId, icon);
end
checkPassed = false;
Expand Down Expand Up @@ -965,8 +981,20 @@ do
local updateTriggerState = false;
for triggernum, data in pairs(triggers) do
local filter = data.debuffType..(data.ownOnly and "|PLAYER" or "");
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId = UnitAura(unit, spellName, nil, filter);
if(name and (data.spellId == nil or data.spellId == spellId)) then

-- TODO 8.0: Check if there is a better way than iterating all auras
local detected
local name, icon, count, duration, expirationTime, unitCaster, spellId, _
for i = 1, BUFF_MAX_DISPLAY do
name, icon, count, _, duration, expirationTime, unitCaster, _, _, spellId = UnitAura(unit, i, filter);
if not name then break end
if name == spellName then
detected = true
break
end
end

if(detected and (data.spellId == nil or data.spellId == spellId)) then
data.GUIDs = data.GUIDs or {};
data.GUIDs[destGUID] = data.GUIDs[destGUID] or {};
data.GUIDs[destGUID].name = spellName;
Expand Down Expand Up @@ -1108,7 +1136,7 @@ do
local function handleEvent(frame, event, ...)
WeakAuras.StartProfileSystem("bufftrigger - multi");
if(event == "COMBAT_LOG_EVENT_UNFILTERED") then
combatLog(...);
combatLog(CombatLogGetCurrentEventInfo());
elseif(event == "UNIT_TARGET") then
uidTrack(...);
elseif(event == "PLAYER_FOCUS_CHANGED") then
Expand All @@ -1133,8 +1161,20 @@ do
local updateTriggerState = false;
for triggernum, data in pairs(triggers) do
local filter = data.debuffType..(data.ownOnly and "|PLAYER" or "");
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, nameplateShowPersonal, spellId = UnitAura(uid, spellName, nil, filter);
if(name) then

-- TODO 8.0: Check if there is a better way than iterating all auras
local detected
local name, icon, count, duration, expirationTime, unitCaster, _
for i = 1, BUFF_MAX_DISPLAY do
name, icon, count, _, duration, expirationTime, unitCaster = UnitAura(uid, i, filter);
if not name then break end
if name == spellName then
detected = true
break
end
end

if(detected) then
data.GUIDs = data.GUIDs or {};
data.GUIDs[guid] = data.GUIDs[guid] or {};
data.GUIDs[guid].name = spellName;
Expand Down Expand Up @@ -1468,6 +1508,7 @@ function BuffTrigger.Add(data)
autoclone = trigger.autoclone,
groupclone = trigger.groupclone,
subcount = trigger.subcount,
subcountCount = trigger.subcountCount,
scanFunc = scanFunc,
debuffType = trigger.debuffType,
names = trigger.names,
Expand Down
Loading

0 comments on commit 56a3974

Please sign in to comment.