Ignore World Auras like those weekly that cannot be cancelled
This commit is contained in:
@@ -187,6 +187,8 @@
|
|||||||
[1473] = {},
|
[1473] = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Details222.IgnoredWorldAuras = {}
|
||||||
|
|
||||||
Details222.Parser = {}
|
Details222.Parser = {}
|
||||||
|
|
||||||
Details222.Actors = {}
|
Details222.Actors = {}
|
||||||
|
|||||||
@@ -1361,15 +1361,13 @@ function atributo_misc:ToolTipDispell(instancia, numero, barra)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local UnitReaction = UnitReaction
|
local UnitReaction = UnitReaction
|
||||||
local UnitDebuff = UnitDebuff
|
|
||||||
|
|
||||||
function Details:CloseEnemyDebuffsUptime()
|
function Details:CloseEnemyDebuffsUptime()
|
||||||
local combat = Details.tabela_vigente
|
local combat = Details:GetCurrentCombat()
|
||||||
local misc_container = combat [4]._ActorTable
|
local utilityContainer = combat:GetContainer(DETAILS_ATTRIBUTE_MISC)
|
||||||
|
for _, actor in utilityContainer:ListActors() do
|
||||||
for _, actor in ipairs(misc_container) do
|
|
||||||
if (actor.boss_debuff) then
|
if (actor.boss_debuff) then
|
||||||
for target_name, target in ipairs(actor.debuff_uptime_targets) do
|
for targetName, target in ipairs(actor.debuff_uptime_targets) do
|
||||||
if (target.actived and target.actived_at) then
|
if (target.actived and target.actived_at) then
|
||||||
target.uptime = target.uptime + Details._tempo - target.actived_at
|
target.uptime = target.uptime + Details._tempo - target.actived_at
|
||||||
actor.debuff_uptime = actor.debuff_uptime + Details._tempo - target.actived_at
|
actor.debuff_uptime = actor.debuff_uptime + Details._tempo - target.actived_at
|
||||||
@@ -1379,11 +1377,9 @@ function Details:CloseEnemyDebuffsUptime()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Details:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
|
function Details:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN" ~scan
|
||||||
if (sOperationType == "DEBUFF_UPTIME_OUT") then
|
if (sOperationType == "DEBUFF_UPTIME_OUT") then
|
||||||
local combatObject = Details:GetCurrentCombat()
|
local combatObject = Details:GetCurrentCombat()
|
||||||
local utilityContainer = combatObject:GetContainer(DETAILS_ATTRIBUTE_MISC)
|
local utilityContainer = combatObject:GetContainer(DETAILS_ATTRIBUTE_MISC)
|
||||||
@@ -1517,7 +1513,7 @@ local runeIds = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
--called from control on leave / enter combat
|
--called from control on leave / enter combat
|
||||||
function Details:CatchRaidBuffUptime(sOperationType)
|
function Details:CatchRaidBuffUptime(sOperationType) -- ~scan
|
||||||
if (IsInRaid()) then
|
if (IsInRaid()) then
|
||||||
local potUsage = {}
|
local potUsage = {}
|
||||||
local focusAugmentation = {}
|
local focusAugmentation = {}
|
||||||
@@ -1602,7 +1598,7 @@ function Details:CatchRaidBuffUptime(sOperationType)
|
|||||||
|
|
||||||
elseif (bUnitIsTheCaster) then
|
elseif (bUnitIsTheCaster) then
|
||||||
local playerGUID = UnitGUID(unitId)
|
local playerGUID = UnitGUID(unitId)
|
||||||
if (playerGUID) then
|
if (playerGUID and auraInfo.duration ~= 3600) then
|
||||||
local playerName = Details:GetFullName(unitId)
|
local playerName = Details:GetFullName(unitId)
|
||||||
if (sOperationType == "BUFF_UPTIME_IN") then
|
if (sOperationType == "BUFF_UPTIME_IN") then
|
||||||
if (Details.PotionList[spellId]) then
|
if (Details.PotionList[spellId]) then
|
||||||
@@ -1634,6 +1630,7 @@ function Details:CatchRaidBuffUptime(sOperationType)
|
|||||||
if (UnitIsUnit(unitCaster, unitId) or bBuffIsPlacedOnTarget) then
|
if (UnitIsUnit(unitCaster, unitId) or bBuffIsPlacedOnTarget) then
|
||||||
if (bBuffIsPlacedOnTarget and not UnitIsUnit(unitCaster, unitId)) then
|
if (bBuffIsPlacedOnTarget and not UnitIsUnit(unitCaster, unitId)) then
|
||||||
--could be prescince, ebom might or power infusion; casted on a target instead of the caster
|
--could be prescince, ebom might or power infusion; casted on a target instead of the caster
|
||||||
|
--possible bug: the sOperationType could be BUFF_UP_TIME_OUT and it is calling aura applied, which shoud call aura_removed
|
||||||
local sourceSerial = UnitGUID(unitCaster)
|
local sourceSerial = UnitGUID(unitCaster)
|
||||||
local sourceName = Details:GetFullName(unitCaster)
|
local sourceName = Details:GetFullName(unitCaster)
|
||||||
local sourceFlags = 0x514
|
local sourceFlags = 0x514
|
||||||
@@ -1646,7 +1643,7 @@ function Details:CatchRaidBuffUptime(sOperationType)
|
|||||||
else
|
else
|
||||||
local playerName = Details:GetFullName(unitId)
|
local playerName = Details:GetFullName(unitId)
|
||||||
local playerGUID = UnitGUID(unitId)
|
local playerGUID = UnitGUID(unitId)
|
||||||
if (playerGUID) then
|
if (playerGUID and auraInfo.duration ~= 3600) then
|
||||||
if (sOperationType == "BUFF_UPTIME_IN") then
|
if (sOperationType == "BUFF_UPTIME_IN") then
|
||||||
if (Details.PotionList[spellId]) then
|
if (Details.PotionList[spellId]) then
|
||||||
potUsage [playerName] = spellId
|
potUsage [playerName] = spellId
|
||||||
|
|||||||
@@ -16,6 +16,24 @@ AuraScan.UnitAurasStorage = {}
|
|||||||
AuraScan.AurasToTimeline = {} --which spells should be added to the timeline
|
AuraScan.AurasToTimeline = {} --which spells should be added to the timeline
|
||||||
AuraScan.AuraTimelineStorage = {} --store the timeline here
|
AuraScan.AuraTimelineStorage = {} --store the timeline here
|
||||||
|
|
||||||
|
function AuraScan.FindAndIgnoreWorldAuras()
|
||||||
|
for buffIndex = 1, 41 do
|
||||||
|
---@type aurainfo
|
||||||
|
local auraName, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura("player", buffIndex, "HELPFUL")
|
||||||
|
if (auraName) then
|
||||||
|
if (auraName and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, "player")) then
|
||||||
|
if (duration == 0 and expirationTime) then --this aura is a world buff, probably a weekly buff
|
||||||
|
Details222.IgnoredWorldAuras[spellId] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function AuraScan.RegisterCallback(callback)
|
function AuraScan.RegisterCallback(callback)
|
||||||
AuraScan.Callbacks[callback] = true
|
AuraScan.Callbacks[callback] = true
|
||||||
end
|
end
|
||||||
|
|||||||
+26
-1
@@ -181,6 +181,9 @@
|
|||||||
[10060] = true, --power infusion
|
[10060] = true, --power infusion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
---@type table<spellid, boolean>
|
||||||
|
local ignoredWorldAuras = Details222.IgnoredWorldAuras
|
||||||
|
|
||||||
Details.CreditBuffToTarget = buffs_on_target
|
Details.CreditBuffToTarget = buffs_on_target
|
||||||
|
|
||||||
local empower_cache = {}
|
local empower_cache = {}
|
||||||
@@ -2328,6 +2331,10 @@
|
|||||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function parser:buff(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, auraType, amount, arg1, arg2, arg3)
|
function parser:buff(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, auraType, amount, arg1, arg2, arg3)
|
||||||
|
if (ignoredWorldAuras[spellId]) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
--not yet well know about unnamed buff casters
|
--not yet well know about unnamed buff casters
|
||||||
if (not targetName) then
|
if (not targetName) then
|
||||||
targetName = "[*] Unknown shield target"
|
targetName = "[*] Unknown shield target"
|
||||||
@@ -2516,6 +2523,10 @@
|
|||||||
|
|
||||||
--~refresh
|
--~refresh
|
||||||
function parser:buff_refresh(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, tipo, amount)
|
function parser:buff_refresh(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, tipo, amount)
|
||||||
|
if (ignoredWorldAuras[spellId]) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if (not sourceName) then
|
if (not sourceName) then
|
||||||
sourceName = names_cache[spellName]
|
sourceName = names_cache[spellName]
|
||||||
if (not sourceName) then
|
if (not sourceName) then
|
||||||
@@ -2594,6 +2605,10 @@
|
|||||||
|
|
||||||
-- ~unbuff
|
-- ~unbuff
|
||||||
function parser:unbuff(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, tipo, amount)
|
function parser:unbuff(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, tipo, amount)
|
||||||
|
if (ignoredWorldAuras[spellId]) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if (not sourceName) then
|
if (not sourceName) then
|
||||||
sourceName = names_cache[spellName]
|
sourceName = names_cache[spellName]
|
||||||
if (not sourceName) then
|
if (not sourceName) then
|
||||||
@@ -2802,7 +2817,9 @@
|
|||||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function parser:add_bad_debuff_uptime(token, time, sourceGuid, sourceName, sourceFlags, targetGuid, targetName, targetFlags, targetsFlags2, spellId, spellName, spellSchool, sInOrOut, stackSize)
|
function parser:add_bad_debuff_uptime(token, time, sourceGuid, sourceName, sourceFlags, targetGuid, targetName, targetFlags, targetsFlags2, spellId, spellName, spellSchool, sInOrOut, stackSize)
|
||||||
if (not targetName) then
|
if (ignoredWorldAuras[spellId]) then
|
||||||
|
return
|
||||||
|
elseif (not targetName) then
|
||||||
--no target name, just quit
|
--no target name, just quit
|
||||||
return
|
return
|
||||||
elseif (not sourceName) then
|
elseif (not sourceName) then
|
||||||
@@ -2981,6 +2998,10 @@
|
|||||||
---@param sAuraInOrOut string
|
---@param sAuraInOrOut string
|
||||||
---@param bAddToTarget boolean|nil not in use on debuffs at the moment
|
---@param bAddToTarget boolean|nil not in use on debuffs at the moment
|
||||||
function parser:add_debuff_uptime(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, sAuraInOrOut, bAddToTarget)
|
function parser:add_debuff_uptime(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, sAuraInOrOut, bAddToTarget)
|
||||||
|
if (ignoredWorldAuras[spellId]) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
_current_misc_container.need_refresh = true
|
_current_misc_container.need_refresh = true
|
||||||
|
|
||||||
local sourceActor = misc_cache[sourceName]
|
local sourceActor = misc_cache[sourceName]
|
||||||
@@ -3023,6 +3044,10 @@
|
|||||||
---@param bAddToTarget boolean? --special auras which has to be added to the caster and target
|
---@param bAddToTarget boolean? --special auras which has to be added to the caster and target
|
||||||
---@param bOverrideTime boolean?
|
---@param bOverrideTime boolean?
|
||||||
function parser:add_buff_uptime(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, sAuraInOrOut, bAddToTarget, bOverrideTime)
|
function parser:add_buff_uptime(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, sAuraInOrOut, bAddToTarget, bOverrideTime)
|
||||||
|
if (ignoredWorldAuras[spellId]) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
_current_misc_container.need_refresh = true
|
_current_misc_container.need_refresh = true
|
||||||
|
|
||||||
local sourceActor = misc_cache[sourceName]
|
local sourceActor = misc_cache[sourceName]
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ function Details222.StartUp.StartMeUp()
|
|||||||
|
|
||||||
Details222.CreateAllDisplaysFrame()
|
Details222.CreateAllDisplaysFrame()
|
||||||
|
|
||||||
|
Details222.AuraScan.FindAndIgnoreWorldAuras()
|
||||||
|
|
||||||
if (Details.ocd_tracker.show_options) then
|
if (Details.ocd_tracker.show_options) then
|
||||||
Details:InitializeCDTrackerWindow()
|
Details:InitializeCDTrackerWindow()
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user