Skip to content

Commit

Permalink
Fixed not checking for sets when loading or exiting instance
Browse files Browse the repository at this point in the history
  • Loading branch information
derfloh205 committed Dec 1, 2023
1 parent ba8863c commit fefd599
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Main/LoadoutReminder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ LoadoutReminder.MAIN = CreateFrame("Frame")
LoadoutReminder.MAIN:SetScript("OnEvent", function(self, event, ...) self[event](self, ...) end)
LoadoutReminder.MAIN:RegisterEvent("ADDON_LOADED")
LoadoutReminder.MAIN:RegisterEvent("PLAYER_TARGET_CHANGED")
LoadoutReminder.MAIN:RegisterEvent("PLAYER_ENTERING_WORLD")

LoadoutReminder.MAIN.FRAMES = {}

Expand Down Expand Up @@ -222,6 +223,13 @@ end
function LoadoutReminder.MAIN:PLAYER_TARGET_CHANGED()
LoadoutReminder.MAIN.CheckSituations()
end
function LoadoutReminder.MAIN:PLAYER_ENTERING_WORLD(isInitialLogin, isReloadingUi)
-- only when entering/exiting an instance, not on login or reload (thats where ADDON_LOADED fires)
if isInitialLogin or isReloadingUi then
return
end
LoadoutReminder.MAIN.CheckSituations()
end

function LoadoutReminder.MAIN:GetTargetNPCID()
if UnitExists("target") then
Expand Down

0 comments on commit fefd599

Please sign in to comment.