Version 6.1.0 - Raid/Party Frame Fixes

Bugfixes:
- Fixed 40-yard range check not working for raid/party frames
- Fixed aggro indicator not displaying properly on raid/party frames
- Improved aggro cache to only cache positive results for instant detection
- Fixed HP/Mana not updating with "Use Raid Frames for group" enabled
- Added SuperWoW nil-check for SpellInfo
- Added missing events: PARTY_MEMBER_ENABLE, PARTY_MEMBER_DISABLE, PLAYER_UPDATE_RESTING

UI Improvements:
- Share/Hoverbind buttons now show warning when module is disabled
This commit is contained in:
Meow
2026-01-08 12:25:18 +01:00
parent 5d0e195d1e
commit 34f5c3eb02
111 changed files with 4424 additions and 2308 deletions
+51 -21
View File
@@ -395,6 +395,14 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
for line in gfind(body, "[^%\n]+") do
_, _, match = string.find(line, '^#showtooltip (.+)')
-- skip any further manual macro scanning on
-- gameclients with native macro spell detection
if pfUI.client > 11200 and match then
self.spellslot = nil
self.booktype = nil
return
end
-- allow the user to disable the scan
if match and strfind(match, "disable") then
return
@@ -972,17 +980,25 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
pageswitch:SetScript("OnEvent", function()
if class ~= "DRUID" then return end
-- UNIT_CASTEVENT: detect Cat Form and Prowl cast instantly
-- Cat Form: 768 | Prowl: 5215 (R1), 6783 (R2), 9913 (R3)
-- On login/reload: full scan
if event == "PLAYER_ENTERING_WORLD" then
prowling = FullScan()
return
end
-- UNIT_CASTEVENT: detect Prowl cast instantly
-- Prowl Spell IDs: 5215 (Rank 1), 6783 (Rank 2), 9913 (Rank 3)
if event == "UNIT_CASTEVENT" then
local guid, target, cEvent, spellId = arg1, arg2, arg3, arg4
local _, playerGuid = UnitExists("player")
if guid == playerGuid and cEvent == "CAST" then
if spellId == 5215 or spellId == 6783 or spellId == 9913 then
-- Prowl cast detected
inCatForm = true
prowlActive = true
prowling = true
elseif spellId == 768 then
-- Cat Form cast (Spell ID 768)
inCatForm = true
end
end
@@ -1294,26 +1310,40 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
if enable == "1" then
-- handle pet bar
if i == 12 then
-- only show when pet actions exists
if PetHasActionBar() or pfUI.unlock and pfUI.unlock:IsShown() then
bars[i]:Show()
else
bars[i]:Hide()
end
-- show/hide petbar on petbar updates
if init then
bars[i]:RegisterEvent("PET_BAR_UPDATE")
bars[i]:SetScript("OnEvent", function()
-- hide obsolete buttons
for i=1, NUM_PET_ACTION_SLOTS do
if not PetHasActionBar() and bars[12][i] then
bars[12][i]:Hide()
end
if pfUI.client > 11200 then
if InCombatLockdown and InCombatLockdown() then
-- don't process those events during combat
else
-- set state driver for pet bars
bars[i]:SetAttribute("unit", "pet")
local visibility = pfUI.unlock and pfUI.unlock:IsShown() and "show" or petvisibility
if bars[i].visibility ~= visibility then
RegisterStateDriver(bars[i], 'visibility', visibility)
bars[i].visibility = visibility
end
-- refresh layout
CreateActionBar(12)
end)
end
else
-- only show when pet actions exists
if PetHasActionBar() or pfUI.unlock and pfUI.unlock:IsShown() then
bars[i]:Show()
else
bars[i]:Hide()
end
-- show/hide petbar on petbar updates
if init then
bars[i]:RegisterEvent("PET_BAR_UPDATE")
bars[i]:SetScript("OnEvent", function()
-- hide obsolete buttons
for i=1, NUM_PET_ACTION_SLOTS do
if not PetHasActionBar() and bars[12][i] then
bars[12][i]:Hide()
end
end
-- refresh layout
CreateActionBar(12)
end)
end
end
-- handle shapeshift bar
File diff suppressed because it is too large Load Diff
+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")
+2
View File
@@ -1,4 +1,6 @@
pfUI:RegisterModule("castbar", "vanilla", function ()
local superwow_active = HasSuperWoW()
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
local rawborder, default_border = GetBorderSize("unitframes")
+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")
+7
View File
@@ -0,0 +1,7 @@
pfUI:RegisterModule("combatlogfix", "tbc", function ()
-- Fixes the combatlog break bugs that exist since patch 2.4 by simply clearing the whole log
-- on every update. This is required in order to receive new log events. Otherwise, addons like
-- Omen or Recount won't work and simply don't receive any new data at a given time.
local combatlog = CreateFrame("Frame", "pfCombatLogFix", UIParent)
combatlog:SetScript("OnUpdate", CombatLogClearEntries)
end)
+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"),
+37 -21
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
@@ -656,7 +656,11 @@ pfUI:RegisterModule("gui", "vanilla", function ()
pfUI.gui.hoverbind:SetHeight(25)
pfUI.gui.hoverbind:SetText(T["Hoverbind"])
pfUI.gui.hoverbind:SetScript("OnClick", function()
if pfUI.hoverbind then pfUI.hoverbind:Show() end
if pfUI.hoverbind then
pfUI.hoverbind:Show()
else
message("Please enable the Hoverbind module to use this feature.")
end
end)
SkinButton(pfUI.gui.hoverbind)
@@ -671,6 +675,8 @@ pfUI:RegisterModule("gui", "vanilla", function ()
if pfShare then
pfShare:Show()
pfShareExport:Click()
else
message("Please enable the Share module to share your config.")
end
end)
SkinButton(pfUI.gui.share)
@@ -2402,26 +2408,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
+198 -81
View File
@@ -2,6 +2,10 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
-- disable original castbars
pcall(SetCVar, "ShowVKeyCastbar", 0)
-- check for SuperWoW support (use SUPERWOW_VERSION global)
local superwow_active = SUPERWOW_VERSION ~= nil
--print("pfUI Nameplates: SuperWoW " .. (superwow_active and "ACTIVE" or "INACTIVE"))
local unitcolors = {
["ENEMY_NPC"] = { .9, .2, .3, .8 },
["NEUTRAL_NPC"] = { 1, 1, .3, .8 },
@@ -37,6 +41,10 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
local registry = {}
local debuffdurations = C.appearance.cd.debuffs == "1" and true or nil
-- NEW: Cast event cache like Overhead.lua
local CastEvents = {}
local _, PlayerGUID = UnitExists("player")
-- cache default border color
local er, eg, eb, ea = GetStringColor(pfUI_config.appearance.border.color)
@@ -67,6 +75,15 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
return
end
local function wipe(table)
if type(table) ~= "table" then
return
end
for k in pairs(table) do
table[k] = nil
end
end
local function IsNamePlate(frame)
if frame:GetObjectType() ~= NAMEPLATE_FRAMETYPE then return nil end
regions = plate:GetRegions()
@@ -311,18 +328,65 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
nameplates:RegisterEvent("UNIT_COMBO_POINTS")
nameplates:RegisterEvent("PLAYER_COMBO_POINTS")
nameplates:RegisterEvent("UNIT_AURA")
-- NEW: Register cast events like Overhead.lua
if superwow_active then
nameplates:RegisterEvent("UNIT_CASTEVENT")
end
nameplates:SetScript("OnEvent", function()
if event == "PLAYER_ENTERING_WORLD" then
this:SetGameVariables()
elseif event == "UNIT_CASTEVENT" then
-- NEW: Event-based cast handling from Overhead.lua
local casterGUID = arg1
if casterGUID == PlayerGUID then return end
local eventType = arg3 -- "START", "CAST", "FAIL", "CHANNEL"
local spellID = arg4
local castDuration = arg5
local spellName, _, icon = SpellInfo(spellID)
if eventType == "MAINHAND" or eventType == "OFFHAND" then
return
end
if eventType == "CAST" then
if not CastEvents[casterGUID] or spellID ~= CastEvents[casterGUID].spell then
return
end
end
if eventType == "START" or eventType == "CHANNEL" then
if not CastEvents[casterGUID] then
CastEvents[casterGUID] = {}
end
wipe(CastEvents[casterGUID])
CastEvents[casterGUID].event = eventType
CastEvents[casterGUID].spellID = spellID
CastEvents[casterGUID].spellName = spellName
CastEvents[casterGUID].icon = icon
CastEvents[casterGUID].startTime = GetTime()
CastEvents[casterGUID].endTime = castDuration and GetTime() + castDuration / 1000
CastEvents[casterGUID].duration = castDuration and castDuration / 1000 or nil
elseif eventType == "FAIL" then
if CastEvents[casterGUID] then
wipe(CastEvents[casterGUID])
end
end
-- Propagate cast event to all nameplates
for plate in pairs(registry) do
plate.eventcache = true
end
else
this.eventcache = true
end
end)
nameplates:SetScript("OnUpdate", function()
-- throttle to 10 updates per second instead of every frame
if (this.tick or 0.1) > GetTime() then return else this.tick = GetTime() + 0.1 end
-- Throttle main scanner to reasonable rate
if (this.tick or 0) > GetTime() then return else this.tick = GetTime() + 0.05 end
-- propagate events to all nameplates
if this.eventcache then
@@ -631,6 +695,7 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
end
if player and unittype == "ENEMY_NPC" then unittype = "ENEMY_PLAYER" end
if player and unittype == "FRIENDLY_NPC" then unittype = "FRIENDLY_PLAYER" end
elite = plate.original.levelicon:IsShown() and not player and "boss" or elite
if not class then plate.wait_for_scan = true end
@@ -874,12 +939,19 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
end
nameplates.OnUpdate = function(frame)
local update
local frame = frame or this
local nameplate = frame.nameplate
-- OPTIMIZED: Minimal throttle - only skip if very recent update
local target = UnitExists("target") and frame:GetAlpha() == 1 or nil
local throttle = target and 0.02 or 0.02
if (nameplate.lasttick or 0) + throttle > GetTime() then return end
nameplate.lasttick = GetTime()
local update
local original = nameplate.original
local name = original.name:GetText()
local target = UnitExists("target") and frame:GetAlpha() == 1 or nil
local mouseover = UnitExists("mouseover") and original.glow:IsShown() or nil
local namefightcolor = C.nameplates.namefightcolor == "1"
@@ -889,12 +961,11 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
nameplate.eventcache = nil
end
-- reset strata cache on target change
-- OPTIMIZED: Cache strata changes
if nameplate.istarget ~= target then
nameplate.target_strata = nil
end
-- keep target nameplate above others
if target and nameplate.target_strata ~= 1 then
nameplate:SetFrameStrata("LOW")
nameplate.target_strata = 1
@@ -903,15 +974,22 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
nameplate.target_strata = 0
end
-- cache target value
nameplate.istarget = target
-- set non-target plate alpha
-- OPTIMIZED: Cache alpha changes
local newAlpha
if target or not UnitExists("target") then
nameplate:SetAlpha(1)
newAlpha = 1
else
frame:SetAlpha(.95)
nameplate:SetAlpha(tonumber(C.nameplates.notargalpha))
newAlpha = tonumber(C.nameplates.notargalpha)
end
if nameplate.cachedAlpha ~= newAlpha then
if not target and UnitExists("target") then
frame:SetAlpha(.95)
end
nameplate:SetAlpha(newAlpha)
nameplate.cachedAlpha = newAlpha
end
-- queue update on visual target update
@@ -939,7 +1017,7 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
if namefightcolor then
if r > .9 and g < .2 and b < .2 then
nameplate.name:SetTextColor(1,0.4,0.2,1) -- infight
nameplate.name:SetTextColor(1,0.4,0.2,1)
else
nameplate.name:SetTextColor(r,g,b,1)
end
@@ -979,97 +1057,136 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
nameplate.tick = GetTime() + .5
end
-- target zoom
local w, h = nameplate.health:GetWidth(), nameplate.health:GetHeight()
-- OPTIMIZED: Cache zoom dimensions
if target and C.nameplates.targetzoom == "1" then
local zoomval = tonumber(C.nameplates.targetzoomval)+1
local wc = tonumber(C.nameplates.width)*zoomval
local hc = tonumber(C.nameplates.heighthealth)*(zoomval*.9)
local animation = false
if not nameplate.health.zoomed then
local zoomval = tonumber(C.nameplates.targetzoomval)+1
local wc = tonumber(C.nameplates.width)*zoomval
local hc = tonumber(C.nameplates.heighthealth)*(zoomval*.9)
nameplate.health.targetWidth = wc
nameplate.health.targetHeight = hc
end
local w, h = nameplate.health:GetWidth(), nameplate.health:GetHeight()
local wc, hc = nameplate.health.targetWidth, nameplate.health.targetHeight
if wc >= w then
wc = w*1.05
nameplate.health:SetWidth(wc)
nameplate.health:SetWidth(w*1.05)
nameplate.health.zoomTransition = true
animation = true
end
if hc >= h then
hc = h*1.05
nameplate.health:SetHeight(hc)
elseif hc >= h then
nameplate.health:SetHeight(h*1.05)
nameplate.health.zoomTransition = true
animation = true
end
if animation == false and not nameplate.health.zoomed then
nameplate.health:SetWidth(wc)
nameplate.health:SetHeight(hc)
nameplate.health.zoomTransition = nil
else
if nameplate.health.zoomTransition then
nameplate.health:SetWidth(wc)
nameplate.health:SetHeight(hc)
nameplate.health.zoomTransition = nil
end
nameplate.health.zoomed = true
end
elseif nameplate.health.zoomed or nameplate.health.zoomTransition then
local w, h = nameplate.health:GetWidth(), nameplate.health:GetHeight()
local wc = tonumber(C.nameplates.width)
local hc = tonumber(C.nameplates.heighthealth)
local animation = false
if wc <= w then
wc = w*.95
nameplate.health:SetWidth(wc)
animation = true
end
if hc <= h then
hc = h*0.95
nameplate.health:SetHeight(hc)
animation = true
end
if animation == false then
nameplate.health:SetWidth(w*.95)
elseif hc <= h then
nameplate.health:SetHeight(h*0.95)
else
nameplate.health:SetWidth(wc)
nameplate.health:SetHeight(hc)
nameplate.health.zoomTransition = nil
nameplate.health.zoomed = nil
nameplate.health.targetWidth = nil
nameplate.health.targetHeight = nil
end
end
-- castbar update
-- OPTIMIZED: UNIT_CASTEVENT implementation
if C.nameplates["showcastbar"] == "1" and ( C.nameplates["targetcastbar"] == "0" or target ) then
local channel, cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill
-- detect cast or channel bars
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitCastingInfo(target and "target" or name)
if not cast then channel, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitChannelInfo(target and "target" or name) end
-- read enemy casts from SuperWoW if enabled
if superwow_active then
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitCastingInfo(nameplate.parent:GetName(1))
if not cast then channel, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitChannelInfo(nameplate.parent:GetName(1)) end
local unitstr = target and "target" or nil
-- Use SuperWoW GUID if available
if superwow_active and not unitstr then
unitstr = nameplate.parent:GetName(1)
end
if not cast and not channel then
nameplate.castbar:Hide()
elseif cast or channel then
local effect = cast or channel
local duration = endTime - startTime
local max = duration / 1000
local cur = GetTime() - startTime / 1000
-- invert castbar values while channeling
if channel then cur = max + startTime/1000 - GetTime() end
nameplate.castbar:SetMinMaxValues(0, duration/1000)
nameplate.castbar:SetValue(cur)
nameplate.castbar.text:SetText(round(cur,1))
if C.nameplates.spellname == "1" then
nameplate.castbar.spell:SetText(effect)
-- Check event-based cast cache first
local castInfo = unitstr and CastEvents[unitstr]
if castInfo and castInfo.spellID then
-- Check if cast is still valid
if castInfo.startTime + castInfo.duration < GetTime() then
wipe(castInfo)
nameplate.castbar:Hide()
elseif castInfo.event == "CAST" or castInfo.event == "FAIL" then
wipe(castInfo)
nameplate.castbar:Hide()
else
nameplate.castbar.spell:SetText("")
-- Update from cached event data
nameplate.castbar:SetMinMaxValues(castInfo.startTime, castInfo.endTime)
local barValue
if castInfo.event == "CHANNEL" then
barValue = castInfo.startTime + (castInfo.endTime - GetTime())
else
barValue = GetTime()
end
nameplate.castbar:SetValue(barValue)
nameplate.castbar.text:SetText(round(GetTime() - castInfo.startTime, 1))
if C.nameplates.spellname == "1" then
nameplate.castbar.spell:SetText(castInfo.spellName)
else
nameplate.castbar.spell:SetText("")
end
if castInfo.icon then
nameplate.castbar.icon.tex:SetTexture(castInfo.icon)
nameplate.castbar.icon.tex:SetTexCoord(.1,.9,.1,.9)
end
nameplate.castbar:Show()
end
nameplate.castbar:Show()
else
-- Fallback to API calls if no event data (for non-SuperWoW or target)
local channel, cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill
if target then
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitCastingInfo("target")
if not cast then
channel, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitChannelInfo("target")
end
end
if not cast and not channel then
nameplate.castbar:Hide()
else
local effect = cast or channel
local duration = endTime - startTime
local max = duration / 1000
local cur = GetTime() - startTime / 1000
if texture then
nameplate.castbar.icon.tex:SetTexture(texture)
nameplate.castbar.icon.tex:SetTexCoord(.1,.9,.1,.9)
if channel then cur = max + startTime/1000 - GetTime() end
nameplate.castbar:SetMinMaxValues(0, duration/1000)
nameplate.castbar:SetValue(cur)
nameplate.castbar.text:SetText(round(cur,1))
if C.nameplates.spellname == "1" then
nameplate.castbar.spell:SetText(effect)
else
nameplate.castbar.spell:SetText("")
end
nameplate.castbar:Show()
if texture then
nameplate.castbar.icon.tex:SetTexture(texture)
nameplate.castbar.icon.tex:SetTexCoord(.1,.9,.1,.9)
end
end
end
else
@@ -1236,4 +1353,4 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
end
pfUI.nameplates = nameplates
end)
end)
+88 -81
View File
@@ -111,7 +111,7 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
if SpellInfo then
spellName, spellRank, texture = SpellInfo(spellId)
end
if GetSpellNameAndRankForId then
if not spellName and GetSpellNameAndRankForId then
spellName, spellRank = GetSpellNameAndRankForId(spellId)
end
@@ -123,9 +123,9 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
end
-- Try GetSpellRec for duration if libdebuff doesn't have it
if duration == 0 and GetSpellRec then
local spellRec = GetSpellRec(spellId)
if spellRec and spellRec.durationIndex and spellRec.durationIndex > 0 then
if duration == 0 and GetSpellRec and spellId then
local success, spellRec = pcall(GetSpellRec, spellId)
if success and spellRec and spellRec.durationIndex and spellRec.durationIndex > 0 then
-- Duration index maps to spell duration - common values:
-- This is a rough approximation since we don't have the duration table
duration = 30 -- Default fallback
@@ -170,21 +170,25 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
local effect, rank, texture, stacks, dtype, duration, timeleft, caster = originalUnitDebuff(self, unit, id)
-- If we have Nampower data for this unit, try to enhance it
local _, guid = UnitExists(unit)
if guid and debuffdb[guid] then
-- Find the debuff by slot
for spellId, data in pairs(debuffdb[guid]) do
if data.slot == id then
-- Use Nampower data for more accurate timing
if data.duration and data.duration > 0 and data.start then
duration = data.duration
timeleft = data.duration + data.start - GetTime()
if timeleft < 0 then timeleft = 0 end
caster = data.caster
stacks = data.stacks or stacks
end
break
if not UnitExists then return effect, rank, texture, stacks, dtype, duration, timeleft, caster end
local exists, guid = UnitExists(unit)
if not exists or not guid or not debuffdb[guid] then
return effect, rank, texture, stacks, dtype, duration, timeleft, caster
end
-- Find the debuff by slot
for spellId, data in pairs(debuffdb[guid]) do
if data.slot == id then
-- Use Nampower data for more accurate timing
if data.duration and data.duration > 0 and data.start then
duration = data.duration
timeleft = data.duration + data.start - GetTime()
if timeleft < 0 then timeleft = 0 end
caster = data.caster
stacks = data.stacks or stacks
end
break
end
end
@@ -222,20 +226,22 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
if SpellInfo then
spellName, spellRank, texture = SpellInfo(spellId)
end
if GetSpellNameAndRankForId then
if not spellName and GetSpellNameAndRankForId then
spellName, spellRank = GetSpellNameAndRankForId(spellId)
end
buffdb[guid][spellId] = {
spellId = spellId,
name = spellName,
rank = spellRank,
texture = texture,
stacks = stackCount or 1,
start = GetTime(),
slot = slot,
auraLevel = auraLevel
}
if spellName then
buffdb[guid][spellId] = {
spellId = spellId,
name = spellName,
rank = spellRank,
texture = texture,
stacks = stackCount or 1,
start = GetTime(),
slot = slot,
auraLevel = auraLevel
}
end
elseif event == "BUFF_REMOVED_OTHER" or event == "BUFF_REMOVED_SELF" then
if buffdb[guid] and buffdb[guid][spellId] then
buffdb[guid][spellId] = nil
@@ -294,13 +300,13 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
local res = GetUnitField(unit, "resistances")
if not res then return nil end
return {
armor = res[1],
holy = res[2],
fire = res[3],
nature = res[4],
frost = res[5],
shadow = res[6],
arcane = res[7]
armor = res[1] or 0,
holy = res[2] or 0,
fire = res[3] or 0,
nature = res[4] or 0,
frost = res[5] or 0,
shadow = res[6] or 0,
arcane = res[7] or 0
}
end
end
@@ -389,13 +395,13 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
local cd = GetSpellIdCooldown(spellId)
if not cd then return nil end
return {
onCooldown = cd.isOnCooldown == 1,
remaining = cd.cooldownRemainingMs / 1000,
remainingMs = cd.cooldownRemainingMs,
gcdRemaining = cd.gcdCategoryRemainingMs / 1000,
gcdRemainingMs = cd.gcdCategoryRemainingMs,
individualRemaining = cd.individualRemainingMs / 1000,
categoryRemaining = cd.categoryRemainingMs / 1000,
onCooldown = (cd.isOnCooldown or 0) == 1,
remaining = (cd.cooldownRemainingMs or 0) / 1000,
remainingMs = cd.cooldownRemainingMs or 0,
gcdRemaining = (cd.gcdCategoryRemainingMs or 0) / 1000,
gcdRemainingMs = cd.gcdCategoryRemainingMs or 0,
individualRemaining = (cd.individualRemainingMs or 0) / 1000,
categoryRemaining = (cd.categoryRemainingMs or 0) / 1000,
}
end
@@ -405,9 +411,9 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
local cd = GetItemIdCooldown(itemId)
if not cd then return nil end
return {
onCooldown = cd.isOnCooldown == 1,
remaining = cd.cooldownRemainingMs / 1000,
remainingMs = cd.cooldownRemainingMs,
onCooldown = (cd.isOnCooldown or 0) == 1,
remaining = (cd.cooldownRemainingMs or 0) / 1000,
remainingMs = cd.cooldownRemainingMs or 0,
}
end
end
@@ -433,9 +439,10 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
if GetTrinkets then
pfUI.api.GetEquippedTrinkets = function()
local trinkets = GetTrinkets()
if not trinkets then return {} end
local equipped = {}
for _, trinket in pairs(trinkets) do
if trinket.bagIndex == nil then -- nil bagIndex = equipped
if trinket and trinket.bagIndex == nil then -- nil bagIndex = equipped
table.insert(equipped, trinket)
end
end
@@ -445,11 +452,11 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
pfUI.api.GetTrinketCooldown = function(slot)
if not GetTrinketCooldown then return nil end
local cd = GetTrinketCooldown(slot)
if cd == -1 then return nil end
if cd == -1 or not cd then return nil end
return {
onCooldown = cd.isOnCooldown == 1,
remaining = cd.cooldownRemainingMs / 1000,
remainingMs = cd.cooldownRemainingMs,
onCooldown = (cd.isOnCooldown or 0) == 1,
remaining = (cd.cooldownRemainingMs or 0) / 1000,
remainingMs = cd.cooldownRemainingMs or 0,
}
end
@@ -473,7 +480,7 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
return GetItemLevel(itemId)
end
local success, stats = pcall(GetItemStats, itemId, true)
if success and stats then
if success and stats and stats.itemLevel then
return stats.itemLevel
end
return nil
@@ -587,41 +594,41 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
-- Spell Database Access via GetSpellRec
if GetSpellRec then
pfUI.api.GetSpellRecord = function(spellId)
local rec = GetSpellRec(spellId)
if not rec then return nil end
local success, rec = pcall(GetSpellRec, spellId)
if not success or not rec then return nil end
return {
spellId = spellId,
name = rec.name,
rank = rec.rank,
description = rec.description,
manaCost = rec.manaCost,
baseLevel = rec.baseLevel,
spellLevel = rec.spellLevel,
maxLevel = rec.maxLevel,
maxTargetLevel = rec.maxTargetLevel,
maxTargets = rec.maxTargets,
durationIndex = rec.durationIndex,
powerType = rec.powerType,
rangeIndex = rec.rangeIndex,
speed = rec.speed,
schoolMask = rec.schoolMask,
runeCostID = rec.runeCostID,
spellMissileID = rec.spellMissileID,
iconID = rec.iconID,
activeIconID = rec.activeIconID,
nameSubtext = rec.nameSubtext,
castingTimeIndex = rec.castingTimeIndex,
categoryRecoveryTime = rec.categoryRecoveryTime,
recoveryTime = rec.recoveryTime,
startRecoveryCategory = rec.startRecoveryCategory,
startRecoveryTime = rec.startRecoveryTime,
name = rec.name or "",
rank = rec.rank or "",
description = rec.description or "",
manaCost = rec.manaCost or 0,
baseLevel = rec.baseLevel or 0,
spellLevel = rec.spellLevel or 0,
maxLevel = rec.maxLevel or 0,
maxTargetLevel = rec.maxTargetLevel or 0,
maxTargets = rec.maxTargets or 0,
durationIndex = rec.durationIndex or 0,
powerType = rec.powerType or 0,
rangeIndex = rec.rangeIndex or 0,
speed = rec.speed or 0,
schoolMask = rec.schoolMask or 0,
runeCostID = rec.runeCostID or 0,
spellMissileID = rec.spellMissileID or 0,
iconID = rec.iconID or 0,
activeIconID = rec.activeIconID or 0,
nameSubtext = rec.nameSubtext or "",
castingTimeIndex = rec.castingTimeIndex or 0,
categoryRecoveryTime = rec.categoryRecoveryTime or 0,
recoveryTime = rec.recoveryTime or 0,
startRecoveryCategory = rec.startRecoveryCategory or 0,
startRecoveryTime = rec.startRecoveryTime or 0,
}
end
-- Get spell school (fire, frost, nature, etc.)
pfUI.api.GetSpellSchool = function(spellId)
local rec = GetSpellRec(spellId)
if not rec then return nil end
local success, rec = pcall(GetSpellRec, spellId)
if not success or not rec or not rec.schoolMask then return nil end
local schools = {
[1] = "Physical",
[2] = "Holy",
@@ -740,4 +747,4 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
},
}
end
end)
end)
+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")
+8 -65
View File
@@ -316,6 +316,7 @@ pfUI:RegisterModule("superwow", "vanilla", function ()
-- assign all required data
local unit = UnitName(target)
local unitlevel = UnitLevel(target)
if not SpellInfo then return end
local effect, rank = SpellInfo(spell)
local duration = libdebuff:GetDuration(effect, rank)
local caster = "player"
@@ -439,70 +440,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 +496,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 +559,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 +579,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
+381
View File
@@ -0,0 +1,381 @@
pfUI:RegisterModule("thirdparty-tbc", "tbc", function ()
-- abort when thirdparty core module is not loaded
if not pfUI.thirdparty then return end
local rawborder, default_border = GetBorderSize()
HookAddonOrVariable("Omen", function()
local docktable = { "omen", "Omen", "OmenBarList",
function() -- single
Omen.BarList:ClearAllPoints()
Omen.BarList:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", -5, 5)
Omen.BarList:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 5, pfUI.panel.right:GetHeight()-5)
Omen.BarList:SetWidth(pfUI.chat.right:GetWidth() + 7)
-- backdrop adjustments
if Omen.BarList.backdrop then
Omen.BarList.backdrop:SetPoint("TOPLEFT", -default_border+5, default_border-5)
Omen.BarList.backdrop:SetPoint("BOTTOMRIGHT", default_border-5, -18-default_border+5)
end
end,
function() -- dual
Omen.BarList:ClearAllPoints()
Omen.BarList:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", -5, 5)
Omen.BarList:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOM", -default_border+5, pfUI.panel.right:GetHeight()-5)
Omen.BarList:SetWidth(pfUI.chat.right:GetWidth() / 2 + 7)
-- backdrop adjustments
if Omen.BarList.backdrop then
Omen.BarList.backdrop:SetPoint("TOPLEFT", -default_border+5, default_border-5)
Omen.BarList.backdrop:SetPoint("BOTTOMRIGHT", default_border-5, -18-default_border+5)
end
end,
function() -- show
Omen:UpdateDisplay()
Omen:EnableLastModule()
Omen:LayoutModuleIcons()
Omen.ModuleList:SetPoint("BOTTOMLEFT", Omen.BarList, "TOPLEFT", 5, default_border*3-5)
Omen.ModuleList:SetPoint("BOTTOMRIGHT", Omen.BarList, "TOPRIGHT", -5, default_border*3)
-- fake sizes to retain proper button sizes
Omen.ModuleList._GetHeight = Omen.ModuleList._GetHeight or Omen.ModuleList.GetHeight
Omen.ModuleList.GetHeight = function() return 30 end
Omen:LayoutModuleIcons()
Omen.ModuleList.GetHeight = Omen.ModuleList._GetHeight
Omen.ModuleList:SetHeight(20)
OmenResizeGrip:Hide()
Omen:Toggle(true)
end,
function() -- hide
Omen:Toggle(nil)
end,
function() -- once
Omen.Title:Hide()
Omen.Title.Show = function() return end
EnableAutohide(Omen.ModuleList, 1)
local hookUpdateDisplay = Omen.UpdateDisplay
Omen.UpdateDisplay = function(self)
hookUpdateDisplay(self)
pfUI.thirdparty.meters:Resize()
end
Omen.UpdateVisible = function()
if pfUI.thirdparty.meters.state then
Omen.Anchor:Show()
else
Omen.Anchor:Hide()
end
end
end,
}
pfUI.thirdparty.meters:RegisterMeter("threat", docktable)
if C.thirdparty.omen.skin == "1" then
if Omen.Anchor then
local hookUpdateDisplay = Omen.UpdateDisplay
Omen.UpdateDisplay = function(self)
hookUpdateDisplay(self)
StripTextures(Omen.Title)
StripTextures(Omen.ModuleList)
StripTextures(Omen.BarList)
if not Omen.Title.backdrop or not Omen.ModuleList.backdrop or not Omen.BarList.backdrop then
CreateBackdrop(Omen.Title, nil, nil, (C.thirdparty.chatbg == "1" and .8))
CreateBackdropShadow(Omen.Title)
CreateBackdrop(Omen.ModuleList, nil, nil, (C.thirdparty.chatbg == "1" and .8))
CreateBackdropShadow(Omen.ModuleList)
CreateBackdrop(Omen.BarList, nil, nil, (C.thirdparty.chatbg == "1" and .8))
CreateBackdropShadow(Omen.BarList)
end
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
Omen.BarList.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
Omen.ModuleList.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
local r, g, b, a = strsplit(",", C.chat.global.border)
Omen.BarList.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
Omen.ModuleList.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
end
end
HookScript(Omen.Anchor, "OnShow", function()
for i, child in pairs({ OmenModuleButtons:GetChildren() }) do
if child and child:IsObjectType("Button") then
child:GetNormalTexture():SetTexCoord(.08, .92, .08, .92)
CreateBackdrop(child, nil, true)
end
end
end)
Omen:UpdateDisplay()
end
end
end)
HookAddonOrVariable("Recount", function()
local docktable = { "recount", "Recount", "Recount_MainWindow",
function() -- single
Recount.MainWindow:ClearAllPoints()
Recount.MainWindow:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", 0, 10)
Recount.MainWindow:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, 18)
Recount.MainWindow:SetWidth(pfUI.chat.right:GetWidth())
end,
function() -- dual
Recount.MainWindow:ClearAllPoints()
Recount.MainWindow:SetPoint("TOPLEFT", pfUI.chat.right, "TOP", default_border, 10)
Recount.MainWindow:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, 18)
Recount.MainWindow:SetWidth(pfUI.chat.right:GetWidth() / 2)
end,
function() -- show
Recount.MainWindow:Show()
Recount:ResizeMainWindow()
Recount:RefreshMainWindow()
end,
function() -- hide
Recount.MainWindow:Hide()
end,
function() -- once
local hookResize = Recount.ResizeMainWindow
Recount.ResizeMainWindow = function()
hookResize()
local a, b, c = Recount.MainWindow:GetPoint()
if b == pfUI.chat.right and Recount.MainWindow.backdrop then
Recount.MainWindow.backdrop:SetPoint("BOTTOMRIGHT", default_border, -18-default_border)
else
Recount.MainWindow.backdrop:SetPoint("BOTTOMRIGHT", default_border, default_border)
end
end
end,
}
pfUI.thirdparty.meters:RegisterMeter("damage", docktable)
if C.thirdparty.recount.skin == "1" then
if Recount_MainWindow then
StripTextures(Recount.MainWindow)
CreateBackdrop(Recount.MainWindow, nil, nil, (C.thirdparty.chatbg == "1" and .8))
CreateBackdropShadow(Recount.MainWindow)
SkinScrollbar(Recount_MainWindow_ScrollBarScrollBar)
Recount_MainWindow_ScrollBarScrollBarScrollUpButton.Overlay:SetTexture(nil)
Recount_MainWindow_ScrollBarScrollBarScrollDownButton.Overlay:SetTexture(nil)
Recount.MainWindow.DragBottomLeft:SetNormalTexture(nil)
Recount.MainWindow.DragBottomRight:SetNormalTexture(nil)
-- backdrop adjustments
Recount.MainWindow.backdrop:SetPoint("TOPLEFT", -default_border, -5-default_border-GetPerfectPixel())
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
Recount.MainWindow.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
local r, g, b, a = strsplit(",", C.chat.global.border)
Recount.MainWindow.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
end
end
end
end)
HookAddonOrVariable("BCEPGP_LootFrame_Update", function()
if C.thirdparty.bcepgp.enable == "0" then return end
local hook = _G.BCEPGP_LootFrame_Update
_G.BCEPGP_LootFrame_Update = function(a,b,c,d,e,f)
LootFrame.numLootItems = GetNumLootItems()
hook(a,b,c,d,e,f)
end
end)
-- Sheep Watch Continued
-- https://www.curseforge.com/wow/addons/sheep-watch-continued/files/225593
HookAddonOrVariable("SheepWatch", function()
if C.thirdparty.sheepwatch.enable == "0" then return end
StripTextures(SheepWatch)
if SheepWatchFrameStatusBar then
SheepWatchFrameStatusBar:SetStatusBarTexture(pfUI.media["img:bar"])
SheepWatchFrameStatusBar:SetHeight(14)
CreateBackdrop(SheepWatchFrameStatusBar)
CreateBackdropShadow(SheepWatchFrameStatusBar)
end
if SheepWatchText then
SheepWatchText:ClearAllPoints()
SheepWatchText:SetPoint("CENTER", 0, 4)
end
if SheepWatchCounterText then
SheepWatchCounterText:ClearAllPoints()
SheepWatchCounterText:SetPoint("RIGHT", 0, 4)
end
end)
HookAddonOrVariable("Bag_Sort", function()
if C.thirdparty.bag_sort.enable == "0" then return end
local sort = CreateFrame("Frame", nil)
sort:RegisterEvent("PLAYER_ENTERING_WORLD")
sort:SetScript("OnEvent", function()
this:UnregisterAllEvents()
pfUI.thirdparty.RegisterBagSort("Bag_Sort",
function()
BS_slashBagSortHandler()
end,
function()
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
GameTooltip:SetText(GetAddOnMetadata("Bag_Sort","Title"))
GameTooltip:AddLine(GetAddOnMetadata("Bag_Sort","Notes"),1,1,1)
GameTooltip:Show()
end,
function()
BS_slashBankSortHandler()
end,
function()
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
GameTooltip:SetText(GetAddOnMetadata("Bag_Sort","Title"))
GameTooltip:AddLine(GetAddOnMetadata("Bag_Sort","Notes"),1,1,1)
GameTooltip:Show()
end)
end)
end)
HookAddonOrVariable("AckisRecipeList", function()
if C.thirdparty.ackis.enable == "0" then return end
if AckisRecipeList.ShowScanButton then
local AckisRecipeListShowScanButton = AckisRecipeList.ShowScanButton
AckisRecipeList.ShowScanButton = function(a1,a2,a3,a4)
-- run the original function
AckisRecipeListShowScanButton(a1,a2,a3,a4)
-- apply skin and reposition the button
SkinButton(AckisRecipeList.ScanButton)
local a,b,c,d,e = AckisRecipeList.ScanButton:GetPoint()
AckisRecipeList.ScanButton:SetPoint(a,b,c,d-14,e-2)
end
end
end)
HookAddonOrVariable("TotemTimers", function()
if C.thirdparty.totemtimers.enable == "0" then return end
local function skin(button, weapon)
if button and not button.pfskinned then
button.pfskinned = true
local icon = button.icon or _G[button:GetName().."Icon"]
icon:SetDrawLayer("BORDER")
SkinButton(button, nil, nil, nil, icon)
SetAllPointsOffset(icon, button, 2)
if _G[button:GetName().."Flash"] then
SetAllPointsOffset(_G[button:GetName().."Flash"], button, 3)
_G[button:GetName().."Flash"]:SetTexCoord(.08, .92, .08, .92)
end
if button.spellIcon then
button.spellIcon:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2)
button.spellIcon:SetTexCoord(.08, .92, .08, .92)
end
if weapon then
-- weapon button skin workaround taken from ElvUI-TBC:
-- https://github.com/ElvUI-TBC/ElvUI_AddOnSkins/blob/master/ElvUI_AddOnSkins/Skins/Addons/totemTimers.lua#L92-L135
local icon2frame = _G[button:GetName().."Icon2Frame"]
icon2frame:SetFrameStrata("MEDIUM")
icon2frame:SetWidth(icon2frame:GetWidth() + 1)
button.icon2 = _G[button:GetName().."Icon2"]
SetAllPointsOffset(button.icon2, icon2frame, 2)
button.icon1Frame = CreateFrame("Frame", "TotemTimers_MainHandIcon1Frame", button)
button.icon1Frame:SetWidth(16)
button.icon1Frame:SetHeight(30)
button.icon1Frame:SetPoint("LEFT", 0, 0)
button.icon1 = button.icon1Frame:CreateTexture(nil, "MEDIUM")
SetAllPointsOffset(button.icon1, button.icon1Frame, 3)
button.icon1:SetTexture(icon:GetTexture())
button.icon1:SetAlpha(icon:GetAlpha())
_G[button:GetName().."Cooldown"]:SetFrameLevel(button.icon1Frame:GetFrameLevel() + 1)
icon:Hide()
hooksecurefunc(icon, "SetTexture", function(_, texture)
button.icon1:SetTexture(texture)
end)
hooksecurefunc(icon, "SetAlpha", function(_, alpha)
button.icon1:SetAlpha(alpha)
end)
if icon:GetTexCoordModifiesRect() then
button.icon1:SetTexCoord(.08, .5, .08, .92)
else
button.icon1:SetTexCoord(.08, .92, .08, .92)
end
button.icon2:SetTexCoord(.5, .92, .08, .92)
hooksecurefunc(icon, "SetTexCoord", function(self, arg1, arg2)
if arg2 == 0.5 and arg1 == 0 then
button.icon1:SetTexCoord(.08, .5, .08, .92)
elseif arg2 == 1 then
button.icon1:SetTexCoord(.08, .92, .08, .92)
end
end)
hooksecurefunc(button.icon2, "SetTexCoord", function(self, arg1, arg2)
if arg2 == 1 then self:SetTexCoord(.5, .92, .08, .92) end
end)
end
end
end
hooksecurefunc("TotemTimers_SetupGlobals", function()
for i=1,4 do -- skin main buttons
for j=1,10 do skin(_G[i.."SlaveButton"..j]) end
skin(_G["TotemTimers"..i])
end
for _, timer in pairs({ "EarthElemental", "FireElemental", "ManaTide", "ManaTrinket" }) do
skin(_G["TotemTimers_"..timer])
end
for i, tracker in pairs({ "Ankh", "Shield", "MainHand", "EarthShield" }) do
skin(_G["TotemTimers_"..tracker], i==3)
end
end)
end)
HookAddonOrVariable("DruidBarFrame", function()
if C.thirdparty.druidbar.enable == "0" then return end
local p = ManaBarColor[0]
local pr, pg, pb = 0, 0, 0
if p then pr, pg, pb = p.r + .5, p.g +.5, p.b +.5 end
DruidBarKey.color = { pr, pg, pb, 1 }
DruidBarKey.bordercolor = {1,1,1,0}
DruidBarKey.bgcolor = {0,0,0,0}
DruidBarKey.manatexture = pfUI.media[pfUI.uf.player.config.pbartexture]
DruidBarKey.bordertexture = ""
hooksecurefunc("DruidBar_MainGraphics", function()
local f = pfUI.uf.player
DruidBarFrame:SetWidth((f.config.pwidth ~= "-1" and f.config.pwidth or f.config.width))
DruidBarFrame:SetHeight(f.config.pheight)
DruidBarMana:SetAllPoints(DruidBarFrame)
DruidBarText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
DruidBarText1:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
StripTextures(DruidBarFrame)
CreateBackdrop(DruidBarFrame)
CreateBackdropShadow(DruidBarFrame)
end)
end)
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)