mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 04:30:01 +00:00
Reputation Frame: Enhance faction standing bars
This commit is contained in:
@@ -915,6 +915,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("questlog", nil, "showQuestLevels", "0")
|
||||
|
||||
pfUI:UpdateConfig("character", "inventory", "durability", "1")
|
||||
pfUI:UpdateConfig("character", "reputation", "repRequired", "1")
|
||||
pfUI:UpdateConfig("thirdparty", nil, "chatbg", "1")
|
||||
pfUI:UpdateConfig("thirdparty", nil, "showmeter", "0")
|
||||
pfUI:UpdateConfig("thirdparty", "dpsmate", "skin", "0")
|
||||
|
||||
@@ -2397,6 +2397,10 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, T["Show Durability"], C.character.inventory, "durability", "checkbox")
|
||||
end)
|
||||
|
||||
CreateGUIEntry(T["Character"], T["Reputation"], function()
|
||||
CreateConfig(nil, T["Show Rep Required To Next Standing"], C.character.reputation, "repRequired", "checkbox")
|
||||
end)
|
||||
|
||||
CreateGUIEntry(T["Bags & Bank"], nil, function()
|
||||
CreateConfig(nil, T["Disable Item Quality Color For \"Common\" Items"], C.appearance.bags, "borderlimit", "checkbox")
|
||||
CreateConfig(nil, T["Enable Item Quality Color For Equipment Only"], C.appearance.bags, "borderonlygear", "checkbox")
|
||||
|
||||
@@ -287,6 +287,31 @@ pfUI:RegisterSkin("Character", function ()
|
||||
SkinCheckbox(ReputationDetailAtWarCheckBox)
|
||||
SkinCheckbox(ReputationDetailInactiveCheckBox)
|
||||
SkinCheckbox(ReputationDetailMainScreenCheckBox)
|
||||
|
||||
-- Append "(N)" to each standing label where N is rep remaining to the
|
||||
-- next reaction. Skip exalted (reaction 8) and effectively-capped bars.
|
||||
-- Each bar's OnLeave handler (Blizzard's ReputationFrame.xml) restores
|
||||
-- the FactionStanding text from `bar.standingText` on mouseout, so we
|
||||
-- stash our augmented text there too — otherwise hovering a bar strips
|
||||
-- the "(N)" suffix off.
|
||||
hooksecurefunc("ReputationFrame_Update", function()
|
||||
if C.character.reputation.repRequired ~= "1" then return end
|
||||
local offset = FauxScrollFrame_GetOffset(ReputationListScrollFrame)
|
||||
for i = 1, NUM_FACTIONS_DISPLAYED do
|
||||
local standing = _G["ReputationBar"..i.."FactionStanding"]
|
||||
if standing and standing:IsVisible() then
|
||||
local faction = C_Reputation.GetFactionDataByIndex(offset + i)
|
||||
if faction and faction.reaction and faction.reaction < 8 then
|
||||
local repLeft = faction.nextReactionThreshold - faction.currentStanding
|
||||
if repLeft > 1 then
|
||||
local text = standing:GetText() .. string.format(" (%d)", repLeft)
|
||||
standing:SetText(text)
|
||||
standing:GetParent().standingText = text
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
do -- Skills Tab
|
||||
|
||||
Reference in New Issue
Block a user