-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMythicPlusTracker.lua
More file actions
38 lines (31 loc) · 1.05 KB
/
MythicPlusTracker.lua
File metadata and controls
38 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local addonName, addon = ...
-- Haupt-AddOn-Namespace
addon.MythicPlusTracker = addon.MythicPlusTracker or {}
local MPT = addon.MythicPlusTracker
-- AddOn-Status
MPT.isLoaded = false
-- Initialisierungsfunktion
function MPT:Initialize()
if self.isLoaded then
return
end
-- Hier wird später die Hauptlogik für Mythic Plus Tracking stehen
-- Zum Beispiel: Event-Handler für Dungeon-Events, UI-Elemente, etc.
self.isLoaded = true
end
-- Event Frame für die Hauptlogik
local frame = CreateFrame("Frame")
frame:RegisterEvent("ADDON_LOADED")
frame:RegisterEvent("PLAYER_LOGIN")
frame:SetScript("OnEvent", function(self, event, ...)
if event == "ADDON_LOADED" then
local loadedAddonName = ...
if loadedAddonName == addonName then
-- AddOn ist geladen, aber warten auf PLAYER_LOGIN für Initialisierung
end
elseif event == "PLAYER_LOGIN" then
-- Spieler ist eingeloggt, jetzt können wir sicher initialisieren
MPT:Initialize()
frame:UnregisterEvent("PLAYER_LOGIN")
end
end)