Fixing issue with the Encounter Breakdown showing errors on wow11 and tooltips not clearing the spell list on them.

This commit is contained in:
Tercio Jose
2024-07-10 12:09:23 -03:00
committed by andrew6180
parent d458995b5a
commit bcee5fc71a
2 changed files with 19 additions and 12 deletions
@@ -1,13 +1,17 @@
DETAILS_STORAGE_VERSION = 6
DETAILS_STORAGE_VERSION = 7
function Details:CreateStorageDB()
DetailsDataStorage = {
VERSION = DETAILS_STORAGE_VERSION,
[1] = {}, --normal mode (raid)
[2] = {}, --heroic mode (raid)
[3] = {}, --mythic mode (raid)
[4] = {}, --ascended mode (raid)
normal = {}, --raid difficulties
heroic = {}, --raid difficulties
mythic = {}, --raid difficulties
ascended = {}, --raid difficulties
--[14] = {}, --normal mode (raid)
--[15] = {}, --heroic mode (raid)
--[16] = {}, --mythic mode (raid)
["totalkills"] = {},
["mythic_plus"] = {}, --(dungeons)
["saved_encounters"] = {}, --(a segment)
}
@@ -22,12 +26,10 @@ f:SetScript("OnEvent", function(self, event, addonName)
if (addonName == "Details_DataStorage") then
DetailsDataStorage = DetailsDataStorage or Details:CreateStorageDB()
DetailsDataStorage.Data = {}
if (DetailsDataStorage.VERSION < DETAILS_STORAGE_VERSION) then
--> do revisions
if (DetailsDataStorage.VERSION < 6) then
table.wipe(DetailsDataStorage)
DetailsDataStorage = Details:CreateStorageDB()
end
table.wipe(DetailsDataStorage)
DetailsDataStorage = Details:CreateStorageDB()
end
if (Details and Details.debug) then
@@ -14,9 +14,10 @@ local DETAILS_ATTRIBUTE_DAMAGE = DETAILS_ATTRIBUTE_DAMAGE
local CONST_DETAILS_MODE_GROUP = DETAILS_MODE_GROUP
local DETAILS_SEGMENTTYPE_MYTHICDUNGEON = DETAILS_SEGMENTTYPE_MYTHICDUNGEON
local DETAILS_ATTRIBUTE_MISC = DETAILS_ATTRIBUTE_MISC
local GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local GetSpellInfo = GetSpellInfo
local encounterDetails = _G.EncounterDetailsGlobal
local edFrame = encounterDetails.Frame
@@ -257,6 +258,7 @@ do --~ability ~damage taken by spell
local spellId = bar.spellId
local spellName, _, spellIcon = Details_GetSpellInfo(spellId)
local damageDone = bar.damageDone
local spellTargets = bar.spellTargets
if (not spellTargets) then
return
@@ -282,6 +284,8 @@ do --~ability ~damage taken by spell
local topValue = targetActors[1] and targetActors[1][2]
GameCooltip:Preset(2)
for index, playerDamageTable in ipairs(targetActors) do
local playerName = playerDamageTable[1]
local damageAmount = playerDamageTable[2]
@@ -369,6 +373,7 @@ do --~ability ~damage taken by spell
end
end
--damage taken by spell
local spellDamageScroll = detailsFramework:CreateScrollBox(edFrame, "$parentSpellDamageScroll", spellDamage_RefreshFunc, {}, CONST_BOX_WIDTH, CONST_BOX_HEIGHT_TOP, CONST_LINE_AMOUNT_TOP, CONST_LINE_HEIGHT)
detailsFramework:ReskinSlider(spellDamageScroll)
detailsFramework:ApplyStandardBackdrop(spellDamageScroll)
@@ -1264,4 +1269,4 @@ function encounterDetails.RefreshSummaryPage(combatObject)
encounterDetails.RefreshInterruptsScoll(combatObject)
encounterDetails.RefreshDispelsScoll(combatObject)
encounterDetails.RefreshDeathsScoll(combatObject)
end
end