From d602e71397c5237ab6083596ab816d804fe8051b Mon Sep 17 00:00:00 2001 From: Teelo <49792789+teelolws@users.noreply.github.com> Date: Sat, 13 Aug 2022 07:44:03 +1200 Subject: [PATCH] Fix compatibility issue Closes https://github.com/teelolws/ShadowlandsSeason4EncounterJournal/issues/7 --- ShadowlandsSeason4EncounterJournal.lua | 9 ++++++--- ShadowlandsSeason4EncounterJournal.toc | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ShadowlandsSeason4EncounterJournal.lua b/ShadowlandsSeason4EncounterJournal.lua index 691bc63..98ff8ce 100644 --- a/ShadowlandsSeason4EncounterJournal.lua +++ b/ShadowlandsSeason4EncounterJournal.lua @@ -1,5 +1,4 @@ -local isShadowlandsSeason4 = C_MythicPlus.GetCurrentSeasonValues() == 8 -if not isShadowlandsSeason4 then return end -- addon obsolete once the season is over! + if not ((GetBuildInfo() == "9.2.5") or (GetBuildInfo() == "9.2.7")) then return end -- addon obsolete in Dragonflight! local SlotFilterToSlotName = { [Enum.ItemSlotFilterType.Head] = INVTYPE_HEAD, @@ -300,6 +299,7 @@ f:SetScript("OnEvent", function(self, event, addonName) EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:Hide() EncounterJournalEncounterFrameInfoLootScrollFrameSlotFilterToggle:Hide() EncounterJournalEncounterFrameInfoDifficulty:Hide() + C_Timer.After(0.1, function() EncounterJournalEncounterFrameInfoDifficulty:Hide() end) local dungeonTable = lootTable.Grimrail if selectedDungeon == IRONDOCKS then dungeonTable = lootTable.IronDocks end @@ -361,8 +361,10 @@ f:SetScript("OnEvent", function(self, event, addonName) -- when the EJ is closed, clear all custom settings local restore + local restore2 EncounterJournal:HookScript("OnHide", function() restore = dropDownOptionSelected + restore2 = selectedDungeon dropDownOptionSelected = nil selectedDungeon = nil end) @@ -371,7 +373,8 @@ f:SetScript("OnEvent", function(self, event, addonName) -- when the EJ is opened back up again, if the custom option was previously selected, select it again EncounterJournal:HookScript("OnShow", function() if restore then - dropDownOptionSelected = true + dropDownOptionSelected = restore + selectedDungeon = restore2 EncounterJournal_TierDropDown_Select() end end) diff --git a/ShadowlandsSeason4EncounterJournal.toc b/ShadowlandsSeason4EncounterJournal.toc index 70bfd58..d744007 100644 --- a/ShadowlandsSeason4EncounterJournal.toc +++ b/ShadowlandsSeason4EncounterJournal.toc @@ -1,7 +1,7 @@ ## Interface: 90205 ## Title: Shadowlands Season 4 Encounter Journal ## Author: Teelo - Jubei'thos (US) -## Version: 9.2.5-009 +## Version: 9.2.5-010 ## Notes: Adds Shadowlands Season 4 Option to Encounter Journal ## X-Curse-Project-ID: 655714 ShadowlandsSeason4EncounterJournal.lua \ No newline at end of file