Fixed an issue where it throws an error when opening the Damage Taken breakdown

This commit is contained in:
Tercio Jose
2023-05-10 22:43:01 -03:00
parent b78b35e557
commit 40d89df26e
6 changed files with 858 additions and 272 deletions
+17 -10
View File
@@ -431,22 +431,29 @@ end
---@param instance instance
function Details222.BreakdownWindow.SendSpellData(data, actorObject, combatObject, instance)
--need to get the tab showing the summary and transmit the data to it
local tab = Details222.BreakdownWindow.CurrentDefaultTab
if (tab) then
local tabButton = Details222.BreakdownWindow.CurrentDefaultTab
if (tabButton) then
--tab is the tab button
if (tab.OnReceiveSpellData) then
tab.OnReceiveSpellData(data, actorObject, combatObject, instance)
if (tabButton.OnReceiveSpellData) then
tabButton.OnReceiveSpellData(data, actorObject, combatObject, instance)
end
end
end
function Details222.BreakdownWindow.SendTargetData(targetList, actorObject, combatObject, instance)
--need to get the tab showing the summary and transmit the data to it
local tab = Details222.BreakdownWindow.CurrentDefaultTab
if (tab) then
--tab is the tab button
if (tab.OnReceiveTargetData) then
tab.OnReceiveTargetData(targetList, actorObject, combatObject, instance)
local tabButton = Details222.BreakdownWindow.CurrentDefaultTab
if (tabButton) then
if (tabButton.OnReceiveTargetData) then
tabButton.OnReceiveTargetData(targetList, actorObject, combatObject, instance)
end
end
end
function Details222.BreakdownWindow.SendGenericData(resultTable, actorObject, combatObject, instance)
local tabButton = Details222.BreakdownWindow.CurrentDefaultTab
if (tabButton) then
if (tabButton.OnReceiveGenericData) then
tabButton.OnReceiveGenericData(resultTable, actorObject, combatObject, instance)
end
end
end