Skip to content

Commit

Permalink
Fix compatibility issue
Browse files Browse the repository at this point in the history
Closes #7
  • Loading branch information
teelolws committed Aug 12, 2022
1 parent 093363d commit d602e71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ShadowlandsSeason4EncounterJournal.lua
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ShadowlandsSeason4EncounterJournal.toc
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d602e71

Please sign in to comment.