cleanup
This commit is contained in:
+10
-41
@@ -229,21 +229,19 @@ local function UpdateMatchData(time, matchDataChanged, unit, index, filter, name
|
|||||||
if not matchData[unit][filter] then
|
if not matchData[unit][filter] then
|
||||||
matchData[unit][filter] = {}
|
matchData[unit][filter] = {}
|
||||||
end
|
end
|
||||||
local debuffClassIcon = WeakAuras.EJIcons[debuffClass]
|
|
||||||
if not matchData[unit][filter][index] then
|
if not matchData[unit][filter][index] then
|
||||||
matchData[unit][filter][index] = {
|
matchData[unit][filter][index] = {
|
||||||
name = name,
|
name = name,
|
||||||
icon = icon,
|
icon = icon,
|
||||||
stacks = stacks,
|
stacks = stacks,
|
||||||
debuffClass = debuffClass,
|
debuffClass = debuffClass,
|
||||||
debuffClassIcon = debuffClassIcon,
|
|
||||||
duration = duration,
|
duration = duration,
|
||||||
expirationTime = expirationTime,
|
expirationTime = expirationTime,
|
||||||
unitCaster = unitCaster,
|
unitCaster = unitCaster,
|
||||||
casterName = unitCaster and GetUnitName(unitCaster, false) or "",
|
casterName = unitCaster and UnitName(unitCaster) or "",
|
||||||
spellId = spellId,
|
spellId = spellId,
|
||||||
unit = unit,
|
unit = unit,
|
||||||
unitName = GetUnitName(unit, false) or "",
|
unitName = UnitName(unit) or "",
|
||||||
isStealable = isStealable,
|
isStealable = isStealable,
|
||||||
time = time,
|
time = time,
|
||||||
lastChanged = time,
|
lastChanged = time,
|
||||||
@@ -278,11 +276,6 @@ local function UpdateMatchData(time, matchDataChanged, unit, index, filter, name
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if data.debuffClassIcon ~= debuffClassIcon then
|
|
||||||
data.debuffClassIcon = debuffClassIcon
|
|
||||||
changed = true
|
|
||||||
end
|
|
||||||
|
|
||||||
if data.duration ~= duration then
|
if data.duration ~= duration then
|
||||||
data.duration = duration
|
data.duration = duration
|
||||||
changed = true
|
changed = true
|
||||||
@@ -298,7 +291,7 @@ local function UpdateMatchData(time, matchDataChanged, unit, index, filter, name
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local casterName = unitCaster and GetUnitName(unitCaster, false) or ""
|
local casterName = unitCaster and UnitName(unitCaster) or ""
|
||||||
if data.casterName ~= casterName then
|
if data.casterName ~= casterName then
|
||||||
data.casterName = casterName
|
data.casterName = casterName
|
||||||
changed = true
|
changed = true
|
||||||
@@ -314,7 +307,7 @@ local function UpdateMatchData(time, matchDataChanged, unit, index, filter, name
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local unitName = GetUnitName(unit, false) or ""
|
local unitName = UnitName(unit) or ""
|
||||||
if data.unitName ~= unitName then
|
if data.unitName ~= unitName then
|
||||||
data.unitName = unitName
|
data.unitName = unitName
|
||||||
changed = true
|
changed = true
|
||||||
@@ -430,7 +423,6 @@ local function FindBestMatchDataForUnit(time, id, triggernum, triggerInfo, unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateStateWithMatch(time, bestMatch, triggerStates, cloneId, matchCount, unitCount, maxUnitCount, matchCountPerUnit, totalStacks, affected, unaffected)
|
local function UpdateStateWithMatch(time, bestMatch, triggerStates, cloneId, matchCount, unitCount, maxUnitCount, matchCountPerUnit, totalStacks, affected, unaffected)
|
||||||
local debuffClassIcon = WeakAuras.EJIcons[bestMatch.debuffClass]
|
|
||||||
if not triggerStates[cloneId] then
|
if not triggerStates[cloneId] then
|
||||||
triggerStates[cloneId] = {
|
triggerStates[cloneId] = {
|
||||||
show = true,
|
show = true,
|
||||||
@@ -439,7 +431,6 @@ local function UpdateStateWithMatch(time, bestMatch, triggerStates, cloneId, mat
|
|||||||
icon = bestMatch.icon,
|
icon = bestMatch.icon,
|
||||||
stacks = bestMatch.stacks,
|
stacks = bestMatch.stacks,
|
||||||
debuffClass = bestMatch.debuffClass,
|
debuffClass = bestMatch.debuffClass,
|
||||||
debuffClassIcon = debuffClassIcon,
|
|
||||||
progressType = "timed",
|
progressType = "timed",
|
||||||
duration = bestMatch.duration,
|
duration = bestMatch.duration,
|
||||||
expirationTime = bestMatch.expirationTime,
|
expirationTime = bestMatch.expirationTime,
|
||||||
@@ -511,11 +502,6 @@ local function UpdateStateWithMatch(time, bestMatch, triggerStates, cloneId, mat
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if state.debuffClassIcon ~= debuffClassIcon then
|
|
||||||
state.debuffClassIcon = debuffClassIcon
|
|
||||||
changed = true
|
|
||||||
end
|
|
||||||
|
|
||||||
if state.duration ~= bestMatch.duration then
|
if state.duration ~= bestMatch.duration then
|
||||||
state.duration = bestMatch.duration
|
state.duration = bestMatch.duration
|
||||||
changed = true
|
changed = true
|
||||||
@@ -632,7 +618,7 @@ local function UpdateStateWithNoMatch(time, triggerStates, triggerInfo, cloneId,
|
|||||||
affected = affected,
|
affected = affected,
|
||||||
unaffected = unaffected,
|
unaffected = unaffected,
|
||||||
unit = unit,
|
unit = unit,
|
||||||
unitName = unit and GetUnitName(unit, false) or "",
|
unitName = unit and UnitName(unit) or "",
|
||||||
destName = "",
|
destName = "",
|
||||||
name = fallbackName,
|
name = fallbackName,
|
||||||
icon = fallbackIcon,
|
icon = fallbackIcon,
|
||||||
@@ -684,7 +670,7 @@ local function UpdateStateWithNoMatch(time, triggerStates, triggerInfo, cloneId,
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local unitName = unit and GetUnitName(unit, false) or ""
|
local unitName = unit and UnitName(unit) or ""
|
||||||
if state.unitName ~= unitName then
|
if state.unitName ~= unitName then
|
||||||
state.unitName = unitName
|
state.unitName = unitName
|
||||||
changed = true
|
changed = true
|
||||||
@@ -915,9 +901,9 @@ local function FormatAffectedUnaffected(triggerInfo, matchedUnits)
|
|||||||
for unit in GetAllUnits(triggerInfo.unit) do
|
for unit in GetAllUnits(triggerInfo.unit) do
|
||||||
if activeGroupScanFuncs[unit] and activeGroupScanFuncs[unit][triggerInfo] then
|
if activeGroupScanFuncs[unit] and activeGroupScanFuncs[unit][triggerInfo] then
|
||||||
if matchedUnits[unit] then
|
if matchedUnits[unit] then
|
||||||
affected = affected .. (GetUnitName(unit, false) or unit) .. ", "
|
affected = affected .. (UnitName(unit) or unit) .. ", "
|
||||||
else
|
else
|
||||||
unaffected = unaffected .. (GetUnitName(unit, false) or unit) .. ", "
|
unaffected = unaffected .. (UnitName(unit) or unit) .. ", "
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1522,7 +1508,6 @@ local function EventHandler(frame, event, arg1, arg2, ...)
|
|||||||
ScanGroupUnit(time, matchDataChanged, nil, "vehicle")
|
ScanGroupUnit(time, matchDataChanged, nil, "vehicle")
|
||||||
end
|
end
|
||||||
elseif event == "UNIT_AURA" then
|
elseif event == "UNIT_AURA" then
|
||||||
if not arg1 then return end
|
|
||||||
ScanUnit(time, arg1)
|
ScanUnit(time, arg1)
|
||||||
elseif event == "PLAYER_ENTERING_WORLD" then
|
elseif event == "PLAYER_ENTERING_WORLD" then
|
||||||
for unit in pairs(matchData) do
|
for unit in pairs(matchData) do
|
||||||
@@ -2309,7 +2294,6 @@ function BuffTrigger.GetAdditionalProperties(data, triggernum)
|
|||||||
|
|
||||||
local ret = "|cFFFF0000%".. triggernum .. ".spellId|r - " .. L["Spell ID"] .. "\n"
|
local ret = "|cFFFF0000%".. triggernum .. ".spellId|r - " .. L["Spell ID"] .. "\n"
|
||||||
ret = ret .. "|cFFFF0000%".. triggernum .. ".debuffClass|r - " .. L["Debuff Class"] .. "\n"
|
ret = ret .. "|cFFFF0000%".. triggernum .. ".debuffClass|r - " .. L["Debuff Class"] .. "\n"
|
||||||
ret = ret .. "|cFFFF0000%".. triggernum .. ".debuffClassIcon|r - " .. L["Debuff Class Icon"] .. "\n"
|
|
||||||
ret = ret .. "|cFFFF0000%".. triggernum .. ".unitCaster|r - " .. L["Caster Unit"] .. "\n"
|
ret = ret .. "|cFFFF0000%".. triggernum .. ".unitCaster|r - " .. L["Caster Unit"] .. "\n"
|
||||||
ret = ret .. "|cFFFF0000%".. triggernum .. ".casterName|r - " .. L["Caster Name"] .. "\n"
|
ret = ret .. "|cFFFF0000%".. triggernum .. ".casterName|r - " .. L["Caster Name"] .. "\n"
|
||||||
ret = ret .. "|cFFFF0000%".. triggernum .. ".unitName|r - " .. L["Unit Name"] .. "\n"
|
ret = ret .. "|cFFFF0000%".. triggernum .. ".unitName|r - " .. L["Unit Name"] .. "\n"
|
||||||
@@ -2802,12 +2786,6 @@ local function AugmentMatchDataMultiWith(matchData, unit, name, icon, stacks, de
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local debuffClassIcon = WeakAuras.EJIcons[debuffClass]
|
|
||||||
if matchData.debuffClassIcon ~= debuffClassIcon then
|
|
||||||
matchData.debuffClassIcon = debuffClassIcon
|
|
||||||
changed = true
|
|
||||||
end
|
|
||||||
|
|
||||||
if matchData.duration ~= duration then
|
if matchData.duration ~= duration then
|
||||||
matchData.duration = duration
|
matchData.duration = duration
|
||||||
changed = true
|
changed = true
|
||||||
@@ -2823,7 +2801,7 @@ local function AugmentMatchDataMultiWith(matchData, unit, name, icon, stacks, de
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local casterName = GetUnitName(unitCaster, false) or ""
|
local casterName = UnitName(unitCaster) or ""
|
||||||
if matchData.casterName ~= casterName then
|
if matchData.casterName ~= casterName then
|
||||||
matchData.casterName = casterName
|
matchData.casterName = casterName
|
||||||
changed = true
|
changed = true
|
||||||
@@ -2834,7 +2812,7 @@ local function AugmentMatchDataMultiWith(matchData, unit, name, icon, stacks, de
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local unitName = GetUnitName(unit, false) or ""
|
local unitName = UnitName(unit) or ""
|
||||||
if matchData.unitName ~= unitName then
|
if matchData.unitName ~= unitName then
|
||||||
matchData.unitName = unitName
|
matchData.unitName = unitName
|
||||||
changed = true
|
changed = true
|
||||||
@@ -2997,8 +2975,6 @@ function BuffTrigger.InitMultiAura()
|
|||||||
multiAuraFrame:RegisterEvent("UNIT_AURA")
|
multiAuraFrame:RegisterEvent("UNIT_AURA")
|
||||||
multiAuraFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
|
multiAuraFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
|
||||||
multiAuraFrame:RegisterEvent("PLAYER_FOCUS_CHANGED")
|
multiAuraFrame:RegisterEvent("PLAYER_FOCUS_CHANGED")
|
||||||
multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
|
|
||||||
multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
|
|
||||||
multiAuraFrame:RegisterEvent("PLAYER_LEAVING_WORLD")
|
multiAuraFrame:RegisterEvent("PLAYER_LEAVING_WORLD")
|
||||||
multiAuraFrame:SetScript("OnEvent", BuffTrigger.HandleMultiEvent)
|
multiAuraFrame:SetScript("OnEvent", BuffTrigger.HandleMultiEvent)
|
||||||
WeakAuras.frames["Multi-target 2 Aura Trigger Handler"] = multiAuraFrame
|
WeakAuras.frames["Multi-target 2 Aura Trigger Handler"] = multiAuraFrame
|
||||||
@@ -3015,13 +2991,6 @@ function BuffTrigger.HandleMultiEvent(frame, event, ...)
|
|||||||
TrackUid("target")
|
TrackUid("target")
|
||||||
elseif event == "PLAYER_FOCUS_CHANGED" then
|
elseif event == "PLAYER_FOCUS_CHANGED" then
|
||||||
TrackUid("focus")
|
TrackUid("focus")
|
||||||
elseif event == "NAME_PLATE_UNIT_ADDED" then
|
|
||||||
TrackUid(...)
|
|
||||||
elseif event == "NAME_PLATE_UNIT_REMOVED" then
|
|
||||||
local unit = ...
|
|
||||||
ReleaseUID(unit)
|
|
||||||
unit = unit.."target"
|
|
||||||
ReleaseUID(unit)
|
|
||||||
elseif event == "UNIT_AURA" then
|
elseif event == "UNIT_AURA" then
|
||||||
local unit = ...
|
local unit = ...
|
||||||
if not unit then return end
|
if not unit then return end
|
||||||
|
|||||||
@@ -2107,21 +2107,6 @@ WeakAuras.weapon_enchant_types = {
|
|||||||
showAlways = L["Always"],
|
showAlways = L["Always"],
|
||||||
}
|
}
|
||||||
|
|
||||||
WeakAuras.EJIcons = {
|
|
||||||
tank = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:7:25:7:25|t",
|
|
||||||
dps = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:39:57:7:25|t",
|
|
||||||
healer = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:71:89:7:25|t",
|
|
||||||
mythic = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:103:121:7:25|t",
|
|
||||||
deadly = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:135:153:7:25|t",
|
|
||||||
important = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:167:185:7:25|t",
|
|
||||||
interrupt = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:199:217:7:25|t",
|
|
||||||
magic = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:231:249:7:25|t",
|
|
||||||
curse = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:7:25:39:57|t",
|
|
||||||
poison = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:39:57:39:57|t",
|
|
||||||
disease = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:71:89:39:57|t",
|
|
||||||
enrage = "|TInterface\\EncounterJournal\\UI-EJ-Icons:::::256:64:103:121:39:57|t",
|
|
||||||
}
|
|
||||||
|
|
||||||
WeakAuras.reset_swing_spells = {}
|
WeakAuras.reset_swing_spells = {}
|
||||||
WeakAuras.reset_ranged_swing_spells = {
|
WeakAuras.reset_ranged_swing_spells = {
|
||||||
[2480] = true, -- Shoot Bow
|
[2480] = true, -- Shoot Bow
|
||||||
|
|||||||
Reference in New Issue
Block a user