cleanup
This commit is contained in:
@@ -466,7 +466,7 @@ function WeakAuras.ScanAuras(unit)
|
||||
-- Iterate over all displays (list of display lists)
|
||||
for _, aura_list in pairs(aura_lists) do
|
||||
-- Locals
|
||||
local name, rank, icon, count, duration, expirationTime, unitCaster, isStealable, spellId = true;
|
||||
local name, icon, count, duration, expirationTime, unitCaster, isStealable, spellId = true;
|
||||
local tooltip, debuffClass, tooltipSize;
|
||||
local remaining, checkPassed;
|
||||
|
||||
@@ -501,7 +501,7 @@ function WeakAuras.ScanAuras(unit)
|
||||
-- Update scan cache
|
||||
if(aura_scan_cache[unit][filter].up_to_date < index) then
|
||||
-- Query aura data
|
||||
name, rank, icon, count, debuffClass, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, index, filter);
|
||||
name, _, icon, count, debuffClass, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, index, filter);
|
||||
if (debuffClass == nil) then
|
||||
debuffClass = "none";
|
||||
elseif (debuffClass == "") then
|
||||
@@ -624,7 +624,7 @@ function WeakAuras.ScanAuras(unit)
|
||||
-- Fetch aura data
|
||||
local detected
|
||||
for i = 1, BUFF_MAX_DISPLAY do
|
||||
name, rank, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, i, filter);
|
||||
name, _, icon, count, _, duration, expirationTime, unitCaster, isStealable, _, spellId = UnitAura(unit, i, filter);
|
||||
if not name then break end
|
||||
if name == checkname then
|
||||
detected = true
|
||||
@@ -1040,9 +1040,9 @@ do
|
||||
for triggernum, data in pairs(triggers) do
|
||||
local filter = data.debuffType..(data.ownOnly and "|PLAYER" or "");
|
||||
local detected
|
||||
local name, rank, icon, count, duration, expirationTime, unitCaster, spellId, _
|
||||
local name, icon, count, duration, expirationTime, unitCaster, spellId, _
|
||||
for i = 1, BUFF_MAX_DISPLAY do
|
||||
name, rank, icon, count, _, duration, expirationTime, unitCaster, _, _, spellId = UnitAura(unit, i, filter);
|
||||
name, _, icon, count, _, duration, expirationTime, unitCaster, _, _, spellId = UnitAura(unit, i, filter);
|
||||
if not name then break end
|
||||
if name == spellName then
|
||||
detected = true
|
||||
@@ -1220,9 +1220,9 @@ do
|
||||
local filter = data.debuffType..(data.ownOnly and "|PLAYER" or "");
|
||||
|
||||
local detected
|
||||
local name, rank, icon, count, duration, expirationTime, unitCaster, _
|
||||
local name, icon, count, duration, expirationTime, unitCaster, _
|
||||
for i = 1, BUFF_MAX_DISPLAY do
|
||||
name, rank, icon, count, _, duration, expirationTime, unitCaster = UnitAura(uid, i, filter);
|
||||
name, _, icon, count, _, duration, expirationTime, unitCaster = UnitAura(uid, i, filter);
|
||||
if not name then break end
|
||||
if name == spellName then
|
||||
detected = true
|
||||
|
||||
@@ -62,9 +62,6 @@ local tinsert, tconcat, wipe = table.insert, table.concat, wipe
|
||||
local tostring, pairs, type = tostring, pairs, type
|
||||
local error, setmetatable = error, setmetatable
|
||||
|
||||
-- WoW APIs
|
||||
local IsPlayerMoving = IsPlayerMoving
|
||||
|
||||
WeakAurasAceEvents = setmetatable({}, {__tostring=function() return "WeakAuras" end});
|
||||
LibStub("AceEvent-3.0"):Embed(WeakAurasAceEvents);
|
||||
local aceEvents = WeakAurasAceEvents
|
||||
@@ -3121,7 +3118,6 @@ end
|
||||
-- Mounted Frame
|
||||
do
|
||||
local mountedFrame
|
||||
WeakAuras.frames["Mount Use Handler"] = mountedFrame;
|
||||
local elapsed = 0;
|
||||
local delay = 0.5;
|
||||
local isMounted = IsMounted();
|
||||
@@ -3143,6 +3139,7 @@ do
|
||||
function WeakAuras.WatchForMounts()
|
||||
if not(mountedFrame) then
|
||||
mountedFrame = CreateFrame("frame");
|
||||
WeakAuras.frames["Mount Use Handler"] = mountedFrame;
|
||||
mountedFrame:RegisterEvent("COMPANION_UPDATE");
|
||||
mountedFrame:SetScript("OnEvent", function()
|
||||
elapsed = 0;
|
||||
|
||||
@@ -3449,7 +3449,6 @@ WeakAuras.event_prototypes = {
|
||||
local activeName;
|
||||
]]
|
||||
for index in pairs(trigger.talent.multi) do
|
||||
local tier, column
|
||||
local tier = index and ceil(index / MAX_NUM_TALENTS)
|
||||
local column = index and ((index - 1) % MAX_NUM_TALENTS + 1)
|
||||
local ret2 = [[
|
||||
|
||||
@@ -173,7 +173,7 @@ local function filterFunc(_, event, msg, player, l, cs, t, flag, channelId, ...)
|
||||
local toon = BNGetNumFriendToons(i)
|
||||
for j=1, toon do
|
||||
local _, rName, rGame = BNGetFriendToonInfo(i, j)
|
||||
if rName == trimmedPlayer and rGame == "WoW" then
|
||||
if rName == player and rGame == "WoW" then
|
||||
return false, newMsg, player, l, cs, t, flag, channelId, ...; -- Player is a real id friend, allow it
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,7 +7,6 @@ local LSM = LibStub("LibSharedMedia-3.0");
|
||||
|
||||
local wipe, tinsert = wipe, tinsert
|
||||
local GetNumShapeshiftForms, GetShapeshiftFormInfo = GetNumShapeshiftForms, GetShapeshiftFormInfo
|
||||
local WrapTextInColorCode, GetClassColor = WrapTextInColorCode, GetClassColor -- for Classic
|
||||
|
||||
WeakAuras.glow_action_types = {
|
||||
show = L["Show"],
|
||||
|
||||
@@ -1869,7 +1869,7 @@ local function GetInstanceTypeAndSize()
|
||||
size = "fortyman"
|
||||
end
|
||||
end
|
||||
if isDynamic then
|
||||
if isDynamicInstance then
|
||||
if playerDifficulty == 0 then
|
||||
difficulty = "normal"
|
||||
elseif playerDifficulty == 1 then
|
||||
|
||||
Reference in New Issue
Block a user