diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 5a883308..4448fc17 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("actionbar", 20400, function () +pfUI:RegisterModule("actionbar", "vanilla:tbc", function () local _, class = UnitClass("player") local color = RAID_CLASS_COLORS[class] local cr, cg, cb = color.r , color.g, color.b diff --git a/modules/addonbuttons.lua b/modules/addonbuttons.lua index f798e729..d0918f3b 100644 --- a/modules/addonbuttons.lua +++ b/modules/addonbuttons.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("addonbuttons", function () +pfUI:RegisterModule("addonbuttons", "vanilla", function () if not pfUI.minimap then return end if C.abuttons.enable == "0" then return end diff --git a/modules/addons.lua b/modules/addons.lua index da1356dd..fbb009ed 100644 --- a/modules/addons.lua +++ b/modules/addons.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("addons", 20400, function () +pfUI:RegisterModule("addons", "vanilla:tbc", function () -- add main menu button local pfUIAddonButton = CreateFrame("Button", "GameMenuButtonPFUIAddOns", GameMenuFrame, "GameMenuButtonTemplate") pfUIAddonButton:SetPoint("TOP", 0, -32) diff --git a/modules/afkcam.lua b/modules/afkcam.lua index 416107aa..c94f78da 100644 --- a/modules/afkcam.lua +++ b/modules/afkcam.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("afkcam", 20400, function () +pfUI:RegisterModule("afkcam", "vanilla:tbc", function () local MARKED_AFK_CAPTURE = SanitizePattern(MARKED_AFK_MESSAGE) local social_chats = { "CHAT_MSG_SAY", diff --git a/modules/autoshift.lua b/modules/autoshift.lua index b8bafed6..1cff3d7d 100644 --- a/modules/autoshift.lua +++ b/modules/autoshift.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("autoshift", 11200, function () +pfUI:RegisterModule("autoshift", "vanilla", function () pfUI.autoshift = CreateFrame("Frame") pfUI.autoshift:RegisterEvent("UI_ERROR_MESSAGE") diff --git a/modules/autovendor.lua b/modules/autovendor.lua index cc8ab305..379fda65 100644 --- a/modules/autovendor.lua +++ b/modules/autovendor.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("autovendor", 20400, function () +pfUI:RegisterModule("autovendor", "vanilla:tbc", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/modules/bags.lua b/modules/bags.lua index 47006935..6dc6110f 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("bags", 20400, function () +pfUI:RegisterModule("bags", "vanilla:tbc", function () local default_border = C.appearance.border.default if C.appearance.border.bags ~= "-1" then default_border = C.appearance.border.bags diff --git a/modules/bubbles.lua b/modules/bubbles.lua index 26ded064..e029f395 100644 --- a/modules/bubbles.lua +++ b/modules/bubbles.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("bubbles", 20400, function () +pfUI:RegisterModule("bubbles", "vanilla:tbc", function () local alpha = tonumber(C.chat.bubbles.alpha) diff --git a/modules/buff.lua b/modules/buff.lua index 07becc2b..8851fd75 100644 --- a/modules/buff.lua +++ b/modules/buff.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("buff", 20400, function () +pfUI:RegisterModule("buff", "vanilla:tbc", function () -- Hide Blizz BuffFrame:Hide() BuffFrame:UnregisterAllEvents() diff --git a/modules/buffwatch.lua b/modules/buffwatch.lua index e37ba310..12306925 100644 --- a/modules/buffwatch.lua +++ b/modules/buffwatch.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("buffwatch", function () +pfUI:RegisterModule("buffwatch", "vanilla", function () local border = C.appearance.border.default local scanner = libtipscan:GetScanner("buffwatch") diff --git a/modules/castbar.lua b/modules/castbar.lua index 391ce5a6..b92f5de1 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("castbar", 20400, function () +pfUI:RegisterModule("castbar", "vanilla:tbc", function () local font = C.castbar.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default local font_size = C.castbar.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size diff --git a/modules/chat.lua b/modules/chat.lua index 5315bc15..ee92564e 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("chat", 20400, function () +pfUI:RegisterModule("chat", "vanilla:tbc", function () local panelfont = C.panel.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default local panelfont_size = C.panel.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size diff --git a/modules/chatcopy.lua b/modules/chatcopy.lua index a06408b4..a23fd14c 100644 --- a/modules/chatcopy.lua +++ b/modules/chatcopy.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("chatcopy", 20400, function () +pfUI:RegisterModule("chatcopy", "vanilla:tbc", function () -- temporary till the new API is merged local function CreateScrollFrame(name, parent) local f = CreateFrame("ScrollFrame", name, parent) diff --git a/modules/combopoints.lua b/modules/combopoints.lua index 3f8a3f91..3b014bae 100644 --- a/modules/combopoints.lua +++ b/modules/combopoints.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("combopoints", function () +pfUI:RegisterModule("combopoints", "vanilla", function () -- Hide Blizzard combo point frame and unregister all events to prevent it from popping up again ComboFrame:Hide() ComboFrame:UnregisterAllEvents() diff --git a/modules/cooldown.lua b/modules/cooldown.lua index 8e077ec1..14cb1334 100644 --- a/modules/cooldown.lua +++ b/modules/cooldown.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("cooldown", 20400, function () +pfUI:RegisterModule("cooldown", "vanilla:tbc", function () -- cache values local lowcolor = {strsplit(",", C.appearance.cd.lowcolor)} local normalcolor = {strsplit(",", C.appearance.cd.normalcolor)} diff --git a/modules/easteregg.lua b/modules/easteregg.lua index 063528df..f7253f1f 100644 --- a/modules/easteregg.lua +++ b/modules/easteregg.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("easteregg", 20400, function () +pfUI:RegisterModule("easteregg", "vanilla:tbc", function () -- merry x-mas! if date("%m%d") == "1224" or date("%m%d") == "1225" then local title = (UnitFactionGroup("player") == "Horde") and PVP_RANK_18_0 or PVP_RANK_18_1 diff --git a/modules/eqcompare.lua b/modules/eqcompare.lua index 865fc63a..3d93d988 100644 --- a/modules/eqcompare.lua +++ b/modules/eqcompare.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("eqcompare", function () +pfUI:RegisterModule("eqcompare", "vanilla", function () local loc = pfUI.cache["locale"] for key, value in pairs(L["itemtypes"]) do setglobal(key, value) end INVTYPE_WEAPON_OTHER = INVTYPE_WEAPON.."_other"; diff --git a/modules/farmmode.lua b/modules/farmmode.lua index 53d4f256..a2f151ef 100644 --- a/modules/farmmode.lua +++ b/modules/farmmode.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("farmmode", 20400, function () +pfUI:RegisterModule("farmmode", "vanilla:tbc", function () local function ToggleFarmMode() if pfUI.farmmap:IsShown() then pfUI.farmmap:Hide() diff --git a/modules/feigndeath.lua b/modules/feigndeath.lua index 35768ee8..0ee12911 100644 --- a/modules/feigndeath.lua +++ b/modules/feigndeath.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("feigndeath", 20400, function () +pfUI:RegisterModule("feigndeath", "vanilla:tbc", function () local cache = { } local scanner = libtipscan:GetScanner("feigndeath") local healthbar = scanner:GetChildren() diff --git a/modules/firstrun.lua b/modules/firstrun.lua index 88865be2..b9507d0d 100644 --- a/modules/firstrun.lua +++ b/modules/firstrun.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("firstrun", 20400, function () +pfUI:RegisterModule("firstrun", "vanilla:tbc", function () pfUI.firstrun = CreateFrame("Frame", "pfFirstRunWizard", UIParent) pfUI.firstrun.steps = {} diff --git a/modules/focus.lua b/modules/focus.lua index 66bebcb4..bcfd5d26 100644 --- a/modules/focus.lua +++ b/modules/focus.lua @@ -77,7 +77,7 @@ function SlashCmdList.PFSWAPFOCUS(msg) end end -pfUI:RegisterModule("focus", function () +pfUI:RegisterModule("focus", "vanilla", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/gm.lua b/modules/gm.lua index 71b23e35..c6d5b50d 100644 --- a/modules/gm.lua +++ b/modules/gm.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("gm", function () +pfUI:RegisterModule("gm", "vanilla", function () -- do not load by default if C.gm.disable == "1" then return end diff --git a/modules/group.lua b/modules/group.lua index 212f2459..a24b750d 100644 --- a/modules/group.lua +++ b/modules/group.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("group", 20400, function () +pfUI:RegisterModule("group", "vanilla:tbc", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/gui.lua b/modules/gui.lua index e6c6815c..57c3d85a 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("gui", 20400, function () +pfUI:RegisterModule("gui", "vanilla:tbc", function () local Reload, U, PrepareDropDownButton, CreateConfig, CreateTabFrame, CreateArea, CreateGUIEntry, EntryUpdate -- "searchDB" gets populated when CreateConfig is called. The table holds diff --git a/modules/hdgraphic.lua b/modules/hdgraphic.lua index 2f5890ac..d999c9e9 100644 --- a/modules/hdgraphic.lua +++ b/modules/hdgraphic.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("hdgraphic", function () +pfUI:RegisterModule("hdgraphic", "vanilla", function () -- inject video settings to provide advanced slider values _G.OptionsFrameSliders[3].maxValue = 15 local HookSetWorldDetail = SetWorldDetail diff --git a/modules/hoverbind.lua b/modules/hoverbind.lua index cae747c2..b41a5103 100644 --- a/modules/hoverbind.lua +++ b/modules/hoverbind.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("hoverbind", function () +pfUI:RegisterModule("hoverbind", "vanilla", function () local default_border = C.appearance.border.default local keymap = { -- buttons to binding association diff --git a/modules/hunterbar.lua b/modules/hunterbar.lua index 9e4fa75d..45add26d 100644 --- a/modules/hunterbar.lua +++ b/modules/hunterbar.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("hunterbar", function () +pfUI:RegisterModule("hunterbar", "vanilla", function () local _,class = UnitClass("player") if class ~= "HUNTER" or C.bars.hunterbar == "0" then return end diff --git a/modules/infight.lua b/modules/infight.lua index 7eb6e845..057cfbfd 100644 --- a/modules/infight.lua +++ b/modules/infight.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("infight", 20400, function () +pfUI:RegisterModule("infight", "vanilla:tbc", function () local default_border = C.appearance.border.default if C.appearance.border.unitframes ~= "-1" then default_border = C.appearance.border.unitframes diff --git a/modules/itemclick.lua b/modules/itemclick.lua index cc5bcb79..4dd6681d 100644 --- a/modules/itemclick.lua +++ b/modules/itemclick.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("itemclick", function () +pfUI:RegisterModule("itemclick", "vanilla", function () -- small module that tries to decide if an item should be used or dropped into -- the auctionhouse search or trade window diff --git a/modules/loot.lua b/modules/loot.lua index 4cf9a7cc..04f0ae10 100644 --- a/modules/loot.lua +++ b/modules/loot.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("loot", 20400, function () +pfUI:RegisterModule("loot", "vanilla:tbc", function () pfUI.loot = CreateFrame("Frame", "pfLootFrame", UIParent) pfUI.loot:Hide() pfUI.loot:SetFrameStrata("DIALOG") diff --git a/modules/map.lua b/modules/map.lua index cb8116a4..d32c35c0 100644 --- a/modules/map.lua +++ b/modules/map.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("map", 20400, function () +pfUI:RegisterModule("map", "vanilla:tbc", function () table.insert(UISpecialFrames, "WorldMapFrame") function _G.ToggleWorldMap() diff --git a/modules/mapreveal.lua b/modules/mapreveal.lua index d5e01d5e..e524a75c 100644 --- a/modules/mapreveal.lua +++ b/modules/mapreveal.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("mapreveal", function () +pfUI:RegisterModule("mapreveal", "vanilla", function () -- do not load if other map addon is loaded if Cartographer then return end if METAMAP_TITLE then return end diff --git a/modules/minimap.lua b/modules/minimap.lua index 137bfb09..094d90f0 100644 --- a/modules/minimap.lua +++ b/modules/minimap.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("minimap", 20400, function () +pfUI:RegisterModule("minimap", "vanilla:tbc", function () local border = tonumber(pfUI_config.appearance.border.default) MinimapToggleButton:Hide() MinimapBorderTop:Hide() diff --git a/modules/mirrortimers.lua b/modules/mirrortimers.lua index e938ccf0..ee7becd8 100644 --- a/modules/mirrortimers.lua +++ b/modules/mirrortimers.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("mirrortimers", function () +pfUI:RegisterModule("mirrortimers", "vanilla", function () for i = 1, MIRRORTIMER_NUMTIMERS do local mirrorTimer = _G["MirrorTimer"..i] local statusBar = _G["MirrorTimer"..i.."StatusBar"] diff --git a/modules/mouseover.lua b/modules/mouseover.lua index f35d0daf..7eacce86 100644 --- a/modules/mouseover.lua +++ b/modules/mouseover.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("mouseover", function () +pfUI:RegisterModule("mouseover", "vanilla", function () pfUI.uf.mouseover = CreateFrame("Frame", "pfMouseOver", UIParent) _G.SLASH_PFCAST1, _G.SLASH_PFCAST2 = "/pfcast", "/pfmouse" diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 616aaef9..39aca9fb 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("nameplates", 20400, function () +pfUI:RegisterModule("nameplates", "vanilla:tbc", function () local font = C.nameplates.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size local inactive_alpha = tonumber(C.nameplates.notargalpha) diff --git a/modules/panel.lua b/modules/panel.lua index b88eb179..05ba84a5 100644 --- a/modules/panel.lua +++ b/modules/panel.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("panel", 20400, function() +pfUI:RegisterModule("panel", "vanilla:tbc", function() -- initialize gold cache if not yet happened pfUI_cache["gold"] = pfUI_cache["gold"] or {} diff --git a/modules/pet.lua b/modules/pet.lua index b3b253d9..c60b0047 100644 --- a/modules/pet.lua +++ b/modules/pet.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("pet", 20400, function () +pfUI:RegisterModule("pet", "vanilla:tbc", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/pettarget.lua b/modules/pettarget.lua index 7cde7d78..336be45c 100644 --- a/modules/pettarget.lua +++ b/modules/pettarget.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("pettarget", 20400, function () +pfUI:RegisterModule("pettarget", "vanilla:tbc", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/pixelperfect.lua b/modules/pixelperfect.lua index 03719bf6..99c1f8a1 100644 --- a/modules/pixelperfect.lua +++ b/modules/pixelperfect.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("pixelperfect", function () +pfUI:RegisterModule("pixelperfect", "vanilla", function () -- pixel perfect local function pixelperfect() local conf = tonumber(C.global.pixelperfect) diff --git a/modules/player.lua b/modules/player.lua index ba430c7f..8bdf2867 100644 --- a/modules/player.lua +++ b/modules/player.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("player", 20400, function () +pfUI:RegisterModule("player", "vanilla:tbc", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/prediction.lua b/modules/prediction.lua index bc9541f2..6b01a43d 100644 --- a/modules/prediction.lua +++ b/modules/prediction.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("prediction", function () +pfUI:RegisterModule("prediction", "vanilla", function () local heals = {} local ress = {} local events = {} diff --git a/modules/raid.lua b/modules/raid.lua index b441837d..9aa1c3cf 100644 --- a/modules/raid.lua +++ b/modules/raid.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("raid", 20400, function () +pfUI:RegisterModule("raid", "vanilla:tbc", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/roll.lua b/modules/roll.lua index 9a49f671..2d5ad2bd 100644 --- a/modules/roll.lua +++ b/modules/roll.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("roll", 20400, function () +pfUI:RegisterModule("roll", "vanilla:tbc", function () pfUI.roll = CreateFrame("Frame", "pfLootRoll", UIParent) pfUI.roll.frames = {} diff --git a/modules/screenshot.lua b/modules/screenshot.lua index ccaa4568..d6ac5b8f 100644 --- a/modules/screenshot.lua +++ b/modules/screenshot.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("screenshot", function () +pfUI:RegisterModule("screenshot", "vanilla", function () if C.screenshot.interval == "0" and C.screenshot.levelup == "0" and C.screenshot.pvprank == "0" diff --git a/modules/sellvalue.lua b/modules/sellvalue.lua index cf2c8266..1b142a23 100644 --- a/modules/sellvalue.lua +++ b/modules/sellvalue.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("sellvalue", function () +pfUI:RegisterModule("sellvalue", "vanilla", function () pfUI.sellvalue = CreateFrame( "Frame" , "pfGameTooltip", GameTooltip ) pfUI.sellvalue:SetScript("OnHide", function() diff --git a/modules/share.lua b/modules/share.lua index 178263f0..4b6f055f 100644 --- a/modules/share.lua +++ b/modules/share.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("share", 20400, function () +pfUI:RegisterModule("share", "vanilla:tbc", function () local function serialize(tbl, comp, name, ignored, spacing) local spacing = spacing or "" local match = nil diff --git a/modules/skin.lua b/modules/skin.lua index 1dde80f4..0e19c310 100644 --- a/modules/skin.lua +++ b/modules/skin.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("skin", 20400, function () +pfUI:RegisterModule("skin", "vanilla:tbc", function () -- align UIParent panels pfUI.panelalign = CreateFrame("Frame", "pfUIParentPanelAlign", UIParent) pfUI.panelalign:SetScript("OnUpdate", function() diff --git a/modules/socialmod.lua b/modules/socialmod.lua index 981eb471..cb6ae6e0 100644 --- a/modules/socialmod.lua +++ b/modules/socialmod.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("socialmod", function () +pfUI:RegisterModule("socialmod", "vanilla", function () local playerdb = _G.pfUI_playerDB pfUI.socialmod = CreateFrame("Frame", "pfSocialMod", UIParent) pfUI.socialmod:RegisterEvent("CHAT_MSG_SYSTEM") diff --git a/modules/target.lua b/modules/target.lua index b740fe2d..6ac7494c 100644 --- a/modules/target.lua +++ b/modules/target.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("target", 20400, function () +pfUI:RegisterModule("target", "vanilla:tbc", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/targettarget.lua b/modules/targettarget.lua index a54cadf4..32a19006 100644 --- a/modules/targettarget.lua +++ b/modules/targettarget.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("targettarget", 20400, function () +pfUI:RegisterModule("targettarget", "vanilla:tbc", function () -- do not go further on disabled UFs if C.unitframes.disable == "1" then return end diff --git a/modules/thirdparty.lua b/modules/thirdparty.lua index 825cf172..a164b4a4 100644 --- a/modules/thirdparty.lua +++ b/modules/thirdparty.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("thirdparty", function () +pfUI:RegisterModule("thirdparty", "vanilla", function () pfUI.thirdparty = {} pfUI.thirdparty.meters = {} pfUI.thirdparty.meters.damage = false diff --git a/modules/tooltip.lua b/modules/tooltip.lua index bbd49806..7c212089 100644 --- a/modules/tooltip.lua +++ b/modules/tooltip.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("tooltip", 20400, function () +pfUI:RegisterModule("tooltip", "vanilla:tbc", function () pfUI.tooltip = CreateFrame('Frame', "pfTooltip", GameTooltip) pfUI.tooltip.anchorframe = CreateFrame('Frame', "pfTooltipAnchor", UIParent) diff --git a/modules/tracking.lua b/modules/tracking.lua index 96f772e2..e9ab777d 100644 --- a/modules/tracking.lua +++ b/modules/tracking.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("tracking", function () +pfUI:RegisterModule("tracking", "vanilla", function () MINIMAP_TRACKING_FRAME:UnregisterAllEvents() MINIMAP_TRACKING_FRAME:Hide() diff --git a/modules/uf_tukui.lua b/modules/uf_tukui.lua index 8bdc0aa6..ed95c1b1 100644 --- a/modules/uf_tukui.lua +++ b/modules/uf_tukui.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("uf_tukui", function () +pfUI:RegisterModule("uf_tukui", "vanilla:tbc", function () if C.unitframes.disable == "1" or C.unitframes.layout ~= "tukui" then return end -- update player layout diff --git a/modules/unlock.lua b/modules/unlock.lua index 35fd59ae..4bf84d28 100644 --- a/modules/unlock.lua +++ b/modules/unlock.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("unlock", 20400, function () +pfUI:RegisterModule("unlock", "vanilla:tbc", function () -- grouped frames local clusters = { -- Name Shift Ctrl diff --git a/modules/unusable.lua b/modules/unusable.lua index 4989f787..c2a6e861 100644 --- a/modules/unusable.lua +++ b/modules/unusable.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("unusable", function () +pfUI:RegisterModule("unusable", "vanilla", function () if not pfUI.bag then return end if C.appearance.bags.unusable ~= "1" then return end diff --git a/modules/updatenotify.lua b/modules/updatenotify.lua index 14038f49..a88730dd 100644 --- a/modules/updatenotify.lua +++ b/modules/updatenotify.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("updatenotify", 20400, function () +pfUI:RegisterModule("updatenotify", "vanilla:tbc", function () local alreadyshown = false local localversion = tonumber(pfUI.version.major*10000 + pfUI.version.minor*100 + pfUI.version.fix) local remoteversion = tonumber(pfUI_init.updateavailable) or 0 diff --git a/modules/whisperproxy.lua b/modules/whisperproxy.lua index c6ffd6aa..5fbe557f 100644 --- a/modules/whisperproxy.lua +++ b/modules/whisperproxy.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("whisperproxy", function () +pfUI:RegisterModule("whisperproxy", "vanilla", function () if not pfUI.chat then return end local proxy = CreateFrame("Button", "pfWhisperProxy", pfUI.chat.left.panelTop) diff --git a/modules/xpbar.lua b/modules/xpbar.lua index 1a12b46a..3835c04f 100644 --- a/modules/xpbar.lua +++ b/modules/xpbar.lua @@ -1,4 +1,4 @@ -pfUI:RegisterModule("xpbar", 20400, function () +pfUI:RegisterModule("xpbar", "vanilla:tbc", function () local xp_timeout = tonumber(C.panel.xp.xp_timeout) local xp_width = C.panel.xp.xp_width diff --git a/pfUI.lua b/pfUI.lua index 9ea58473..68dab56f 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -75,7 +75,19 @@ end}) -- cache client version local _, _, _, client = GetBuildInfo() -pfUI.client = client or 11200 +client = client or 11200 + +-- detect client expansion +if client >= 20000 and client <= 20400 then + pfUI.expansion = "tbc" + pfUI.client = client +elseif client >= 30000 and client <= 30300 then + pfUI.expansion = "wotlk" + pfUI.client = client +else + pfUI.expansion = "vanilla" + pfUI.client = client +end -- setup pfUI namespace setmetatable(pfUI.env, {__index = getfenv(0)}) @@ -196,10 +208,12 @@ function pfUI:GetEnvironment() end function pfUI:RegisterModule(name, a2, a3) - local hasv = type(a2) == "number" - local func, version = hasv and a3 or a2, hasv and a2 or 11200 - if pfUI.client > version then return end if pfUI.module[name] then return end + local hasv = type(a2) == "string" + local func, version = hasv and a3 or a2, hasv and a2 or "vanilla:tbc:wotlk" + + -- check for client compatibility + if not strfind(version, pfUI.expansion) then return end pfUI.module[name] = func table.insert(pfUI.modules, name) @@ -209,10 +223,12 @@ function pfUI:RegisterModule(name, a2, a3) end function pfUI:RegisterSkin(name, a2, a3) - local hasv = type(a2) == "number" - local func, version = hasv and a3 or a2, hasv and a2 or 11200 - if pfUI.client > version then return end if pfUI.skin[name] then return end + local hasv = type(a2) == "string" + local func, version = hasv and a3 or a2, hasv and a2 or "vanilla:tbc:wotlk" + + -- check for client compatibility + if not strfind(version, pfUI.expansion) then return end pfUI.skin[name] = func table.insert(pfUI.skins, name) diff --git a/skins/blizzard/auction.lua b/skins/blizzard/auction.lua index ab5d77ae..77a57559 100644 --- a/skins/blizzard/auction.lua +++ b/skins/blizzard/auction.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Auctionhouse", function () +pfUI:RegisterSkin("Auctionhouse", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/battlefield.lua b/skins/blizzard/battlefield.lua index 6c8c67f4..040545fa 100644 --- a/skins/blizzard/battlefield.lua +++ b/skins/blizzard/battlefield.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Battlefield", function () +pfUI:RegisterSkin("Battlefield", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/battlefield_minimap.lua b/skins/blizzard/battlefield_minimap.lua index 6a1a9813..663376cf 100644 --- a/skins/blizzard/battlefield_minimap.lua +++ b/skins/blizzard/battlefield_minimap.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Battlefield Minimap", function () +pfUI:RegisterSkin("Battlefield Minimap", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) HookAddonOrVariable("Blizzard_BattlefieldMinimap", function() diff --git a/skins/blizzard/battlefield_score.lua b/skins/blizzard/battlefield_score.lua index 18a2246e..28f681e4 100644 --- a/skins/blizzard/battlefield_score.lua +++ b/skins/blizzard/battlefield_score.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Battlefield Score", function () +pfUI:RegisterSkin("Battlefield Score", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/character.lua b/skins/blizzard/character.lua index ccb3c1d1..12166343 100644 --- a/skins/blizzard/character.lua +++ b/skins/blizzard/character.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Character", function () +pfUI:RegisterSkin("Character", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/dressup.lua b/skins/blizzard/dressup.lua index aac83ded..a01af7b2 100644 --- a/skins/blizzard/dressup.lua +++ b/skins/blizzard/dressup.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Dress Up Frame", function () +pfUI:RegisterSkin("Dress Up Frame", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/friends.lua b/skins/blizzard/friends.lua index 84a0570b..b20e9b9d 100644 --- a/skins/blizzard/friends.lua +++ b/skins/blizzard/friends.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Friends", function () +pfUI:RegisterSkin("Friends", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/game_menu.lua b/skins/blizzard/game_menu.lua index 18818c60..10528e4f 100644 --- a/skins/blizzard/game_menu.lua +++ b/skins/blizzard/game_menu.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Game Menu", 20400, function () +pfUI:RegisterSkin("Game Menu", "vanilla:tbc", function () StripTextures(GameMenuFrame) CreateBackdrop(GameMenuFrame, nil, true, .75) CreateBackdropShadow(GameMenuFrame) diff --git a/skins/blizzard/gossipquest.lua b/skins/blizzard/gossipquest.lua index 1c62f234..3c5997bb 100644 --- a/skins/blizzard/gossipquest.lua +++ b/skins/blizzard/gossipquest.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Gossip and Quest", function () +pfUI:RegisterSkin("Gossip and Quest", "vanilla", function () local frames = {'Quest', 'Gossip'} local panels = {'Greeting', 'Detail', 'Progress', 'Reward'} local buttons = { diff --git a/skins/blizzard/guild_registrar.lua b/skins/blizzard/guild_registrar.lua index 095682f2..86823e64 100644 --- a/skins/blizzard/guild_registrar.lua +++ b/skins/blizzard/guild_registrar.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Guild Registrar", function () +pfUI:RegisterSkin("Guild Registrar", "vanilla", function () StripTextures(GuildRegistrarFrame) StripTextures(GuildRegistrarGreetingFrame) CreateBackdrop(GuildRegistrarFrame, nil, nil, .75) diff --git a/skins/blizzard/help.lua b/skins/blizzard/help.lua index 75e4ef87..c96bb313 100644 --- a/skins/blizzard/help.lua +++ b/skins/blizzard/help.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Help", function () +pfUI:RegisterSkin("Help", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/inspect.lua b/skins/blizzard/inspect.lua index e72c031f..03a25d08 100644 --- a/skins/blizzard/inspect.lua +++ b/skins/blizzard/inspect.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Inspect", function () +pfUI:RegisterSkin("Inspect", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/itemtext.lua b/skins/blizzard/itemtext.lua index 0c98f2c8..f3fc2de6 100644 --- a/skins/blizzard/itemtext.lua +++ b/skins/blizzard/itemtext.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Books", function () +pfUI:RegisterSkin("Books", "vanilla", function () StripTextures(ItemTextFrame) CreateBackdrop(ItemTextFrame, nil, nil, .75) CreateBackdropShadow(ItemTextFrame) diff --git a/skins/blizzard/keybindings.lua b/skins/blizzard/keybindings.lua index 54dba7d7..55884e48 100644 --- a/skins/blizzard/keybindings.lua +++ b/skins/blizzard/keybindings.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("KeyBindings", function () +pfUI:RegisterSkin("KeyBindings", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/macro.lua b/skins/blizzard/macro.lua index bb90f62c..7a1e32ec 100644 --- a/skins/blizzard/macro.lua +++ b/skins/blizzard/macro.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Macro", function () +pfUI:RegisterSkin("Macro", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/mail.lua b/skins/blizzard/mail.lua index 0e20f6a5..996be3db 100644 --- a/skins/blizzard/mail.lua +++ b/skins/blizzard/mail.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Mailbox", function () +pfUI:RegisterSkin("Mailbox", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 local skin = CreateFrame("Frame") diff --git a/skins/blizzard/merchant.lua b/skins/blizzard/merchant.lua index 2a9af261..f6e75c36 100644 --- a/skins/blizzard/merchant.lua +++ b/skins/blizzard/merchant.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Merchant", function () +pfUI:RegisterSkin("Merchant", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/miscellaneous.lua b/skins/blizzard/miscellaneous.lua index 56fc7ce4..c16d3562 100644 --- a/skins/blizzard/miscellaneous.lua +++ b/skins/blizzard/miscellaneous.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Stack Split", function () +pfUI:RegisterSkin("Stack Split", "vanilla", function () StripTextures(StackSplitFrame) CreateBackdrop(StackSplitFrame, nil, nil, .75) CreateBackdropShadow(StackSplitFrame) diff --git a/skins/blizzard/options-interface.lua b/skins/blizzard/options-interface.lua index 8058024c..a70fab6a 100644 --- a/skins/blizzard/options-interface.lua +++ b/skins/blizzard/options-interface.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Options - Interface", function () +pfUI:RegisterSkin("Options - Interface", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/options-sound.lua b/skins/blizzard/options-sound.lua index 2009498c..f0c934ed 100644 --- a/skins/blizzard/options-sound.lua +++ b/skins/blizzard/options-sound.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Options - Sound", function () +pfUI:RegisterSkin("Options - Sound", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/options-video.lua b/skins/blizzard/options-video.lua index 21d86d7b..d4816fe3 100644 --- a/skins/blizzard/options-video.lua +++ b/skins/blizzard/options-video.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Options - Video", function () +pfUI:RegisterSkin("Options - Video", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/petition.lua b/skins/blizzard/petition.lua index fefc4afb..9f573bfe 100644 --- a/skins/blizzard/petition.lua +++ b/skins/blizzard/petition.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Petition", function () +pfUI:RegisterSkin("Petition", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/popup_dialogs.lua b/skins/blizzard/popup_dialogs.lua index baf33da3..85bae89b 100644 --- a/skins/blizzard/popup_dialogs.lua +++ b/skins/blizzard/popup_dialogs.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Popup Dialogs", function () +pfUI:RegisterSkin("Popup Dialogs", "vanilla", function () for i = 1, STATICPOPUP_NUMDIALOGS do local dialog = _G["StaticPopup"..i] diff --git a/skins/blizzard/professions.lua b/skins/blizzard/professions.lua index e88e1fae..558e1326 100644 --- a/skins/blizzard/professions.lua +++ b/skins/blizzard/professions.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Profession", function () +pfUI:RegisterSkin("Profession", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/questlog.lua b/skins/blizzard/questlog.lua index 433bb60c..cdafec69 100644 --- a/skins/blizzard/questlog.lua +++ b/skins/blizzard/questlog.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Quest Log", function () +pfUI:RegisterSkin("Quest Log", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/readycheck.lua b/skins/blizzard/readycheck.lua index a366eb67..81b22fb7 100644 --- a/skins/blizzard/readycheck.lua +++ b/skins/blizzard/readycheck.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Readycheck", function () +pfUI:RegisterSkin("Readycheck", "vanilla", function () HookAddonOrVariable("Blizzard_RaidUI", function() StripTextures(ReadyCheckFrame, true) CreateBackdrop(ReadyCheckFrame, nil, nil, .75) diff --git a/skins/blizzard/spellbook.lua b/skins/blizzard/spellbook.lua index 01db3c62..2a9c0ef6 100644 --- a/skins/blizzard/spellbook.lua +++ b/skins/blizzard/spellbook.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Spellbook", function () +pfUI:RegisterSkin("Spellbook", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/stable.lua b/skins/blizzard/stable.lua index 81583916..fdf6f7f1 100644 --- a/skins/blizzard/stable.lua +++ b/skins/blizzard/stable.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Pet Stable Master", function () +pfUI:RegisterSkin("Pet Stable Master", "vanilla", function () StripTextures(PetStableFrame) CreateBackdrop(PetStableFrame, nil, nil, .75) CreateBackdropShadow(PetStableFrame) diff --git a/skins/blizzard/survey.lua b/skins/blizzard/survey.lua index 3002b19b..d4ba653b 100644 --- a/skins/blizzard/survey.lua +++ b/skins/blizzard/survey.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("GM Survey", function () +pfUI:RegisterSkin("GM Survey", "vanilla", function () HookAddonOrVariable("Blizzard_GMSurveyUI", function() StripTextures(GMSurveyFrame) CreateBackdrop(GMSurveyFrame, nil, nil, .75) diff --git a/skins/blizzard/tabard.lua b/skins/blizzard/tabard.lua index 1eb4b250..579f2b1f 100644 --- a/skins/blizzard/tabard.lua +++ b/skins/blizzard/tabard.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Guild Tabard", function () +pfUI:RegisterSkin("Guild Tabard", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/talents.lua b/skins/blizzard/talents.lua index a634776b..ebb3af61 100644 --- a/skins/blizzard/talents.lua +++ b/skins/blizzard/talents.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Talents", function () +pfUI:RegisterSkin("Talents", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/taxi.lua b/skins/blizzard/taxi.lua index 8817f17e..79a7bc36 100644 --- a/skins/blizzard/taxi.lua +++ b/skins/blizzard/taxi.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Flightmaster", function () +pfUI:RegisterSkin("Flightmaster", "vanilla", function () StripTextures(TaxiFrame) CreateBackdrop(TaxiFrame, nil, nil, .75) CreateBackdropShadow(TaxiFrame) diff --git a/skins/blizzard/tooltips.lua b/skins/blizzard/tooltips.lua index fbb53f9f..8753cee6 100644 --- a/skins/blizzard/tooltips.lua +++ b/skins/blizzard/tooltips.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Tooltips", 20400, function () +pfUI:RegisterSkin("Tooltips", "vanilla:tbc", function () local border = tonumber(C.appearance.border.default) local alpha = tonumber(C.tooltip.alpha) diff --git a/skins/blizzard/trade.lua b/skins/blizzard/trade.lua index 61a5301e..1f653db2 100644 --- a/skins/blizzard/trade.lua +++ b/skins/blizzard/trade.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Trade", function () +pfUI:RegisterSkin("Trade", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1 diff --git a/skins/blizzard/trainer.lua b/skins/blizzard/trainer.lua index e734dae1..a69eade6 100644 --- a/skins/blizzard/trainer.lua +++ b/skins/blizzard/trainer.lua @@ -1,4 +1,4 @@ -pfUI:RegisterSkin("Trainer", function () +pfUI:RegisterSkin("Trainer", "vanilla", function () local border = tonumber(pfUI_config.appearance.border.default) local bpad = border > 1 and border - 1 or 1