-- Namespace CzechQuestsAddon = {}; CzechQuestsAddon.fontPath = "Interface\\AddOns\\CzechQuests\\Fonts\\" -- Define data CzechQuestsAddon.data = {}; CzechQuestsAddon.data.quest = {}; CzechQuestsAddon.data.item = {}; -- Event handler frame local frame = CreateFrame("Frame") -- OnEvent function for event processing local function OnEvent(self, event, addonName, ...) if event == "ADDON_LOADED" and addonName == 'CzechQuests' then -- Initialize the SavedVariables if it doesn't exist if not CzechQuestsAddon_Store then CzechQuestsAddon_Store = {} end if not CzechQuestsAddon_Store.config then CzechQuestsAddon_Store.config = {} end if not CzechQuestsAddon_Store.config.DEBUG_MODE then CzechQuestsAddon_Store.config.DEBUG_MODE = false; end if not CzechQuestsAddon_Store.config.DARK_MODE then CzechQuestsAddon_Store.config.DARK_MODE = false; end if not CzechQuestsAddon_Store.config.TRANSLATION_FRAME_PRIMARY_HEADER_FONT_SIZE then CzechQuestsAddon_Store.config.TRANSLATION_FRAME_PRIMARY_HEADER_FONT_SIZE = 18; end if not CzechQuestsAddon_Store.config.TRANSLATION_FRAME_SECONDARY_HEADER_FONT_SIZE then CzechQuestsAddon_Store.config.TRANSLATION_FRAME_SECONDARY_HEADER_FONT_SIZE = 16; end if not CzechQuestsAddon_Store.config.TRANSLATION_FRAME_TEXT_FONT_SIZE then CzechQuestsAddon_Store.config.TRANSLATION_FRAME_TEXT_FONT_SIZE = 14; end if not CzechQuestsAddon_Store.config.TRANSLATION_FRAME_HEADER_FONT_FAMILY then CzechQuestsAddon_Store.config.TRANSLATION_FRAME_HEADER_FONT_FAMILY = 'morpheus_cz.ttf'; end if not CzechQuestsAddon_Store.config.TRANSLATION_FRAME_TEXT_FONT_FAMILY then CzechQuestsAddon_Store.config.TRANSLATION_FRAME_TEXT_FONT_FAMILY = 'frizquadratatt_cz.ttf'; end -- Initialize Options CzechQuestsAddon:InitializeOptions() -- Initialize Quests CzechQuestsAddon:InitializeTranslations() -- Unregister the ADDON_LOADED event after handling it self:UnregisterEvent("ADDON_LOADED") end end -- Register the event frame:RegisterEvent("ADDON_LOADED") frame:SetScript("OnEvent", OnEvent)