Skip to content

Commit

Permalink
fixed stupid mistake by registerend and using the wrong Event...
Browse files Browse the repository at this point in the history
thanks @Dathwada for the hint!
  • Loading branch information
fuba82 committed Aug 1, 2024
1 parent a50b2e5 commit 0ca6ca2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions IPAConfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ local addonName, IPA = ...
_G["InstancePortalsAdv"] = IPA

local eventFrame = CreateFrame("FRAME")
eventFrame:RegisterEvent("ADDON_LOADED")
eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
eventFrame:RegisterEvent("PLAYER_LOGIN")

IPASettings = IPASettings or {}

Expand Down Expand Up @@ -116,9 +115,8 @@ function IPA:CreateSettings()
end

eventFrame:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_ENTERING_WORLD" then
local isLogin, isReload = ...
-- Create Settings on "PLAYER_ENTERING_WORLD" because of TomTom Support
if event == "PLAYER_LOGIN" then
-- Create Settings on "PLAYER_LOGIN" because of TomTom Support (TomTom needs to be loaded first)
IPA:CreateSettings()
end
end)

0 comments on commit 0ca6ca2

Please sign in to comment.