Added augmented buffs in the Auras tab of players which received Ebon Might and Precience

- Forcing update interval to 0.1 on arenas matches using the real-time dps feature.
- Framework Update.
- Lib Open Raid Update.
- More parser cleanups and code improvements.
- Auras tab now ignores regular "world auras" (those weekly buffs of reputation, etc)
This commit is contained in:
Tercio Jose
2023-08-05 21:39:00 -03:00
parent ce3a2dc8e9
commit ea2cec6861
29 changed files with 3302 additions and 3151 deletions
+20 -12
View File
@@ -46,7 +46,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--constants
local container_habilidades = Details.container_habilidades
local spellContainerClass = Details.container_habilidades
local damageClass = Details.atributo_damage
local atributo_misc = Details.atributo_misc
local container_damage = Details.container_type.CONTAINER_DAMAGE_CLASS
@@ -304,23 +304,23 @@ local void_zone_sort = function(t1, t2)
end
function Details.Sort1 (table1, table2) --[[exported]]
function Details.Sort1(table1, table2) --[[exported]]
return table1[1] > table2[1]
end
function Details.Sort2 (table1, table2) --[[exported]]
function Details.Sort2(table1, table2) --[[exported]]
return table1[2] > table2[2]
end
function Details.Sort3 (table1, table2) --[[exported]]
function Details.Sort3(table1, table2) --[[exported]]
return table1[3] > table2[3]
end
function Details.Sort4 (table1, table2) --[[exported]]
function Details.Sort4(table1, table2) --[[exported]]
return table1[4] > table2[4]
end
function Details.Sort4Reverse (table1, table2) --[[exported]]
function Details.Sort4Reverse(table1, table2) --[[exported]]
if (not table2) then
return true
end
@@ -456,7 +456,7 @@ end
--targets: table where key is the target name (actor name) and the value is the amount of damage done to that target
targets = {},
--spells: spell container
spells = container_habilidades:NovoContainer(container_damage)
spells = spellContainerClass:NovoContainer(container_damage)
}
setmetatable(newDamageActor, damageClass)
@@ -470,9 +470,6 @@ end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--special cases
--todo: Details.use_realtimedps "realtimedps_order_bars" need to come from the sorter function.
--todo: "realtimedps_always_arena" need to come from the sorter function because it'll have "realtimedps_order_bars" always on.
---calculate real time dps for each actor within the passed table
---@param tableWithActors actor[]
---@return number
@@ -3411,7 +3408,7 @@ function damageClass.PredictedAugSpellsOnEnter(self)
table.sort(spellsAugmented, Details.Sort2)
for i = 1, #spellsAugmented do
for i = 1, math.min(#spellsAugmented, 5) do
local sourceName, sourceAmount = unpack(spellsAugmented[i])
GameCooltip:AddLine(sourceName, Details:Format(sourceAmount), 1, "yellow", "yellow", 10)
local actorObject = combatObject:GetActor(1, sourceName)
@@ -6706,6 +6703,17 @@ end
end
end
if (actorObject.augmentedSpellsContainer) then
local overallAugmentedSpellsContainer = overallActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS)
for spellId, spellTable in pairs(actorObject.augmentedSpellsContainer._ActorTable) do --same as actorObject.augmentedSpellsContainer:GetRawSpellTable()
local overallSpellTable = overallAugmentedSpellsContainer:GetOrCreateSpell(spellId, true)
overallSpellTable.total = overallSpellTable.total + spellTable.total
for targetName, amount in pairs(spellTable.targets) do
overallSpellTable.targets[targetName] = (overallSpellTable.targets[targetName] or 0) + amount
end
end
end
--copy the friendly fire container
for targetName, friendlyFireTable in pairs(actorObject.friendlyfire) do
--get or create the friendly fire table in the overall data
@@ -6722,7 +6730,7 @@ end
end
--actor 1 is who will receive the sum from actor2
function Details.SumDamageActors(actor1, actor2, actorContainer)
function Details.SumDamageActors(actor1, actor2, actorContainer) --not called anywhere, can be deprecated
--general
actor1.total = actor1.total + actor2.total
actor1.damage_taken = actor1.damage_taken + actor2.damage_taken
+52 -61
View File
@@ -2,91 +2,81 @@
local _detalhes = _G.Details
local _
local addonName, Details222 = ...
local classUtility = _detalhes.habilidade_misc
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local setmetatable = setmetatable --lua local
local ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--constants
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
local habilidade_misc = _detalhes.habilidade_misc
local container_combatentes = _detalhes.container_combatentes
local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLASS
local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--internals
function habilidade_misc:NovaTabela (id, link, token)
local _newMiscSpell = {
function classUtility:NovaTabela(id, link, token)
local spellTable = {
id = id,
counter = 0,
targets = {}
}
if (token == "BUFF_UPTIME" or token == "DEBUFF_UPTIME") then
_newMiscSpell.uptime = 0
_newMiscSpell.actived = false
_newMiscSpell.activedamt = 0 --so quantos estao ativados no momento
_newMiscSpell.refreshamt = 0
_newMiscSpell.appliedamt = 0
spellTable.uptime = 0
spellTable.actived = false
spellTable.activedamt = 0 --amount of active auras
spellTable.refreshamt = 0
spellTable.appliedamt = 0
elseif (token == "SPELL_INTERRUPT") then
_newMiscSpell.interrompeu_oque = {}
spellTable.interrompeu_oque = {}
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
_newMiscSpell.dispell_oque = {}
spellTable.dispell_oque = {}
elseif (token == "SPELL_AURA_BROKEN" or token == "SPELL_AURA_BROKEN_SPELL") then
_newMiscSpell.cc_break_oque = {}
spellTable.cc_break_oque = {}
end
return _newMiscSpell
return spellTable
end
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
local actorUtilityObject = token
if (spellID == "BUFF_OR_DEBUFF") then
---@param self spelltable
---@param targetName string
---@param targetFlags number
---@param sourceName string
---@param token string|actor
---@param spellId number
---@param spellName string
function classUtility:Add(targetSerial, targetName, targetFlags, sourceName, token, spellId, spellName)
--as the passed parameters for aura are different from the reset of the abilities, this should be a different function
if (spellId == "BUFF_OR_DEBUFF") then
local actorUtilityObject = token
local parserToken = spellName
if (parserToken == "COOLDOWN") then
self.counter = self.counter + 1
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
self.targets[targetName] = (self.targets[targetName] or 0) + 1
elseif (parserToken == "BUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
self.uptime = self.uptime + (_detalhes._tempo - self.actived_at)
self.refreshamt = self.refreshamt + 1
actorUtilityObject.buff_uptime = actorUtilityObject.buff_uptime + _detalhes._tempo - self.actived_at
actorUtilityObject.buff_uptime = actorUtilityObject.buff_uptime + (_detalhes._tempo - self.actived_at)
end
self.actived_at = _detalhes._tempo
self.actived = true
elseif (parserToken == "BUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
actorUtilityObject.buff_uptime = actorUtilityObject.buff_uptime + _detalhes._tempo - self.actived_at
self.uptime = self.uptime + (_detalhes._tempo - self.actived_at)
actorUtilityObject.buff_uptime = actorUtilityObject.buff_uptime + (_detalhes._tempo - self.actived_at)
end
self.actived = false
self.actived_at = nil
elseif (parserToken == "BUFF_UPTIME_IN" or parserToken == "DEBUFF_UPTIME_IN") then
--aura applied
self.actived = true
self.activedamt = self.activedamt + 1
self.appliedamt = self.appliedamt + 1
if (self.actived_at and self.actived and parserToken == "DEBUFF_UPTIME_IN") then
--ja esta ativo em outro mob e jogou num novo
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
actorUtilityObject.debuff_uptime = actorUtilityObject.debuff_uptime + _detalhes._tempo - self.actived_at
self.uptime = self.uptime + (_detalhes._tempo - self.actived_at)
actorUtilityObject.debuff_uptime = actorUtilityObject.debuff_uptime + (_detalhes._tempo - self.actived_at)
end
self.actived_at = _detalhes._tempo
@@ -97,17 +87,18 @@
elseif (parserToken == "DEBUFF_UPTIME_REFRESH") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
self.uptime = self.uptime + (_detalhes._tempo - self.actived_at)
self.refreshamt = self.refreshamt + 1
actorUtilityObject.debuff_uptime = actorUtilityObject.debuff_uptime + _detalhes._tempo - self.actived_at
actorUtilityObject.debuff_uptime = actorUtilityObject.debuff_uptime + (_detalhes._tempo - self.actived_at)
end
self.actived_at = _detalhes._tempo
self.actived = true
elseif (parserToken == "DEBUFF_UPTIME_OUT") then
if (self.actived_at and self.actived) then
self.uptime = self.uptime + _detalhes._tempo - self.actived_at
actorUtilityObject.debuff_uptime = actorUtilityObject.debuff_uptime + _detalhes._tempo - self.actived_at
self.uptime = self.uptime + (_detalhes._tempo - self.actived_at)
actorUtilityObject.debuff_uptime = actorUtilityObject.debuff_uptime + (_detalhes._tempo - self.actived_at)
end
self.activedamt = self.activedamt - 1
@@ -123,42 +114,42 @@
elseif (token == "SPELL_INTERRUPT") then
self.counter = self.counter + 1
if (not self.interrompeu_oque [spellID]) then
self.interrompeu_oque [spellID] = 1
if (not self.interrompeu_oque[spellId]) then
self.interrompeu_oque[spellId] = 1
else
self.interrompeu_oque [spellID] = self.interrompeu_oque [spellID] + 1
self.interrompeu_oque[spellId] = self.interrompeu_oque[spellId] + 1
end
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
self.targets[targetName] = (self.targets[targetName] or 0) + 1
elseif (token == "SPELL_RESURRECT") then
self.ress = (self.ress or 0) + 1
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
self.targets[targetName] = (self.targets[targetName] or 0) + 1
elseif (token == "SPELL_DISPEL" or token == "SPELL_STOLEN") then
self.dispell = (self.dispell or 0) + 1
if (not self.dispell_oque [spellID]) then
self.dispell_oque [spellID] = 1
if (not self.dispell_oque[spellId]) then
self.dispell_oque[spellId] = 1
else
self.dispell_oque [spellID] = self.dispell_oque [spellID] + 1
self.dispell_oque[spellId] = self.dispell_oque[spellId] + 1
end
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
self.targets[targetName] = (self.targets[targetName] or 0) + 1
elseif (token == "SPELL_AURA_BROKEN_SPELL" or token == "SPELL_AURA_BROKEN") then
self.cc_break = (self.cc_break or 0) + 1
if (not self.cc_break_oque [spellID]) then
self.cc_break_oque [spellID] = 1
if (not self.cc_break_oque[spellId]) then
self.cc_break_oque[spellId] = 1
else
self.cc_break_oque [spellID] = self.cc_break_oque [spellID] + 1
self.cc_break_oque[spellId] = self.cc_break_oque[spellId] + 1
end
--target
self.targets [nome] = (self.targets [nome] or 0) + 1
self.targets[targetName] = (self.targets[targetName] or 0) + 1
end
end
+170 -123
View File
@@ -2398,8 +2398,8 @@ function atributo_misc:r_onlyrefresh_shadow (actor)
--cc done
if (actor.cc_done) then
refresh_alvos (shadow.cc_done_targets, actor.cc_done_targets)
refresh_habilidades (shadow.cc_done_spells, actor.cc_done_spells)
refresh_alvos(shadow.cc_done_targets, actor.cc_done_targets)
refresh_habilidades(shadow.cc_done_spells, actor.cc_done_spells)
end
--cooldowns
@@ -2412,6 +2412,10 @@ function atributo_misc:r_onlyrefresh_shadow (actor)
if (actor.buff_uptime) then
refresh_alvos (shadow.buff_uptime_targets, actor.buff_uptime_targets)
refresh_habilidades (shadow.buff_uptime_spells, actor.buff_uptime_spells)
if (actor.received_buffs_spells) then
refresh_habilidades(shadow.received_buffs_spells, actor.received_buffs_spells)
end
end
--debuff uptime
@@ -2462,45 +2466,45 @@ function atributo_misc:r_onlyrefresh_shadow (actor)
end
return shadow
end
local somar_keys = function(habilidade, habilidade_tabela1)
local sumKeyValues = function(habilidade, habilidade_tabela1)
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) + value
habilidade_tabela1[key] = (habilidade_tabela1[key] or 0) + value
end
end
end
end
local somar_alvos = function(container1, container2)
for target_name, amount in pairs(container2) do
container1 [target_name] = (container1 [target_name] or 0) + amount
end
end
local somar_habilidades = function(container1, container2)
for spellid, habilidade in pairs(container2._ActorTable) do
local habilidade_tabela1 = container1:PegaHabilidade (spellid, true, nil, false)
somar_alvos (habilidade_tabela1.targets, habilidade.targets)
somar_keys (habilidade, habilidade_tabela1)
local sumTargetValues = function(container1, container2)
for targetName, amount in pairs(container2) do
container1[targetName] = (container1[targetName] or 0) + amount
end
end
function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
local sumSpellTableKeyValues = function(container1, container2)
for spellId, spellTable in pairs(container2._ActorTable) do
local spellTable1 = container1:PegaHabilidade(spellId, true, nil, false)
sumTargetValues(spellTable1.targets, spellTable.targets)
sumKeyValues(spellTable, spellTable1)
end
end
function atributo_misc:r_connect_shadow(actor, no_refresh, combat_object)
local host_combat = combat_object or _detalhes.tabela_overall
--criar uma shadow desse ator se ainda no tiver uma
local overall_misc = host_combat [4]
local shadow = overall_misc._ActorTable [overall_misc._NameIndexTable [actor.nome]]
local overall_misc = host_combat[4]
local shadow = overall_misc._ActorTable[overall_misc._NameIndexTable[actor.nome]]
if (not actor.nome) then
actor.nome = "unknown"
end
if (not shadow) then
shadow = overall_misc:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
shadow = overall_misc:PegarCombatente(actor.serial, actor.nome, actor.flag_original, true)
shadow.classe = actor.classe
shadow:SetSpecId(actor.spec)
@@ -2510,30 +2514,29 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
shadow.boss = actor.boss
shadow.boss_fight_component = actor.boss_fight_component
shadow.fight_component = actor.fight_component
end
--aplica a meta e indexes
if (not no_refresh) then
_detalhes.refresh:r_atributo_misc (actor, shadow)
_detalhes.refresh:r_atributo_misc(actor, shadow)
end
--pets (add unique pet names)
for _, petName in ipairs(actor.pets) do
DetailsFramework.table.addunique (shadow.pets, petName)
DetailsFramework.table.addunique(shadow.pets, petName)
end
if (actor.cc_done) then
if (not shadow.cc_done_targets) then
shadow.cc_done = _detalhes:GetOrderNumber()
shadow.cc_done_targets = {}
shadow.cc_done_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
shadow.cc_done_spells = container_habilidades:NovoContainer(_detalhes.container_type.CONTAINER_MISC_CLASS)
end
shadow.cc_done = shadow.cc_done + actor.cc_done
somar_alvos (shadow.cc_done_targets, actor.cc_done_targets)
somar_habilidades (shadow.cc_done_spells, actor.cc_done_spells)
sumTargetValues(shadow.cc_done_targets, actor.cc_done_targets)
sumSpellTableKeyValues(shadow.cc_done_spells, actor.cc_done_spells)
end
if (actor.cooldowns_defensive) then
@@ -2549,8 +2552,8 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
host_combat.totals_grupo[4].cooldowns_defensive = host_combat.totals_grupo[4].cooldowns_defensive + actor.cooldowns_defensive
end
somar_alvos (shadow.cooldowns_defensive_targets, actor.cooldowns_defensive_targets)
somar_habilidades (shadow.cooldowns_defensive_spells, actor.cooldowns_defensive_spells)
sumTargetValues (shadow.cooldowns_defensive_targets, actor.cooldowns_defensive_targets)
sumSpellTableKeyValues (shadow.cooldowns_defensive_spells, actor.cooldowns_defensive_spells)
end
if (actor.buff_uptime) then
@@ -2560,9 +2563,16 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
shadow.buff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
if (actor.received_buffs_spells) then
if (not shadow.received_buffs_spells) then
shadow.received_buffs_spells = container_habilidades:NovoContainer(_detalhes.container_type.CONTAINER_MISC_CLASS)
end
sumSpellTableKeyValues(shadow.received_buffs_spells, actor.received_buffs_spells)
end
shadow.buff_uptime = shadow.buff_uptime + actor.buff_uptime
somar_alvos (shadow.buff_uptime_targets, actor.buff_uptime_targets)
somar_habilidades (shadow.buff_uptime_spells, actor.buff_uptime_spells)
sumTargetValues (shadow.buff_uptime_targets, actor.buff_uptime_targets)
sumSpellTableKeyValues (shadow.buff_uptime_spells, actor.buff_uptime_spells)
end
@@ -2600,7 +2610,7 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
end
end
somar_habilidades (shadow.debuff_uptime_spells, actor.debuff_uptime_spells)
sumSpellTableKeyValues (shadow.debuff_uptime_spells, actor.debuff_uptime_spells)
end
--interrupt
@@ -2618,8 +2628,8 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
host_combat.totals_grupo[4].interrupt = host_combat.totals_grupo[4].interrupt + actor.interrupt
end
somar_alvos (shadow.interrupt_targets, actor.interrupt_targets)
somar_habilidades (shadow.interrupt_spells, actor.interrupt_spells)
sumTargetValues (shadow.interrupt_targets, actor.interrupt_targets)
sumSpellTableKeyValues (shadow.interrupt_spells, actor.interrupt_spells)
for spellid, habilidade in pairs(actor.interrupt_spells._ActorTable) do
local habilidade_shadow = shadow.interrupt_spells:PegaHabilidade (spellid, true, nil, true)
@@ -2649,8 +2659,8 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
host_combat.totals_grupo[4].ress = host_combat.totals_grupo[4].ress + actor.ress
end
somar_alvos (shadow.ress_targets, actor.ress_targets)
somar_habilidades (shadow.ress_spells, actor.ress_spells)
sumTargetValues (shadow.ress_targets, actor.ress_targets)
sumSpellTableKeyValues (shadow.ress_spells, actor.ress_spells)
end
--dispell
@@ -2668,8 +2678,8 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
host_combat.totals_grupo[4].dispell = host_combat.totals_grupo[4].dispell + actor.dispell
end
somar_alvos (shadow.dispell_targets, actor.dispell_targets)
somar_habilidades (shadow.dispell_spells, actor.dispell_spells)
sumTargetValues (shadow.dispell_targets, actor.dispell_targets)
sumSpellTableKeyValues (shadow.dispell_spells, actor.dispell_spells)
for spellid, habilidade in pairs(actor.dispell_spells._ActorTable) do
local habilidade_shadow = shadow.dispell_spells:PegaHabilidade (spellid, true, nil, true)
@@ -2698,8 +2708,8 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
host_combat.totals_grupo[4].cc_break = host_combat.totals_grupo[4].cc_break + actor.cc_break
end
somar_alvos (shadow.cc_break_targets, actor.cc_break_targets)
somar_habilidades (shadow.cc_break_spells, actor.cc_break_spells)
sumTargetValues (shadow.cc_break_targets, actor.cc_break_targets)
sumSpellTableKeyValues (shadow.cc_break_spells, actor.cc_break_spells)
for spellid, habilidade in pairs(actor.cc_break_spells._ActorTable) do
local habilidade_shadow = shadow.cc_break_spells:PegaHabilidade (spellid, true, nil, true)
@@ -2749,9 +2759,18 @@ function _detalhes.refresh:r_atributo_misc(thisActor, shadow)
if (shadow and not shadow.buff_uptime_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_targets = {}
shadow.buff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
shadow.buff_uptime_spells = container_habilidades:NovoContainer(_detalhes.container_type.CONTAINER_MISC_CLASS)
if (thisActor.received_buffs_spells) then
shadow.received_buffs_spells = container_habilidades:NovoContainer(_detalhes.container_type.CONTAINER_MISC_CLASS)
end
end
_detalhes.refresh:r_container_habilidades(thisActor.buff_uptime_spells, shadow and shadow.buff_uptime_spells)
if (thisActor.received_buffs_spells) then
_detalhes.refresh:r_container_habilidades(thisActor.received_buffs_spells, shadow and shadow.received_buffs_spells)
end
_detalhes.refresh:r_container_habilidades (thisActor.buff_uptime_spells, shadow and shadow.buff_uptime_spells)
end
--refresh buff uptime
@@ -2834,7 +2853,11 @@ function _detalhes.clear:c_atributo_misc (este_jogador)
end
if (este_jogador.buff_uptime_targets) then
_detalhes.clear:c_container_habilidades (este_jogador.buff_uptime_spells)
_detalhes.clear:c_container_habilidades(este_jogador.buff_uptime_spells)
if (este_jogador.received_buffs_spells) then
_detalhes.clear:c_container_habilidades(este_jogador.received_buffs_spells)
end
end
if (este_jogador.debuff_uptime_targets) then
@@ -2859,55 +2882,56 @@ atributo_misc.__add = function(tabela1, tabela2)
if (tabela2.cc_done) then
tabela1.cc_done = tabela1.cc_done + tabela2.cc_done
for target_name, amount in pairs(tabela2.cc_done_targets) do
tabela1.cc_done_targets [target_name] = (tabela1.cc_done_targets [target_name] or 0) + amount
for targetName, amount in pairs(tabela2.cc_done_targets) do
tabela1.cc_done_targets[targetName] = (tabela1.cc_done_targets[targetName] or 0) + amount
end
for spellid, habilidade in pairs(tabela2.cc_done_spells._ActorTable) do
local habilidade_tabela1 = tabela1.cc_done_spells:PegaHabilidade (spellid, true, nil, false)
for spellId, spellTable in pairs(tabela2.cc_done_spells._ActorTable) do
local spellTable1 = tabela1.cc_done_spells:PegaHabilidade(spellId, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
for target_name, amount in pairs(spellTable.targets) do
spellTable1.targets[target_name] = (spellTable1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues(spellTable, spellTable1)
end
end
if (tabela2.interrupt) then
if (not tabela1.interrupt) then
tabela1.interrupt = 0
tabela1.interrupt_targets = {}
tabela1.interrupt_spells = container_habilidades:NovoContainer (container_misc)
tabela1.interrupt_spells = container_habilidades:NovoContainer(container_misc)
tabela1.interrompeu_oque = {}
end
--total de interrupts
tabela1.interrupt = tabela1.interrupt + tabela2.interrupt
--soma o interrompeu o que
for spellid, amount in pairs(tabela2.interrompeu_oque) do
tabela1.interrompeu_oque [spellid] = (tabela1.interrompeu_oque [spellid] or 0) + amount
tabela1.interrompeu_oque[spellid] = (tabela1.interrompeu_oque [spellid] or 0) + amount
end
--soma os containers de alvos
for target_name, amount in pairs(tabela2.interrupt_targets) do
tabela1.interrupt_targets [target_name] = (tabela1.interrupt_targets [target_name] or 0) + amount
tabela1.interrupt_targets[target_name] = (tabela1.interrupt_targets[target_name] or 0) + amount
end
--soma o container de habilidades
for spellid, habilidade in pairs(tabela2.interrupt_spells._ActorTable) do
local habilidade_tabela1 = tabela1.interrupt_spells:PegaHabilidade (spellid, true, nil, false)
local habilidade_tabela1 = tabela1.interrupt_spells:PegaHabilidade(spellid, true, nil, false)
habilidade_tabela1.interrompeu_oque = habilidade_tabela1.interrompeu_oque or {}
for _spellid, amount in pairs(habilidade.interrompeu_oque) do
habilidade_tabela1.interrompeu_oque [_spellid] = (habilidade_tabela1.interrompeu_oque [_spellid] or 0) + amount
habilidade_tabela1.interrompeu_oque[_spellid] = (habilidade_tabela1.interrompeu_oque[_spellid] or 0) + amount
end
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues (habilidade, habilidade_tabela1)
end
end
@@ -2916,23 +2940,39 @@ atributo_misc.__add = function(tabela1, tabela2)
if (not tabela1.buff_uptime) then
tabela1.buff_uptime = 0
tabela1.buff_uptime_targets = {}
tabela1.buff_uptime_spells = container_habilidades:NovoContainer (container_misc)
tabela1.buff_uptime_spells = container_habilidades:NovoContainer(container_misc)
end
if (tabela2.received_buffs_spells) then
if (not tabela1.received_buffs_spells) then
tabela1.received_buffs_spells = container_habilidades:NovoContainer(container_misc)
end
for spellId, spellTable in pairs(tabela2.received_buffs_spells._ActorTable) do
local habilidade_tabela1 = tabela1.received_buffs_spells:PegaHabilidade(spellId, true, nil, false)
for target_name, amount in pairs(spellTable.targets) do
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
sumKeyValues(spellTable, habilidade_tabela1)
end
end
tabela1.buff_uptime = tabela1.buff_uptime + tabela2.buff_uptime
for target_name, amount in pairs(tabela2.buff_uptime_targets) do
tabela1.buff_uptime_targets [target_name] = (tabela1.buff_uptime_targets [target_name] or 0) + amount
tabela1.buff_uptime_targets[target_name] = (tabela1.buff_uptime_targets[target_name] or 0) + amount
end
for spellid, habilidade in pairs(tabela2.buff_uptime_spells._ActorTable) do
local habilidade_tabela1 = tabela1.buff_uptime_spells:PegaHabilidade (spellid, true, nil, false)
for spellId, spellTable in pairs(tabela2.buff_uptime_spells._ActorTable) do
local habilidade_tabela1 = tabela1.buff_uptime_spells:PegaHabilidade(spellId, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
for target_name, amount in pairs(spellTable.targets) do
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues(spellTable, habilidade_tabela1)
end
end
@@ -2956,17 +2996,17 @@ atributo_misc.__add = function(tabela1, tabela2)
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
if (type(amount) == "table") then --boss debuff
local t = tabela1.debuff_uptime_targets [target_name]
local t = tabela1.debuff_uptime_targets[target_name]
if (not t) then
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
t = tabela1.debuff_uptime_targets [target_name]
tabela1.debuff_uptime_targets[target_name] = atributo_misc:CreateBuffTargetObject()
t = tabela1.debuff_uptime_targets[target_name]
end
t.uptime = t.uptime + amount.uptime
t.activedamt = t.activedamt + amount.activedamt
t.refreshamt = t.refreshamt + amount.refreshamt
t.appliedamt = t.appliedamt + amount.appliedamt
else
tabela1.debuff_uptime_targets [target_name] = (tabela1.debuff_uptime_targets [target_name] or 0) + amount
tabela1.debuff_uptime_targets[target_name] = (tabela1.debuff_uptime_targets[target_name] or 0) + amount
end
end
@@ -2974,10 +3014,10 @@ atributo_misc.__add = function(tabela1, tabela2)
local habilidade_tabela1 = tabela1.debuff_uptime_spells:PegaHabilidade (spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues (habilidade, habilidade_tabela1)
end
end
@@ -2991,17 +3031,17 @@ atributo_misc.__add = function(tabela1, tabela2)
tabela1.cooldowns_defensive = tabela1.cooldowns_defensive + tabela2.cooldowns_defensive
for target_name, amount in pairs(tabela2.cooldowns_defensive_targets) do
tabela1.cooldowns_defensive_targets [target_name] = (tabela1.cooldowns_defensive_targets [target_name] or 0) + amount
tabela1.cooldowns_defensive_targets[target_name] = (tabela1.cooldowns_defensive_targets[target_name] or 0) + amount
end
for spellid, habilidade in pairs(tabela2.cooldowns_defensive_spells._ActorTable) do
local habilidade_tabela1 = tabela1.cooldowns_defensive_spells:PegaHabilidade (spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues (habilidade, habilidade_tabela1)
end
end
@@ -3015,17 +3055,17 @@ atributo_misc.__add = function(tabela1, tabela2)
tabela1.ress = tabela1.ress + tabela2.ress
for target_name, amount in pairs(tabela2.ress_targets) do
tabela1.ress_targets [target_name] = (tabela1.ress_targets [target_name] or 0) + amount
tabela1.ress_targets[target_name] = (tabela1.ress_targets[target_name] or 0) + amount
end
for spellid, habilidade in pairs(tabela2.ress_spells._ActorTable) do
local habilidade_tabela1 = tabela1.ress_spells:PegaHabilidade (spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues (habilidade, habilidade_tabela1)
end
end
@@ -3041,7 +3081,7 @@ atributo_misc.__add = function(tabela1, tabela2)
tabela1.dispell = tabela1.dispell + tabela2.dispell
for target_name, amount in pairs(tabela2.dispell_targets) do
tabela1.dispell_targets [target_name] = (tabela1.dispell_targets [target_name] or 0) + amount
tabela1.dispell_targets[target_name] = (tabela1.dispell_targets[target_name] or 0) + amount
end
for spellid, habilidade in pairs(tabela2.dispell_spells._ActorTable) do
@@ -3050,24 +3090,23 @@ atributo_misc.__add = function(tabela1, tabela2)
habilidade_tabela1.dispell_oque = habilidade_tabela1.dispell_oque or {}
for _spellid, amount in pairs(habilidade.dispell_oque) do
habilidade_tabela1.dispell_oque [_spellid] = (habilidade_tabela1.dispell_oque [_spellid] or 0) + amount
habilidade_tabela1.dispell_oque[_spellid] = (habilidade_tabela1.dispell_oque[_spellid] or 0) + amount
end
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues (habilidade, habilidade_tabela1)
end
for spellid, amount in pairs(tabela2.dispell_oque) do
tabela1.dispell_oque [spellid] = (tabela1.dispell_oque [spellid] or 0) + amount
tabela1.dispell_oque[spellid] = (tabela1.dispell_oque[spellid] or 0) + amount
end
end
if (tabela2.cc_break) then
if (not tabela1.cc_break) then
tabela1.cc_break = 0
tabela1.cc_break_targets = {}
@@ -3078,7 +3117,7 @@ atributo_misc.__add = function(tabela1, tabela2)
tabela1.cc_break = tabela1.cc_break + tabela2.cc_break
for target_name, amount in pairs(tabela2.cc_break_targets) do
tabela1.cc_break_targets [target_name] = (tabela1.cc_break_targets [target_name] or 0) + amount
tabela1.cc_break_targets[target_name] = (tabela1.cc_break_targets[target_name] or 0) + amount
end
for spellid, habilidade in pairs(tabela2.cc_break_spells._ActorTable) do
@@ -3086,29 +3125,29 @@ atributo_misc.__add = function(tabela1, tabela2)
habilidade_tabela1.cc_break_oque = habilidade_tabela1.cc_break_oque or {}
for _spellid, amount in pairs(habilidade.cc_break_oque) do
habilidade_tabela1.cc_break_oque [_spellid] = (habilidade_tabela1.cc_break_oque [_spellid] or 0) + amount
habilidade_tabela1.cc_break_oque[_spellid] = (habilidade_tabela1.cc_break_oque[_spellid] or 0) + amount
end
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) + amount
end
somar_keys (habilidade, habilidade_tabela1)
sumKeyValues (habilidade, habilidade_tabela1)
end
for spellid, amount in pairs(tabela2.cc_break_oque) do
tabela1.cc_break_oque [spellid] = (tabela1.cc_break_oque [spellid] or 0) + amount
tabela1.cc_break_oque[spellid] = (tabela1.cc_break_oque[spellid] or 0) + amount
end
end
return tabela1
end
local subtrair_keys = function(habilidade, habilidade_tabela1)
local subtractKeyValues = function(habilidade, habilidade_tabela1)
for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) - value
habilidade_tabela1[key] = (habilidade_tabela1[key] or 0) - value
end
end
end
@@ -3119,30 +3158,32 @@ atributo_misc.__sub = function(tabela1, tabela2)
tabela1.cc_done = tabela1.cc_done - tabela2.cc_done
for target_name, amount in pairs(tabela2.cc_done_targets) do
tabela1.cc_done_targets [target_name] = (tabela1.cc_done_targets [target_name] or 0) - amount
tabela1.cc_done_targets[target_name] = (tabela1.cc_done_targets[target_name] or 0) - amount
end
for spellid, habilidade in pairs(tabela2.cc_done_spells._ActorTable) do
local habilidade_tabela1 = tabela1.cc_done_spells:PegaHabilidade (spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
end
if (tabela2.interrupt) then
--total de interrupts
tabela1.interrupt = tabela1.interrupt - tabela2.interrupt
--soma o interrompeu o que
for spellid, amount in pairs(tabela2.interrompeu_oque) do
tabela1.interrompeu_oque [spellid] = (tabela1.interrompeu_oque [spellid] or 0) - amount
tabela1.interrompeu_oque[spellid] = (tabela1.interrompeu_oque[spellid] or 0) - amount
end
--soma os containers de alvos
for target_name, amount in pairs(tabela2.interrupt_targets) do
tabela1.interrupt_targets [target_name] = (tabela1.interrupt_targets [target_name] or 0) - amount
tabela1.interrupt_targets[target_name] = (tabela1.interrupt_targets[target_name] or 0) - amount
end
--soma o container de habilidades
@@ -3151,14 +3192,14 @@ atributo_misc.__sub = function(tabela1, tabela2)
habilidade_tabela1.interrompeu_oque = habilidade_tabela1.interrompeu_oque or {}
for _spellid, amount in pairs(habilidade.interrompeu_oque) do
habilidade_tabela1.interrompeu_oque [_spellid] = (habilidade_tabela1.interrompeu_oque [_spellid] or 0) - amount
habilidade_tabela1.interrompeu_oque[_spellid] = (habilidade_tabela1.interrompeu_oque[_spellid] or 0) - amount
end
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
end
@@ -3166,17 +3207,24 @@ atributo_misc.__sub = function(tabela1, tabela2)
tabela1.buff_uptime = tabela1.buff_uptime - tabela2.buff_uptime
for target_name, amount in pairs(tabela2.buff_uptime_targets) do
tabela1.buff_uptime_targets [target_name] = (tabela1.buff_uptime_targets [target_name] or 0) - amount
tabela1.buff_uptime_targets[target_name] = (tabela1.buff_uptime_targets[target_name] or 0) - amount
end
for spellid, habilidade in pairs(tabela2.buff_uptime_spells._ActorTable) do
local habilidade_tabela1 = tabela1.buff_uptime_spells:PegaHabilidade (spellid, true, nil, false)
local habilidade_tabela1 = tabela1.buff_uptime_spells:PegaHabilidade(spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
if (tabela2.received_buffs_spells) then
for spellId, spellTable in pairs(tabela2.received_buffs_spells._ActorTable) do
local habilidade_tabela1 = tabela1.received_buffs_spells:PegaHabilidade(spellId, true, nil, false)
subtractKeyValues(spellTable, habilidade_tabela1)
end
end
end
@@ -3185,17 +3233,17 @@ atributo_misc.__sub = function(tabela1, tabela2)
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
if (type(amount) == "table") then --boss debuff
local t = tabela1.debuff_uptime_targets [target_name]
local t = tabela1.debuff_uptime_targets[target_name]
if (not t) then
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
t = tabela1.debuff_uptime_targets [target_name]
tabela1.debuff_uptime_targets[target_name] = atributo_misc:CreateBuffTargetObject()
t = tabela1.debuff_uptime_targets[target_name]
end
t.uptime = t.uptime - amount.uptime
t.activedamt = t.activedamt - amount.activedamt
t.refreshamt = t.refreshamt - amount.refreshamt
t.appliedamt = t.appliedamt - amount.appliedamt
else
tabela2.debuff_uptime_targets [target_name] = (tabela2.debuff_uptime_targets [target_name] or 0) - amount
tabela2.debuff_uptime_targets[target_name] = (tabela2.debuff_uptime_targets[target_name] or 0) - amount
end
end
@@ -3203,10 +3251,10 @@ atributo_misc.__sub = function(tabela1, tabela2)
local habilidade_tabela1 = tabela1.debuff_uptime_spells:PegaHabilidade (spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
end
@@ -3214,17 +3262,17 @@ atributo_misc.__sub = function(tabela1, tabela2)
tabela1.cooldowns_defensive = tabela1.cooldowns_defensive - tabela2.cooldowns_defensive
for target_name, amount in pairs(tabela2.cooldowns_defensive_targets) do
tabela1.cooldowns_defensive_targets [target_name] = (tabela1.cooldowns_defensive_targets [target_name] or 0) - amount
tabela1.cooldowns_defensive_targets[target_name] = (tabela1.cooldowns_defensive_targets[target_name] or 0) - amount
end
for spellid, habilidade in pairs(tabela2.cooldowns_defensive_spells._ActorTable) do
local habilidade_tabela1 = tabela1.cooldowns_defensive_spells:PegaHabilidade (spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
end
@@ -3232,17 +3280,17 @@ atributo_misc.__sub = function(tabela1, tabela2)
tabela1.ress = tabela1.ress - tabela2.ress
for target_name, amount in pairs(tabela2.ress_targets) do
tabela1.ress_targets [target_name] = (tabela1.ress_targets [target_name] or 0) - amount
tabela1.ress_targets[target_name] = (tabela1.ress_targets[target_name] or 0) - amount
end
for spellid, habilidade in pairs(tabela2.ress_spells._ActorTable) do
local habilidade_tabela1 = tabela1.ress_spells:PegaHabilidade (spellid, true, nil, false)
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
end
@@ -3250,7 +3298,7 @@ atributo_misc.__sub = function(tabela1, tabela2)
tabela1.dispell = tabela1.dispell - tabela2.dispell
for target_name, amount in pairs(tabela2.dispell_targets) do
tabela1.dispell_targets [target_name] = (tabela1.dispell_targets [target_name] or 0) - amount
tabela1.dispell_targets[target_name] = (tabela1.dispell_targets[target_name] or 0) - amount
end
for spellid, habilidade in pairs(tabela2.dispell_spells._ActorTable) do
@@ -3259,27 +3307,26 @@ atributo_misc.__sub = function(tabela1, tabela2)
habilidade_tabela1.dispell_oque = habilidade_tabela1.dispell_oque or {}
for _spellid, amount in pairs(habilidade.dispell_oque) do
habilidade_tabela1.dispell_oque [_spellid] = (habilidade_tabela1.dispell_oque [_spellid] or 0) - amount
habilidade_tabela1.dispell_oque[_spellid] = (habilidade_tabela1.dispell_oque[_spellid] or 0) - amount
end
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
for spellid, amount in pairs(tabela2.dispell_oque) do
tabela1.dispell_oque [spellid] = (tabela1.dispell_oque [spellid] or 0) - amount
tabela1.dispell_oque[spellid] = (tabela1.dispell_oque[spellid] or 0) - amount
end
end
if (tabela2.cc_break) then
tabela1.cc_break = tabela1.cc_break - tabela2.cc_break
for target_name, amount in pairs(tabela2.cc_break_targets) do
tabela1.cc_break_targets [target_name] = (tabela1.cc_break_targets [target_name] or 0) - amount
tabela1.cc_break_targets[target_name] = (tabela1.cc_break_targets[target_name] or 0) - amount
end
for spellid, habilidade in pairs(tabela2.cc_break_spells._ActorTable) do
@@ -3287,18 +3334,18 @@ atributo_misc.__sub = function(tabela1, tabela2)
habilidade_tabela1.cc_break_oque = habilidade_tabela1.cc_break_oque or {}
for _spellid, amount in pairs(habilidade.cc_break_oque) do
habilidade_tabela1.cc_break_oque [_spellid] = (habilidade_tabela1.cc_break_oque [_spellid] or 0) - amount
habilidade_tabela1.cc_break_oque[_spellid] = (habilidade_tabela1.cc_break_oque[_spellid] or 0) - amount
end
for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets[target_name] or 0) - amount
end
subtrair_keys (habilidade, habilidade_tabela1)
subtractKeyValues(habilidade, habilidade_tabela1)
end
for spellid, amount in pairs(tabela2.cc_break_oque) do
tabela1.cc_break_oque [spellid] = (tabela1.cc_break_oque [spellid] or 0) - amount
tabela1.cc_break_oque[spellid] = (tabela1.cc_break_oque[spellid] or 0) - amount
end
end
+1 -1
View File
@@ -120,7 +120,7 @@ local habilidade_misc = _detalhes.habilidade_misc
---@return spelltable|nil
function spellContainerClass:GetOrCreateSpell(spellId, bCanCreateSpellIfMissing, cleuToken)
---@type spelltable
local spellTable = self._ActorTable [spellId]
local spellTable = self._ActorTable[spellId]
if (spellTable) then
return spellTable