- Fix for ticket #333: error on the new dungeon chart recorder.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
_detalhes.build_counter = 5351
|
||||
_detalhes.build_counter = 5355
|
||||
_detalhes.userversion = "v7.3.5." .. _detalhes.build_counter
|
||||
_detalhes.realversion = 129 --core version
|
||||
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")"
|
||||
|
||||
+22
-17
@@ -165,27 +165,32 @@ function mythicDungeonCharts:OnBossDefeated()
|
||||
local currentCombat = Details:GetCurrentCombat()
|
||||
local segmentType = currentCombat:GetCombatType()
|
||||
local bossInfo = currentCombat:GetBossInfo()
|
||||
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
|
||||
|
||||
if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running and bossInfo) then
|
||||
if (mythicLevel and mythicLevel > 0) then
|
||||
if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running and bossInfo) then
|
||||
|
||||
local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo)
|
||||
tinsert (mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()})
|
||||
mythicDungeonCharts:Debug ("Boss defeated, time saved", currentCombat:GetCombatTime())
|
||||
else
|
||||
if (mythicDungeonCharts.ChartTable.EndTime ~= -1) then
|
||||
local now = time()
|
||||
--check if the dungeon just ended
|
||||
if (mythicDungeonCharts.ChartTable.EndTime + 2 >= now) then
|
||||
|
||||
if (bossInfo) then
|
||||
local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo)
|
||||
tinsert (mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()})
|
||||
mythicDungeonCharts:Debug ("Boss defeated, time saved, but used time aproximation:", mythicDungeonCharts.ChartTable.EndTime + 2, now, currentCombat:GetCombatTime())
|
||||
end
|
||||
end
|
||||
local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo)
|
||||
tinsert (mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()})
|
||||
mythicDungeonCharts:Debug ("Boss defeated, time saved", currentCombat:GetCombatTime())
|
||||
else
|
||||
mythicDungeonCharts:Debug ("Boss defeated, but no chart capture is running")
|
||||
if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.EndTime ~= -1) then
|
||||
local now = time()
|
||||
--check if the dungeon just ended
|
||||
if (mythicDungeonCharts.ChartTable.EndTime + 2 >= now) then
|
||||
|
||||
if (bossInfo) then
|
||||
local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo)
|
||||
tinsert (mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()})
|
||||
mythicDungeonCharts:Debug ("Boss defeated, time saved, but used time aproximation:", mythicDungeonCharts.ChartTable.EndTime + 2, now, currentCombat:GetCombatTime())
|
||||
end
|
||||
end
|
||||
else
|
||||
mythicDungeonCharts:Debug ("Boss defeated, but no chart capture is running")
|
||||
end
|
||||
end
|
||||
else
|
||||
mythicDungeonCharts:Debug ("Boss defeated, but isn't a mythic dungeon boss fight")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user