mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 05:00:02 +00:00
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:
+8
-4
@@ -3,10 +3,6 @@ pfUI.api = { }
|
||||
-- load pfUI environment
|
||||
setfenv(1, pfUI:GetEnvironment())
|
||||
|
||||
-- Client API shortcuts
|
||||
gfind = string.gmatch or string.gfind
|
||||
mod = math.mod or mod
|
||||
|
||||
-- [ DLL Detection Helpers ]
|
||||
-- Detects presence of various DLL extensions for enhanced functionality
|
||||
|
||||
@@ -83,6 +79,10 @@ function pfUI.api.UnitIsBehind(unit1, unit2)
|
||||
return nil
|
||||
end
|
||||
|
||||
-- Client API shortcuts
|
||||
gfind = string.gmatch or string.gfind
|
||||
mod = math.mod or mod
|
||||
|
||||
-- [ strsplit ]
|
||||
-- Splits a string using a delimiter.
|
||||
-- 'delimiter' [string] characters that will be interpreted as delimiter
|
||||
@@ -1260,6 +1260,10 @@ function pfUI.api.EnableAutohide(frame, timeout, combat)
|
||||
end
|
||||
|
||||
frame.hover:SetScript("OnUpdate", function()
|
||||
-- throttle to 0.05s
|
||||
if (this.tick or 0) > GetTime() then return end
|
||||
this.tick = GetTime() + 0.05
|
||||
|
||||
if this.activeTo == "keep" then return end
|
||||
|
||||
if MouseIsOver(this, 10, -10, -10, 10) then
|
||||
|
||||
+10
-6
@@ -221,6 +221,13 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", nil, "druidmanabar", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "druidmanaheight", "2")
|
||||
pfUI:UpdateConfig("unitframes", nil, "druidmanatext", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "rangechecki", "4")
|
||||
pfUI:UpdateConfig("unitframes", nil, "combowidth", "6")
|
||||
pfUI:UpdateConfig("unitframes", nil, "comboheight", "6")
|
||||
pfUI:UpdateConfig("unitframes", nil, "abbrevnum", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "abbrevname", "1")
|
||||
|
||||
-- Nampower Settings
|
||||
pfUI:UpdateConfig("unitframes", nil, "spellqueue", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "spellqueuesize", "24")
|
||||
pfUI:UpdateConfig("unitframes", nil, "gcd_indicator", "0")
|
||||
@@ -229,15 +236,12 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", nil, "reactive_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "reactive_size", "28")
|
||||
pfUI:UpdateConfig("unitframes", nil, "damage_tracking", "0")
|
||||
|
||||
-- UnitXP Settings
|
||||
pfUI:UpdateConfig("unitframes", nil, "los_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "behind_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "unitxp_notify", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "track_group", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "rangechecki", "4")
|
||||
pfUI:UpdateConfig("unitframes", nil, "combowidth", "6")
|
||||
pfUI:UpdateConfig("unitframes", nil, "comboheight", "6")
|
||||
pfUI:UpdateConfig("unitframes", nil, "abbrevnum", "1")
|
||||
pfUI:UpdateConfig("unitframes", nil, "abbrevname", "1")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", nil, "selfingroup", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "selfinraid", "0")
|
||||
@@ -725,8 +729,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("chat", "text", "playerlinks", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "detecturl", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "classcolor", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "playerlevel", "1")
|
||||
pfUI:UpdateConfig("chat", "text", "whosearchunknown", "0")
|
||||
pfUI:UpdateConfig("chat", "text", "playerlevel", "1")
|
||||
pfUI:UpdateConfig("chat", "left", "width", "380")
|
||||
pfUI:UpdateConfig("chat", "left", "height", "180")
|
||||
pfUI:UpdateConfig("chat", "right", "enable", "0")
|
||||
|
||||
+32
-10
@@ -1,6 +1,8 @@
|
||||
-- load pfUI environment
|
||||
setfenv(1, pfUI:GetEnvironment())
|
||||
|
||||
local superwow_active = HasSuperWoW()
|
||||
|
||||
pfUI.uf = CreateFrame("Frame", nil, UIParent)
|
||||
pfUI.uf:SetScript("OnUpdate", function()
|
||||
if InCombatLockdown and not InCombatLockdown() then
|
||||
@@ -29,17 +31,21 @@ pfUI.uf.RebuildUnitmap = function()
|
||||
if pfUI.uf.raid then
|
||||
for i = 1, 40 do
|
||||
local frame = pfUI.uf.raid[i]
|
||||
if frame and frame.id and frame.id ~= 0 then
|
||||
pfUI.uf.unitmap["raid" .. frame.id] = frame
|
||||
if frame and frame.id and frame.id ~= 0 and frame.label then
|
||||
-- ✅ Jetzt auch party-Frames in Raid-Frames unterstützen
|
||||
local unitstr = frame.label .. frame.id
|
||||
pfUI.uf.unitmap[unitstr] = frame
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Rebuild party mappings
|
||||
for i = 1, 4 do
|
||||
local frame = _G["pfGroup" .. i]
|
||||
if frame and frame.label == "party" then
|
||||
pfUI.uf.unitmap["party" .. frame.id] = frame
|
||||
-- Rebuild party mappings (nur wenn nicht als Raid verwendet)
|
||||
if C.unitframes.raidforgroup ~= "1" then
|
||||
for i = 1, 4 do
|
||||
local frame = _G["pfGroup" .. i]
|
||||
if frame and frame.label == "party" then
|
||||
pfUI.uf.unitmap["party" .. frame.id] = frame
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -242,7 +248,8 @@ end)
|
||||
|
||||
local aggrodata = { }
|
||||
function pfUI.api.UnitHasAggro(unit)
|
||||
if aggrodata[unit] and GetTime() < aggrodata[unit].check + 1 then
|
||||
-- Only cache positive results (has aggro) - allows fast detection when aggro changes
|
||||
if aggrodata[unit] and aggrodata[unit].state > 0 and GetTime() < aggrodata[unit].check + 1 then
|
||||
return aggrodata[unit].state
|
||||
end
|
||||
|
||||
@@ -984,8 +991,8 @@ function pfUI.uf.OnUpdate()
|
||||
-- Throttle for raid/party frames: only process updates every 0.1s
|
||||
-- This reduces OnUpdate calls from 5760/sec (40 frames * 144fps) to ~400/sec
|
||||
if this.label == "raid" or this.label == "party" then
|
||||
if (this.tick or 0) > GetTime() then return end
|
||||
this.tick = GetTime() + 0.1
|
||||
if (this.throttleTick or 0) > GetTime() then return end
|
||||
this.throttleTick = GetTime() + 0.1
|
||||
end
|
||||
|
||||
-- process indicator update events
|
||||
@@ -1259,6 +1266,9 @@ function pfUI.uf:EnableEvents()
|
||||
f:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||
f:RegisterEvent("PARTY_LOOT_METHOD_CHANGED")
|
||||
f:RegisterEvent("RAID_TARGET_UPDATE")
|
||||
f:RegisterEvent("PARTY_MEMBER_ENABLE")
|
||||
f:RegisterEvent("PARTY_MEMBER_DISABLE")
|
||||
f:RegisterEvent("PLAYER_UPDATE_RESTING")
|
||||
|
||||
-- Unitmap aktualisieren
|
||||
pfUI.uf.RebuildUnitmap()
|
||||
@@ -2403,6 +2413,8 @@ function pfUI.uf:SetupBuffIndicators(config)
|
||||
if myclass == "WARRIOR" then
|
||||
-- Battle Shout
|
||||
table.insert(indicators, "interface\\icons\\ability_warrior_battleshout")
|
||||
-- Commanding Shout (TBC)
|
||||
table.insert(indicators, "interface\\icons\\ability_warrior_rallyingcry")
|
||||
end
|
||||
|
||||
if myclass == "MAGE" then
|
||||
@@ -2421,6 +2433,14 @@ function pfUI.uf:SetupBuffIndicators(config)
|
||||
|
||||
-- Aspect of the Pack
|
||||
table.insert(indicators, "interface\\icons\\ability_mount_whitetiger")
|
||||
|
||||
-- Misdirection (TBC)
|
||||
table.insert(indicators, "interface\\icons\\ability_hunter_misdirection")
|
||||
end
|
||||
|
||||
if myclass == "SHAMAN" then
|
||||
-- Earth Shield (TBC)
|
||||
table.insert(indicators, "interface\\icons\\spell_nature_skinofearth")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2449,6 +2469,8 @@ function pfUI.uf:SetupBuffIndicators(config)
|
||||
table.insert(indicators, "interface\\icons\\spell_holy_renew")
|
||||
-- Power Word: Shield
|
||||
table.insert(indicators, "interface\\icons\\spell_holy_powerwordshield")
|
||||
-- Prayer of Mending (TBC)
|
||||
table.insert(indicators, "interface\\icons\\spell_holy_prayerofmendingtga")
|
||||
end
|
||||
|
||||
if myclass == "DRUID" or config.all_hots == "1" then
|
||||
|
||||
Reference in New Issue
Block a user