From eff831b6ecf56c3a127ae17addc5618f65a3152e Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 4 Oct 2022 22:29:46 -0500 Subject: [PATCH] Work around crash in Wrath Classic client This should be reverted when the game client is fixed. Fixes #8 --- Categories/TooltipScanning.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Categories/TooltipScanning.lua b/Categories/TooltipScanning.lua index f5c5e55..45983e7 100644 --- a/Categories/TooltipScanning.lua +++ b/Categories/TooltipScanning.lua @@ -11,6 +11,8 @@ local UnitName, UnitFactionGroup, UnitPlayerControlled, UnitIsPlayer, UnitIsVisi local InCombatLockdown, GetNumFactions, GetFactionInfo, ExpandFactionHeader, CollapseFactionHeader, GetGuildInfo = InCombatLockdown, GetNumFactions, GetFactionInfo, ExpandFactionHeader, CollapseFactionHeader, GetGuildInfo +local GetClassicExpansionLevel = GetClassicExpansionLevel + DogTag_Unit_funcs[#DogTag_Unit_funcs+1] = function(DogTag_Unit, DogTag) local L = DogTag_Unit.L @@ -35,6 +37,11 @@ local function updateTT(unit) if lastUnit == unit and lastName == name and nextTime < time then return end + -- Parnic: temp: don't do any of this while Wrath Classic is crashing in these functions under certain conditions. + -- https://github.com/parnic/LibDogTag-Unit-3.0/issues/8 + if InCombatLockdown() and GetClassicExpansionLevel and GetClassicExpansionLevel() == LE_EXPANSION_WRATH_OF_THE_LICH_KING then + return + end lastUnit = unit lastName = name nextTime = time + 1