mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-15 01:30:50 +00:00
raidframe fixes
This commit is contained in:
+2
-2
@@ -455,13 +455,13 @@ pfUI:RegisterSkin("Friends", "vanilla:tbc", function ()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- RaidFrameConvertToRaidButton and friends are part of Blizzard_RaidUI in Turtle WoW
|
-- all RaidFrame buttons are in Blizzard_RaidUI in Turtle WoW
|
||||||
HookAddonOrVariable("Blizzard_RaidUI", function()
|
HookAddonOrVariable("Blizzard_RaidUI", function()
|
||||||
if RaidFrameRaidInfoButton then SkinButton(RaidFrameRaidInfoButton) end
|
if RaidFrameRaidInfoButton then SkinButton(RaidFrameRaidInfoButton) end
|
||||||
if RaidFrameConvertToRaidButton then SkinButton(RaidFrameConvertToRaidButton) end
|
if RaidFrameConvertToRaidButton then SkinButton(RaidFrameConvertToRaidButton) end
|
||||||
if RaidFrameReadyCheckButton then SkinButton(RaidFrameReadyCheckButton) end
|
if RaidFrameReadyCheckButton then SkinButton(RaidFrameReadyCheckButton) end
|
||||||
if RaidFrameAddMemberButton then SkinButton(RaidFrameAddMemberButton) end
|
if RaidFrameAddMemberButton then SkinButton(RaidFrameAddMemberButton) end
|
||||||
-- RaidGroup frames and buttons are hidden by modules/raid.lua, no skinning needed
|
-- RaidGroup frames and buttons are hidden by modules/raid.lua
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
+13
-38
@@ -2,43 +2,9 @@ pfUI:RegisterModule("raid", "vanilla:tbc", function ()
|
|||||||
-- do not go further on disabled UFs
|
-- do not go further on disabled UFs
|
||||||
if C.unitframes.disable == "1" then return end
|
if C.unitframes.disable == "1" then return end
|
||||||
|
|
||||||
-- hide blizzard raid group frames so they don't overlap pfUI raid frames
|
-- tell RaidFrame.lua pfUI replaces party frames
|
||||||
local function HideBlizzardRaidFrames()
|
|
||||||
for i = 1, NUM_RAID_GROUPS do
|
|
||||||
local frame = _G["RaidGroup"..i]
|
|
||||||
if frame then
|
|
||||||
local wasVisible = frame:IsShown() and "visible" or "hidden"
|
|
||||||
frame:Hide()
|
|
||||||
frame:UnregisterAllEvents()
|
|
||||||
frame.Show = function()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if wasVisible == "visible" then
|
|
||||||
end
|
|
||||||
else
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for i = 1, MAX_RAID_MEMBERS do
|
|
||||||
local button = _G["RaidGroupButton"..i]
|
|
||||||
if button then
|
|
||||||
button:Hide()
|
|
||||||
button:UnregisterAllEvents()
|
|
||||||
button.Show = function() return end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
GROUP_REPLACE_PARTY = "1"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- run once when Blizzard_RaidUI loads
|
|
||||||
HookAddonOrVariable("Blizzard_RaidUI", function()
|
HookAddonOrVariable("Blizzard_RaidUI", function()
|
||||||
HideBlizzardRaidFrames()
|
GROUP_REPLACE_PARTY = "1"
|
||||||
|
|
||||||
-- RaidGroupFrame_Update calls :Show() on all RaidGroup frames every update
|
|
||||||
-- hook it to immediately re-hide them after Blizzard shows them
|
|
||||||
if RaidGroupFrame_Update then
|
|
||||||
hooksecurefunc("RaidGroupFrame_Update", HideBlizzardRaidFrames)
|
|
||||||
else
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
pfUI.uf.raid = CreateFrame("Frame", "pfRaidUpdater", UIParent)
|
pfUI.uf.raid = CreateFrame("Frame", "pfRaidUpdater", UIParent)
|
||||||
@@ -123,12 +89,21 @@ pfUI:RegisterModule("raid", "vanilla:tbc", function ()
|
|||||||
|
|
||||||
pfUI.uf.raid:Hide()
|
pfUI.uf.raid:Hide()
|
||||||
pfUI.uf.raid:RegisterEvent("RAID_ROSTER_UPDATE")
|
pfUI.uf.raid:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||||
|
pfUI.uf.raid:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||||
|
pfUI.uf.raid:RegisterEvent("PARTY_LEADER_CHANGED")
|
||||||
pfUI.uf.raid:RegisterEvent("VARIABLES_LOADED")
|
pfUI.uf.raid:RegisterEvent("VARIABLES_LOADED")
|
||||||
pfUI.uf.raid:SetScript("OnEvent", function() this:Show() end)
|
pfUI.uf.raid:SetScript("OnEvent", function()
|
||||||
|
this:Show()
|
||||||
|
-- Debounce: delay update by 0.5s to batch rapid roster changes (mass swaps)
|
||||||
|
this.pendingUpdate = GetTime() + 0.5
|
||||||
|
end)
|
||||||
pfUI.uf.raid:SetScript("OnUpdate", function()
|
pfUI.uf.raid:SetScript("OnUpdate", function()
|
||||||
-- Throttle raid roster updates to 1 FPS
|
-- Wait for debounce: don't update until 0.5s after last event
|
||||||
|
if this.pendingUpdate and GetTime() < this.pendingUpdate then return end
|
||||||
|
-- Throttle raid roster updates to 1 FPS max
|
||||||
if (this.tick or 0) > GetTime() then return end
|
if (this.tick or 0) > GetTime() then return end
|
||||||
this.tick = GetTime() + 1.0
|
this.tick = GetTime() + 1.0
|
||||||
|
this.pendingUpdate = nil
|
||||||
|
|
||||||
-- don't proceed without raid or during combat
|
-- don't proceed without raid or during combat
|
||||||
if not UnitInRaid("player") or (InCombatLockdown and InCombatLockdown()) then return end
|
if not UnitInRaid("player") or (InCombatLockdown and InCombatLockdown()) then return end
|
||||||
|
|||||||
+12
-17
@@ -1,39 +1,34 @@
|
|||||||
pfUI:RegisterSkin("RaidUI", "vanilla", function ()
|
pfUI:RegisterSkin("RaidUI", "vanilla", function ()
|
||||||
HookAddonOrVariable("Blizzard_RaidUI", function()
|
HookAddonOrVariable("Blizzard_RaidUI", function()
|
||||||
|
|
||||||
-- skin each RaidGroup frame (8 groups, each with a label + 5 slots)
|
|
||||||
for i = 1, NUM_RAID_GROUPS do
|
for i = 1, NUM_RAID_GROUPS do
|
||||||
local group = _G["RaidGroup"..i]
|
local group = _G["RaidGroup"..i]
|
||||||
if group then
|
if group then
|
||||||
StripTextures(group)
|
StripTextures(group)
|
||||||
CreateBackdrop(group, nil, nil, .75)
|
|
||||||
|
|
||||||
local label = _G["RaidGroup"..i.."Label"]
|
for j = 1, MEMBERS_PER_RAID_GROUP do
|
||||||
if label then
|
local slot = _G["RaidGroup"..i.."Slot"..j]
|
||||||
label:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
if slot then
|
||||||
|
StripTextures(slot)
|
||||||
|
CreateBackdrop(slot, nil, true)
|
||||||
|
SetHighlight(slot, 1, 1, 0)
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- skin each RaidGroupButton (40 members)
|
|
||||||
for i = 1, MAX_RAID_MEMBERS do
|
for i = 1, MAX_RAID_MEMBERS do
|
||||||
local button = _G["RaidGroupButton"..i]
|
local button = _G["RaidGroupButton"..i]
|
||||||
if button then
|
if button then
|
||||||
StripTextures(button)
|
StripTextures(button)
|
||||||
CreateBackdrop(button, nil, nil, .75)
|
CreateBackdrop(button, nil, true)
|
||||||
|
SetHighlight(button, 1, 1, 0)
|
||||||
local name = _G["RaidGroupButton"..i.."Name"]
|
|
||||||
local level = _G["RaidGroupButton"..i.."Level"]
|
|
||||||
local class = _G["RaidGroupButton"..i.."Class"]
|
|
||||||
if name then name:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE") end
|
|
||||||
if level then level:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE") end
|
|
||||||
if class then class:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE") end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- skin the Add Member and Ready Check buttons on the RaidFrame panel
|
if RaidFrameAddMemberButton then SkinButton(RaidFrameAddMemberButton) end
|
||||||
SkinButton(RaidFrameAddMemberButton)
|
if RaidFrameReadyCheckButton then SkinButton(RaidFrameReadyCheckButton) end
|
||||||
SkinButton(RaidFrameReadyCheckButton)
|
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user