Fixed an issue with player names cache getting 'Unknown' from UnitName()

This commit is contained in:
Tercio Jose
2024-08-17 17:59:01 -03:00
committed by andrew6180
parent 11a821729b
commit 0897550b1b
5 changed files with 74 additions and 5 deletions
+49
View File
@@ -583,6 +583,55 @@ function Details222.StartUp.StartMeUp()
Details.cached_specs[UnitGUID("player")] = GetSpecializationInfo(GetSpecialization() or 0)
if (GetExpansionLevel() == 2) then
if (not Details.data_wipes_exp["3"]) then
Details:Msg("New expansion detected, clearing data...")
Details:Destroy(Details.encounter_spell_pool or {})
Details:Destroy(Details.boss_mods_timers or {})
Details:Destroy(Details.spell_school_cache or {})
Details:Destroy(Details.spell_pool or {})
Details:Destroy(Details.npcid_pool or {})
Details:Destroy(Details.current_exp_raid_encounters or {})
Details.data_wipes_exp["3"] = true
Details.frame_background_color[1] = 0.0549
Details.frame_background_color[2] = 0.0549
Details.frame_background_color[3] = 0.0549
Details.frame_background_color[4] = 0.934
if (Details.breakdown_spell_tab.spellcontainer_headers.critpercent) then
Details.breakdown_spell_tab.spellcontainer_headers.critpercent.enabled = true
end
if (Details.breakdown_spell_tab.spellcontainer_headers.uptime) then
Details.breakdown_spell_tab.spellcontainer_headers.uptime.enabled = true
end
if (Details.breakdown_spell_tab.spellcontainer_headers.hits) then
Details.breakdown_spell_tab.spellcontainer_headers.hits.enabled = true
end
Details.breakdown_general.bar_texture = "You Are the Best!"
Details.tooltip.rounded_corner = false
local tooltipBarColor = Details.tooltip.bar_color
tooltipBarColor[1] = 0.129
tooltipBarColor[2] = 0.129
tooltipBarColor[3] = 0.129
tooltipBarColor[4] = 1
local tooltipBackgroundColor = Details.tooltip.background
tooltipBackgroundColor[1] = 0.054
tooltipBackgroundColor[2] = 0.054
tooltipBackgroundColor[3] = 0.054
tooltipBackgroundColor[4] = 0.8
Details.tooltip.fontshadow = true
Details.tooltip.fontsize = 11
end
end
Details.boss_mods_timers.encounter_timers_dbm = Details.boss_mods_timers.encounter_timers_dbm or {}
Details.boss_mods_timers.encounter_timers_bw = Details.boss_mods_timers.encounter_timers_bw or {}