revert of deletion and merged hotfixes

Please read the Readme for more details.
This commit is contained in:
Meow
2026-01-05 09:06:08 +01:00
parent 01f9947e3f
commit c259e9b59d
92 changed files with 941 additions and 376 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("addonbuttons", "vanilla", function ()
pfUI:RegisterModule("addonbuttons", "vanilla:tbc", 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", "vanilla", function ()
pfUI:RegisterModule("addons", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize()
-- add main menu button
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("afkcam", "vanilla", 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("autovendor", "vanilla", function ()
pfUI:RegisterModule("autovendor", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
local processed = {}
+3 -3
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("bags", "vanilla", function ()
pfUI:RegisterModule("bags", "vanilla:tbc", function ()
local rawborder, default_border = GetBorderSize("bags")
local knownInventorySpellTextures = {
@@ -573,8 +573,8 @@ pfUI:RegisterModule("bags", "vanilla", function ()
SlotLeave()
end)
-- The OnEvent function of the template scans for framenames,
-- and doesn't know the pf-Names. Therefore, triggering
-- On TBC, the OnEvent function of the template scans for framenames,
-- and obviously doesn't know the pf-Names. Therefore, triggering
-- the update function on each frame manually
if frame == pfUI.bag.left and BankFrameItemButton_Update then
local SlotUpdate = frame.bagslots.slots[slot].frame:GetScript("OnUpdate")
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("bubbles", "vanilla", 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", "vanilla", function ()
pfUI:RegisterModule("buff", "vanilla:tbc", function ()
-- Hide Blizz
BuffFrame:Hide()
BuffFrame:UnregisterAllEvents()
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("buffwatch", "vanilla", function ()
pfUI:RegisterModule("buffwatch", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize("panels")
local scanner = libtipscan:GetScanner("buffwatch")
+3 -2
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("chat", "vanilla", 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
local rawborder, default_border = GetBorderSize("chat")
@@ -753,7 +753,8 @@ pfUI:RegisterModule("chat", "vanilla", function ()
end
-- Remove prat CLINKs
text = gsub(text, "{CLINK:(%x+):([%d-]-:[%d-]-:[%d-]-:[%d-]-):([^}]-)}", "|c%1|Hitem:%2|h[%3]|h|r")
text = gsub(text, "{CLINK:(%x+):([%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-):([^}]-)}", "|c%1|Hitem:%2|h[%3]|h|r") -- tbc
text = gsub(text, "{CLINK:(%x+):([%d-]-:[%d-]-:[%d-]-:[%d-]-):([^}]-)}", "|c%1|Hitem:%2|h[%3]|h|r") -- vanilla
-- Remove chatter CLINKs
text = gsub(text, "{CLINK:item:(%x+):([%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-:[%d-]-):([^}]-)}", "|c%1|Hitem:%2|h[%3]|h|r")
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("chatcopy", "vanilla", function ()
pfUI:RegisterModule("chatcopy", "vanilla:tbc", function ()
local limit = 100
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("combopoints", "vanilla", function ()
pfUI:RegisterModule("combopoints", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize()
-- Hide Blizzard combo point frame and unregister all events to prevent it from popping up again
+11 -4
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("cooldown", "vanilla", function ()
pfUI:RegisterModule("cooldown", "vanilla:tbc", function ()
-- cache values
local lowcolor = {strsplit(",", C.appearance.cd.lowcolor)}
local normalcolor = {strsplit(",", C.appearance.cd.normalcolor)}
@@ -134,7 +134,14 @@ pfUI:RegisterModule("cooldown", "vanilla", function ()
end
end
-- vanilla does not have a cooldown frame type, so we hook the
-- regular SetTimer function that each one is calling.
hooksecurefunc("CooldownFrame_SetTimer", SetCooldown)
if pfUI.expansion == "vanilla" then
-- vanilla does not have a cooldown frame type, so we hook the
-- regular SetTimer function that each one is calling.
hooksecurefunc("CooldownFrame_SetTimer", SetCooldown)
else
-- tbc and later expansion have a cooldown frametype, so we can
-- hook directly into the frame creation and add our function there.
local methods = getmetatable(CreateFrame('Cooldown', nil, nil, 'CooldownFrameTemplate')).__index
hooksecurefunc(methods, 'SetCooldown', SetCooldown)
end
end)
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("easteregg", "vanilla", 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
+7 -17
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("energytick", "vanilla", function ()
pfUI:RegisterModule("energytick", "vanilla:tbc", function ()
if not pfUI.uf or not pfUI.uf.player then return end
local energytick = CreateFrame("Frame", nil, pfUI.uf.player.power.bar)
@@ -7,9 +7,6 @@ pfUI:RegisterModule("energytick", "vanilla", function ()
energytick:RegisterEvent("UNIT_DISPLAYPOWER")
energytick:RegisterEvent("UNIT_ENERGY")
energytick:RegisterEvent("UNIT_MANA")
energytick:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF")
energytick:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS")
energytick:SetScript("OnEvent", function()
if UnitPowerType("player") == 0 and C.unitframes.player.manatick == "1" then
this.mode = "MANA"
@@ -21,14 +18,6 @@ pfUI:RegisterModule("energytick", "vanilla", function ()
this:Hide()
end
-- Filter nur eigene Energy-Gewinne von Talents/Buffs
if event == "CHAT_MSG_SPELL_SELF_BUFF" or event == "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS" then
if string.find(arg1, "You gain") and string.find(arg1, "Energy from") then
this.ignoreNextGain = true
end
return
end
if event == "PLAYER_ENTERING_WORLD" then
this.lastMana = UnitMana("player")
end
@@ -49,10 +38,7 @@ pfUI:RegisterModule("energytick", "vanilla", function ()
this.badtick = diff
end
elseif this.mode == "ENERGY" and diff > 0 then
if not this.ignoreNextGain then
this.target = 2
end
this.ignoreNextGain = false
this.target = 2
end
this.lastMana = this.currentMana
end
@@ -83,10 +69,14 @@ pfUI:RegisterModule("energytick", "vanilla", function ()
energytick.spark:SetWidth(C.unitframes.player.pheight + 5)
energytick.spark:SetBlendMode('ADD')
-- update spark size on player frame changes
local hookUpdateConfig = pfUI.uf.player.UpdateConfig
function pfUI.uf.player.UpdateConfig()
-- update spark sizes
energytick.spark:SetHeight(C.unitframes.player.pheight + 15)
energytick.spark:SetWidth(C.unitframes.player.pheight + 5)
-- run default unitframe update function
hookUpdateConfig(pfUI.uf.player)
end
end)
end)
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("farmmode", "vanilla", 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", "vanilla", 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", "vanilla", function ()
pfUI:RegisterModule("firstrun", "vanilla:tbc", function ()
pfUI.firstrun = CreateFrame("Frame", "pfFirstRunWizard", UIParent)
pfUI.firstrun.steps = {}
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("focus", "vanilla", function ()
pfUI:RegisterModule("focus", "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("group", "vanilla", 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("gryphons", "vanilla", function ()
pfUI:RegisterModule("gryphons", "vanilla:tbc", function ()
pfUI.gryphons = {
frames = {
left = CreateFrame("Frame"),
+30 -20
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("gui", "vanilla", function ()
pfUI:RegisterModule("gui", "vanilla:tbc", function ()
local Reload, U, CreateConfig, CreateTabFrame, CreateArea, CreateGUIEntry, EntryUpdate
-- "searchDB" gets populated when CreateConfig is called. The table holds
@@ -2402,26 +2402,36 @@ pfUI:RegisterModule("gui", "vanilla", function ()
CreateConfig(nil, "ShaguDPS (" .. T["Dock"] .. ")", C.thirdparty.shagudps, "dock", "checkbox")
CreateConfig(nil, "DPSMate (" .. T["Skin"] .. ")", C.thirdparty.dpsmate, "skin", "checkbox")
CreateConfig(nil, "DPSMate (" .. T["Dock"] .. ")", C.thirdparty.dpsmate, "dock", "checkbox")
CreateConfig(nil, "SWStats (" .. T["Skin"] .. ")", C.thirdparty.swstats, "skin", "checkbox")
CreateConfig(nil, "SWStats (" .. T["Dock"] .. ")", C.thirdparty.swstats, "dock", "checkbox")
CreateConfig(nil, "KLH Threat Meter (" .. T["Skin"] .. ")", C.thirdparty.ktm, "skin", "checkbox")
CreateConfig(nil, "KLH Threat Meter (" .. T["Dock"] .. ")", C.thirdparty.ktm, "dock", "checkbox")
CreateConfig(nil, "TW Threatmeter (" .. T["Skin"] .. ")", C.thirdparty.twt, "skin", "checkbox")
CreateConfig(nil, "TW Threatmeter (" .. T["Dock"] .. ")", C.thirdparty.twt, "dock", "checkbox")
CreateConfig(nil, "WIM", C.thirdparty.wim, "enable", "checkbox")
CreateConfig(nil, "HealComm", C.thirdparty.healcomm, "enable", "checkbox")
CreateConfig(nil, "SortBags", C.thirdparty.sortbags, "enable", "checkbox")
CreateConfig(nil, "Recount (" .. T["Skin"] .. ")", C.thirdparty.recount, "skin", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "Recount (" .. T["Dock"] .. ")", C.thirdparty.recount, "dock", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "Omen (" .. T["Skin"] .. ")", C.thirdparty.omen, "skin", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "Omen (" .. T["Dock"] .. ")", C.thirdparty.omen, "dock", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "SWStats (" .. T["Skin"] .. ")", C.thirdparty.swstats, "skin", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "SWStats (" .. T["Dock"] .. ")", C.thirdparty.swstats, "dock", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "KLH Threat Meter (" .. T["Skin"] .. ")", C.thirdparty.ktm, "skin", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "KLH Threat Meter (" .. T["Dock"] .. ")", C.thirdparty.ktm, "dock", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "TW Threatmeter (" .. T["Skin"] .. ")", C.thirdparty.twt, "skin", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "TW Threatmeter (" .. T["Dock"] .. ")", C.thirdparty.twt, "dock", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "WIM", C.thirdparty.wim, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "HealComm", C.thirdparty.healcomm, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "SortBags", C.thirdparty.sortbags, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "Bag_Sort", C.thirdparty.bag_sort, "enable", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox")
CreateConfig(nil, "BetterCharacterStats", C.thirdparty.bcs, "enable", "checkbox")
CreateConfig(nil, "Crafty", C.thirdparty.crafty, "enable", "checkbox")
CreateConfig(nil, "CleverMacro", C.thirdparty.clevermacro, "enable", "checkbox")
CreateConfig(nil, "FlightMap", C.thirdparty.flightmap, "enable", "checkbox")
CreateConfig(nil, "TheoryCraft", C.thirdparty.theorycraft, "enable", "checkbox")
CreateConfig(nil, "SuperMacro", C.thirdparty.supermacro, "enable", "checkbox")
CreateConfig(nil, "AtlasLoot", C.thirdparty.atlasloot, "enable", "checkbox")
CreateConfig(nil, "MyRolePlay", C.thirdparty.myroleplay, "enable", "checkbox")
CreateConfig(nil, "DruidManaBar", C.thirdparty.druidmana, "enable", "checkbox")
CreateConfig(nil, "NoteIt", C.thirdparty.noteit, "enable", "checkbox")
CreateConfig(nil, "BetterCharacterStats", C.thirdparty.bcs, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "Crafty", C.thirdparty.crafty, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "CleverMacro", C.thirdparty.clevermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "AckisRecipeList", C.thirdparty.ackis, "enable", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "SheepWatch", C.thirdparty.sheepwatch, "enable", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "TotemTimers", C.thirdparty.totemtimers, "enable", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "DruidBar", C.thirdparty.druidbar, "enable", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "BCEPGP", C.thirdparty.bcepgp, "enable", "checkbox", nil, nil, nil, nil, "tbc")
CreateConfig(nil, "FlightMap", C.thirdparty.flightmap, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "TheoryCraft", C.thirdparty.theorycraft, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "SuperMacro", C.thirdparty.supermacro, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "AtlasLoot", C.thirdparty.atlasloot, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "MyRolePlay", C.thirdparty.myroleplay, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "DruidManaBar", C.thirdparty.druidmana, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(nil, "NoteIt", C.thirdparty.noteit, "enable", "checkbox", nil, nil, nil, nil, "vanilla")
end)
CreateGUIEntry(T["Components"], T["Modules"], function()
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("hoverbind", "vanilla", function ()
pfUI:RegisterModule("hoverbind", "vanilla:tbc", function ()
local keymap = {
-- buttons to binding association
["pfActionBarMainButton"] = "ACTIONBUTTON",
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("infight", "vanilla", function ()
pfUI:RegisterModule("infight", "vanilla:tbc", function ()
local function OnUpdate()
if not this.infight and not this.aggro and not this.health then return end
if ( this.tick or 1) > GetTime() then return else this.tick = GetTime() + .1 end
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("loot", "vanilla", function ()
pfUI:RegisterModule("loot", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize()
pfUI.loot = CreateFrame("Frame", "pfLootFrame", UIParent)
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("map", "vanilla", function ()
pfUI:RegisterModule("map", "vanilla:tbc", function ()
table.insert(UISpecialFrames, "WorldMapFrame")
local function UpdateTooltipScale()
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("mapreveal", "vanilla", function ()
pfUI:RegisterModule("mapreveal", "vanilla:tbc", function ()
-- do not load if other map addon is loaded
if Cartographer then return end
if METAMAP_TITLE then return end
+2 -2
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("minimap", "vanilla", function ()
pfUI:RegisterModule("minimap", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize()
local size = tonumber(C.appearance.minimap.size) or 140
@@ -39,7 +39,7 @@ pfUI:RegisterModule("minimap", "vanilla", function ()
Minimap:SetWidth(size)
Minimap:SetHeight(size)
-- do the best to detect the minimap arrow
-- vanilla+tbc: do the best to detect the minimap arrow
local arrowscale = tonumber(C.appearance.minimap.arrowscale)
local minimaparrow = ({Minimap:GetChildren()})[9]
for k, v in pairs({Minimap:GetChildren()}) do
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("mirrortimers", "vanilla", function ()
pfUI:RegisterModule("mirrortimers", "vanilla:tbc", function ()
local font = pfUI.font_default
local fontsize = tonumber(C.global.font_size)
local height = fontsize * 1.3
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("panel", "vanilla", 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", "vanilla", function ()
pfUI:RegisterModule("pet", "vanilla:tbc", function ()
-- do not go further on disabled UFs
if C.unitframes.disable == "1" then return end
pfUI.uf.pet = pfUI.uf:CreateUnitFrame("Pet", nil, C.unitframes.pet)
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("pettarget", "vanilla", function ()
pfUI:RegisterModule("pettarget", "vanilla:tbc", function ()
-- do not go further on disabled UFs
if C.unitframes.disable == "1" then return end
local rawborder, default_border = GetBorderSize("unitframes")
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("pixelperfect", "vanilla", function ()
pfUI:RegisterModule("pixelperfect", "vanilla:tbc", function ()
-- pre-calculated min values
local statics = {
[4] = 1.4222222222222,
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("player", "vanilla", function ()
pfUI:RegisterModule("player", "vanilla:tbc", function ()
-- do not go further on disabled UFs
if C.unitframes.disable == "1" then return end
+5 -1
View File
@@ -96,7 +96,11 @@ pfUI:RegisterModule("questitem", function ()
SelectQuestLogEntry(quest)
-- detect and ignore quest headers
_, _, _, header = GetQuestLogTitle(quest)
if pfUI.client <= 11200 then -- vanilla
_, _, _, header = GetQuestLogTitle(quest)
elseif pfUI.client > 11200 then -- tbc
_, _, _, _, header = GetQuestLogTitle(quest)
end
if not header then
text, objective = GetQuestLogQuestText()
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("raid", "vanilla", 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", "vanilla", 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", "vanilla", function ()
pfUI:RegisterModule("screenshot", "vanilla:tbc", 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", "vanilla", function ()
pfUI:RegisterModule("sellvalue", "vanilla:tbc", function ()
local function AddVendorPrices(frame, id, count)
if pfSellData[id] then
local _, _, sell, buy = strfind(pfSellData[id], "(.*),(.*)")
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("share", "vanilla", 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("socialmod", "vanilla", function ()
pfUI:RegisterModule("socialmod", "vanilla:tbc", function ()
local playerdb = _G.pfUI_playerDB
pfUI.socialmod = CreateFrame("Frame", "pfSocialMod", UIParent)
pfUI.socialmod:RegisterEvent("CHAT_MSG_SYSTEM")
+7 -65
View File
@@ -439,70 +439,6 @@ pfUI:RegisterModule("superwow", "vanilla", function ()
end
end
-- Config Import/Export API using ImportFile/ExportFile
if ImportFile and ExportFile then
pfUI.api.ExportConfig = function(filename)
filename = filename or "pfUI_config_backup.txt"
local configStr = ""
-- Serialize config to string
local function serialize(tbl, indent)
indent = indent or ""
local result = "{\n"
for k, v in pairs(tbl) do
local keyStr = type(k) == "string" and '["' .. k .. '"]' or "[" .. tostring(k) .. "]"
if type(v) == "table" then
result = result .. indent .. " " .. keyStr .. " = " .. serialize(v, indent .. " ") .. ",\n"
elseif type(v) == "string" then
result = result .. indent .. " " .. keyStr .. ' = "' .. v .. '",\n'
else
result = result .. indent .. " " .. keyStr .. " = " .. tostring(v) .. ",\n"
end
end
return result .. indent .. "}"
end
if pfUI_config then
configStr = "pfUI_config = " .. serialize(pfUI_config)
ExportFile(filename, configStr)
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: Config exported to imports/" .. filename)
return true
end
return false
end
pfUI.api.ImportConfig = function(filename)
filename = filename or "pfUI_config_backup.txt"
local content = ImportFile(filename)
if content and content ~= "" then
-- Load the config string
local func, err = loadstring(content)
if func then
func()
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: Config imported from imports/" .. filename)
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: Please /reload to apply changes")
return true
else
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: Error parsing config: " .. (err or "unknown"))
end
else
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: Could not read imports/" .. filename)
end
return false
end
-- Slash commands for config backup
SLASH_PFEXPORT1 = "/pfexport"
SlashCmdList["PFEXPORT"] = function(msg)
pfUI.api.ExportConfig(msg ~= "" and msg or nil)
end
SLASH_PFIMPORT1 = "/pfimport"
SlashCmdList["PFIMPORT"] = function(msg)
pfUI.api.ImportConfig(msg ~= "" and msg or nil)
end
end
-- GetPlayerBuffID wrapper
if GetPlayerBuffID then
pfUI.api.GetPlayerBuffSpellId = function(buffIndex)
@@ -559,7 +495,7 @@ pfUI:RegisterModule("superwow", "vanilla", function ()
end
end
-- Enhance libcast with SuperWoW data for NPCs and other players only
-- Enhance libcast with SuperWoW data for NPCs and other players
-- Player casts use SPELLCAST_* events for proper pushback handling
local supercast = CreateFrame("Frame")
local playerGuid = nil
@@ -622,6 +558,9 @@ pfUI:RegisterModule("superwow", "vanilla", function ()
-- skip on buff procs during cast
if event_type == "CAST" then
if not libcast.db[guid] or libcast.db[guid].cast ~= spell then
-- ignore casts without 'START' event, while there is already another cast.
-- those events can be for example a frost shield proc while casting frostbolt.
-- we want to keep the cast itself, so we simply skip those.
return
end
end
@@ -639,7 +578,10 @@ pfUI:RegisterModule("superwow", "vanilla", function ()
libcast.db[dbKey].icon = icon
libcast.db[dbKey].channel = event_type == "CHANNEL" or false
elseif arg3 == "FAIL" then
-- For player: use playerName, for others: use GUID
local dbKey = isPlayer and UnitName("player") or guid
-- delete all cast entries
if libcast.db[dbKey] then
libcast.db[dbKey].cast = nil
libcast.db[dbKey].rank = nil
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("target", "vanilla", 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", "vanilla", 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("targettargettarget", "vanilla", function ()
pfUI:RegisterModule("targettargettarget", "vanilla:tbc", function ()
-- do not go further on disabled UFs
if C.unitframes.disable == "1" then return end
+10 -4
View File
@@ -1,7 +1,10 @@
pfUI:RegisterModule("thirdparty", "vanilla", function()
pfUI:RegisterModule("thirdparty", "vanilla:tbc", function()
-- This module includes the core logic of thirdparty modules.
-- Right now, in particular the functions to register addons to the
-- dockframe of the chat panel aswell as the thirdparty root-table.
-- This module is supposed to be loaded on all expansions, so only
-- addons that can share the same glue code across expansions will go here.
-- For expansion related code, see: thirdparty-vanilla and thirdparty-tbc.
pfUI.thirdparty = {}
@@ -193,7 +196,8 @@ pfUI:RegisterModule("thirdparty", "vanilla", function()
end
-- MrPlow Bag Sorting Addon.
-- https://www.wowace.com/projects/mr-plow/files/288059
-- Vanilla: https://www.wowace.com/projects/mr-plow/files/288059
-- TBC: https://www.wowace.com/projects/mr-plow/files/136162
HookAddonOrVariable("MrPlow", function()
if C.thirdparty.mrplow.enable == "0" then return end
@@ -228,7 +232,8 @@ pfUI:RegisterModule("thirdparty", "vanilla", function()
end)
-- ShaguDPS Damage Meter
-- https://github.com/shagu/ShaguDPS
-- Vanilla: https://github.com/shagu/ShaguDPS
-- TBC: https://github.com/shagu/ShaguDPS
HookAddonOrVariable("ShaguDPS", function()
local docktable = { "shagudps", "ShaguDPS", "ShaguDPSWindow",
function() -- single
@@ -328,7 +333,8 @@ pfUI:RegisterModule("thirdparty", "vanilla", function()
end)
-- DPSMate Damage Meter
-- https://github.com/Geigerkind/DPSMate
-- Vanilla: https://github.com/Geigerkind/DPSMate
-- TBC: https://github.com/Geigerkind/DPSMateTBC
HookAddonOrVariable("DPSMate_DPSMate", function()
local docktable = { "dpsmate", "DPSMate", "DPSMate_DPSMate",
function() -- single
+4 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("totems", "vanilla", function ()
pfUI:RegisterModule("totems", "vanilla:tbc", function ()
local _, class = UnitClass("player")
local slots = {
@@ -42,6 +42,9 @@ pfUI:RegisterModule("totems", "vanilla", function ()
-- Try to recast totem on left click in vanilla
local active, name, start, duration, icon = GetTotemInfo(this.id)
if name then CastSpellByName(name) end
elseif pfUI.client > 11200 and this.id and arg1 and arg1 == "RightButton" then
-- Try to cancel totem on right click in tbc+
DestroyTotem(this.id)
end
end
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("uf_tukui", "vanilla", 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", "vanilla", function ()
pfUI:RegisterModule("unlock", "vanilla:tbc", function ()
local rawborder, default_border = GetBorderSize()
-- grouped frames
+1 -1
View File
@@ -1,4 +1,4 @@
pfUI:RegisterModule("unusable", "vanilla", function ()
pfUI:RegisterModule("unusable", "vanilla:tbc", 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", "vanilla", 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("xpbar", "vanilla", function ()
pfUI:RegisterModule("xpbar", "vanilla:tbc", function ()
local rawborder, default_border = GetBorderSize()
local parse_faction = SanitizePattern(FACTION_STANDING_INCREASED)