core: use concrete string based client checks

This commit is contained in:
shagu
2019-06-10 17:06:31 +02:00
parent d27b7c3cec
commit e9237b59b2
96 changed files with 118 additions and 102 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("autoshift", 11200, function ()
pfUI:RegisterModule("autoshift", "vanilla", function ()
pfUI.autoshift = CreateFrame("Frame")
pfUI.autoshift:RegisterEvent("UI_ERROR_MESSAGE")
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("bubbles", 20400, function ()
pfUI:RegisterModule("bubbles", "vanilla:tbc", function ()
local alpha = tonumber(C.chat.bubbles.alpha)
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("buff", 20400, function ()
pfUI:RegisterModule("buff", "vanilla:tbc", function ()
-- Hide Blizz
BuffFrame:Hide()
BuffFrame:UnregisterAllEvents()
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("buffwatch", function ()
pfUI:RegisterModule("buffwatch", "vanilla", function ()
local border = C.appearance.border.default
local scanner = libtipscan:GetScanner("buffwatch")
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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)}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("firstrun", 20400, function ()
pfUI:RegisterModule("firstrun", "vanilla:tbc", function ()
pfUI.firstrun = CreateFrame("Frame", "pfFirstRunWizard", UIParent)
pfUI.firstrun.steps = {}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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")
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("map", 20400, function ()
pfUI:RegisterModule("map", "vanilla:tbc", function ()
table.insert(UISpecialFrames, "WorldMapFrame")
function _G.ToggleWorldMap()
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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"]
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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 {}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("pixelperfect", function ()
pfUI:RegisterModule("pixelperfect", "vanilla", function ()
-- pixel perfect
local function pixelperfect()
local conf = tonumber(C.global.pixelperfect)
+1 -1
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("prediction", function ()
pfUI:RegisterModule("prediction", "vanilla", function ()
local heals = {}
local ress = {}
local events = {}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("roll", 20400, function ()
pfUI:RegisterModule("roll", "vanilla:tbc", function ()
pfUI.roll = CreateFrame("Frame", "pfLootRoll", UIParent)
pfUI.roll.frames = {}
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("sellvalue", function ()
pfUI:RegisterModule("sellvalue", "vanilla", function ()
pfUI.sellvalue = CreateFrame( "Frame" , "pfGameTooltip", GameTooltip )
pfUI.sellvalue:SetScript("OnHide", function()
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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")
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("thirdparty", function ()
pfUI:RegisterModule("thirdparty", "vanilla", function ()
pfUI.thirdparty = {}
pfUI.thirdparty.meters = {}
pfUI.thirdparty.meters.damage = false
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("tracking", function ()
pfUI:RegisterModule("tracking", "vanilla", function ()
MINIMAP_TRACKING_FRAME:UnregisterAllEvents()
MINIMAP_TRACKING_FRAME:Hide()
+1 -1
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("unlock", 20400, function ()
pfUI:RegisterModule("unlock", "vanilla:tbc", function ()
-- grouped frames
local clusters = {
-- Name Shift Ctrl
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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