From f8818ce057916a638d9897a94483c9f5ff5ea351 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Sun, 5 May 2024 11:15:15 -0300 Subject: [PATCH] Fixed an issue with CATA where hovering over the spec icon would result on an error. --- boot.lua | 4 ++-- frames/window_main.lua | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/boot.lua b/boot.lua index 488695255..12429d501 100644 --- a/boot.lua +++ b/boot.lua @@ -18,8 +18,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - Details.build_counter = 12699 - Details.alpha_build_counter = 12699 --if this is higher than the regular counter, use it instead + Details.build_counter = 12700 + Details.alpha_build_counter = 12700 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter diff --git a/frames/window_main.lua b/frames/window_main.lua index 9c3992df3..a715fb71b 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -2094,6 +2094,8 @@ local iconFrame_OnEnter = function(self) instance:BuildInstanceBarTooltip(self) + local bIsClassic = (DetailsFramework.IsClassicWow() or DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow() or DetailsFramework.IsCataWow()) + local classIcon, classL, classR, classT, classB = Details:GetClassIcon(class) local specId, specName, specDescription, specIcon, specRole, specClass = DetailsFramework.GetSpecializationInfoByID(spec or 0) --thanks pas06 @@ -2121,9 +2123,9 @@ local iconFrame_OnEnter = function(self) local talentString = "" if (type(talents) == "table") then - if (talents and not (DetailsFramework.IsClassicWow() or DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow())) then + if (talents and not bIsClassic) then for i = 1, #talents do - local talentID, talentName, texture, selected, available = GetTalentInfoByID(talents [i]) + local talentID, talentName, texture, selected, available = GetTalentInfoByID(talents[i]) if (texture) then talentString = talentString .. " |T" .. texture .. ":" .. 24 .. ":" .. 24 ..":0:0:64:64:4:60:4:60|t" end @@ -2199,7 +2201,7 @@ local iconFrame_OnEnter = function(self) local lineHeight = 21 - if (RaiderIO) then + if (RaiderIO and not bIsClassic) then local addedInfo = false local playerName, playerRealm = actorName:match("(%w+)%-(%w+)")