Fixed issue with nested pets which wasn't showing when pressing the arrow in the bar

This commit is contained in:
Tercio Jose
2023-05-01 21:30:16 -03:00
parent 4ccf34b390
commit ba267b3eca
9 changed files with 290 additions and 157 deletions
+13
View File
@@ -1241,6 +1241,7 @@
end
if (_trinket_data_cache[spellId] and _in_combat) then
---@type trinketdata
local thisData = _trinket_data_cache[spellId]
if (thisData.lastCombatId == _global_combat_counter) then
if (thisData.lastPlayerName == sourceName) then
@@ -1265,6 +1266,18 @@
thisData.lastActivation = time
thisData.lastPlayerName = sourceName
end
if (_current_combat.trinketProcs) then
local playerTrinketData = _current_combat.trinketProcs[sourceName] or {}
_current_combat.trinketProcs[sourceName] = playerTrinketData
local trinketData = playerTrinketData[spellId] or {cooldown = 0, total = 0}
playerTrinketData[spellId] = trinketData
if (trinketData.cooldown < time) then
trinketData.cooldown = time + 20
trinketData.total = trinketData.total + 1
end
end
end
return _spell_damage_func(spellTable, targetSerial, targetName, targetFlags, amount, sourceName, resisted, blocked, absorbed, critical, glacing, token, isoffhand, isreflected)