Add important aura tracking

main
Ryan Crockett 2 years ago
parent d65b0c1c26
commit 289648b17d
  1. 17
      src/AuraTable/AuraTable.lua
  2. 18
      src/ContentUtils/ContentUtils.lua
  3. 0
      src/ContentUtils/lists/dispel-list.lua
  4. 2
      src/ContentUtils/lists/group-wide-list.lua
  5. 193
      src/ContentUtils/lists/important-aura-list.lua

@ -422,4 +422,21 @@ function AuraTable:HasAnyDispelableAura(spell)
return false
end
-- Loop over a units auras
---@param cb fun(spellId: number): boolean | nil
---@return boolean
function AuraTable:ForEach(cb)
for _, auras in pairs(self:GetUnitAuras()) do
for _, aura in pairs(auras) do
if aura:IsUp() then -- Handle expired and non refreshed dropoffs not coming in UNIT_AURA
cb(aura.spellId)
else
self:RemoveInstanceID(aura:GetAuraInstanceID())
end
end
end
return false
end
return AuraTable

@ -11,6 +11,8 @@ local ContentUtils = {
interruptList = {},
---@type TankBusterList
tankBusterList = {},
---@type ImportantAuraList
importantAuras = {},
---@type BigWigsBars
bars = {},
isBigWigsEnabled = false
@ -71,6 +73,9 @@ end
local _interruptList = Tinkr:require("scripts/bastion/ContentUtils/lists/interrupt-list", Bastion)
---@type TankBusterList
local _tankBusterList = Tinkr:require("scripts/bastion/ContentUtils/lists/tank-buster-list", Bastion)
---@type ImportantAuraList
local _importantAuraList = Tinkr:require("scripts/bastion/ContentUtils/lists/important-aura-list", Bastion)
---@return ContentUtils
function ContentUtils:New()
@ -78,7 +83,7 @@ function ContentUtils:New()
self.interruptList = _interruptList
self.tankBusterList = _tankBusterList
self.importantAuras = _importantAuraList
if BigWigsLoader then
print("BigWigs Enabled!")
self.isBigWigsEnabled = true
@ -182,4 +187,15 @@ function ContentUtils:CastingTankBuster(unit, timeUntilCast)
return nil
end
---@param friend Unit
---@return ImportantAura | nil
function ContentUtils:HasImportantAura(friend)
local traits = nil
friend:GetAuras():ForEach(function(spellId)
local auraTraits = self.importantAuras[spellId]
if auraTraits then traits = auraTraits end
end)
return traits
end
return ContentUtils

@ -1,2 +0,0 @@
---@alias GroupWide { shouldDampen: boolean, shouldDiffuse: boolean, shouldFort: boolean, shouldBubble: boolean, shouldKarma: boolean }
---@alias GroupWideList table<number, table<number, GroupWide>>

@ -0,0 +1,193 @@
---@alias ImportantAura { isMagicDispel: boolean | nil, isPoisonDispel: boolean | nil, isDiseaseDispel: boolean | nil, isDiffusable: boolean | nil }
---@alias ImportantAuraList table<number, ImportantAura>
---@type ImportantAuraList
local _ImportantAuraList = {
-- Primal Chill
[372682] = {
isMagicDispel = true
},
-- Primal Chill
[373589] = {
isMagicDispel = true
},
-- Rolling Thunder
[392641] = {
isMagicDispel = true
},
-- Burning Touch
[373869] = {
isMagicDispel = true,
isDiffusable = true
},
-- Shock Blast
[392924] = {
isMagicDispel = true,
isDiffusable = true
},
-- Storm Slam
[381515] = {
isMagicDispel = true
},
-- Thunder Clap
[386028] = {
isMagicDispel = true
},
-- Tempest
[386025] = {
isMagicDispel = true,
isDiffusable = true
},
-- Frightful Roar
[386063] = {
isMagicDispel = true
},
-- Bloodcurdling Shout
[373395] = {
isMagicDispel = true
},
-- Conductive Strike
[376827] = {
isMagicDispel = true
},
-- Storm Shock
[381530] = {
isMagicDispel = true
},
-- Mystic Vapors
[387564] = {
isMagicDispel = true,
isDiffusable = true
},
-- Erratic Growth
[375602] = {
isMagicDispel = true
},
-- Crystaline Rupture
[370766] = {
isMagicDispel = true
},
-- Waking Bane
[386546] = {
isMagicDispel = true
},
-- Waking Bane
[386549] = {
isMagicDispel = true
},
-- Forbiden Knowledge
[371352] = {
isMagicDispel = true
},
-- Icy Bindings
[377488] = {
isMagicDispel = true
},
-- Absolute Zero
[396722] = {
isMagicDispel = true
},
-- Dragon Strike
[384978] = {
isMagicDispel = true,
isDiffusable = true
},
-- Monotonous Lecture
[388392] = {
isMagicDispel = true
},
-- Thunderstrike
[215429] = {
isMagicDispel = true
},
-- Seal Magic
[209404] = {
isMagicDispel = true
},
-- Mana Fang
[209516] = {
isMagicDispel = true,
isDiffusable = true
},
-- Suppress
[209413] = {
isMagicDispel = true,
},
-- Bewitch
[211470] = {
isMagicDispel = true,
isDiffusable = true
},
-- Impending Doom
[397907] = {
isMagicDispel = true
},
-- Withering Soul
[208165] = {
isMagicDispel = true
},
-- Criple
[214690] = {
isMagicDispel = true
},
-- Carrion Swarm
[214688] = {
isMagicDispel = true
},
-- Shadow Word: Frailty
[152819] = {
isMagicDispel = true,
isDiffusable = true
},
-- Tainted Ripple
[397878] = {
isMagicDispel = true
},
-- Haunting Scream
[395859] = {
isMagicDispel = true,
},
-- Throw Torch
[114803] = {
isMagicDispel = true,
isDiffusable = true
},
-- Sleepy Soliloquy
[395872] = {
isMagicDispel = true,
},
-- Serpent Strike
[106823] = {
isMagicDispel = true,
},
-- Necrotic Burst
[156718] = {
isDiseaseDispel = true
},
-- Plague Spit
[153524] = {
isDiseaseDispel = true
},
-- Death Venom
[156717] = {
isPoisonDispel = true
},
-- Lasher Toxin
[389033] = {
isPoisonDispel = true
},
-- Touch of Nothingness
[106113] = {
isMagicDispel = true,
},
-- Arcane Lockdown
[207278] = {
isDiffusable = true
},
-- Hinder
[215204] = {
isDiffusable = true
}
}
return _ImportantAuraList
Loading…
Cancel
Save