5 Commits
Author SHA1 Message Date
0cabf2ec29 Add equipment manager auto-switching and "Unused" items panel (#70)
* Add equipment manager auto-switching and "Unused" items panel

Equipment manager (modules/equipmentmanager.lua):
- Add automatic set switching: ordered triggers (mounted, swimming,
  eating/drinking, shapeshift form/stance, zone, instance type, time
  of day, resting, stealthed, targeting a boss) equip a set; topmost
  matching trigger wins, with a 0.5s debounce
- Never swap gear in combat, while dead or casting; optionally restore
  the previous gear via a hidden "pfUI Auto-Restore" set
- Add an "Unused" side panel listing equippable items in bags, bank
  and paperdoll that no set uses, with an ignore list (tools and quest
  disguises pre-ignored), bank snapshot and bag highlighting
- Persist triggers, ignore list and bank snapshot in new per-character
  SavedVariable pfUI_eqmgr (all three .toc files)
- Add Character > Equipment Manager options (autoswitch, announce,
  minimum item quality, include bank) in gui.lua and config.lua
- Hide ignored-slot overlays when the manager frame is closed

Add frFR translations for the new equipment manager strings.

* equipmentmanager: lean on ClassicAPI for unused scan and autoswitch

- Unused panel: list items via GetInventoryItemsForSlot instead of
  hand-packing locations and walking the bags.
- Bank snapshot: record set membership while the bank is open.
  GetItemLocations reports bank items as missing once it closes, so set
  items in the bank were listed as unused.
- Autoswitch: check CanUseEquipmentSets and the UseEquipmentSet result
  before marking a trigger applied, and retry when the swap is blocked.
- Drive the engine from events (aura, form, zone, resting, target,
  regen) instead of a 4 Hz ticker; poll only swimming, time and eating.
- Detect eating/drinking by the localized names of the Food (433) and
  Drink (430) auras instead of hardcoded locale strings and icon paths.
- Drop presence guards on APIs that always exist; use strsplittable and
  strtrim for trigger values.

* equipmentmanager: wake the dining trigger on player health/mana events

Drop dining from the poll: listen to UNIT_HEALTH/UNIT_MANA for the player
while a dining trigger is enabled, so taking the set off once full is
event-driven. Register UNIT_AURA for the player only.

* equipmentmanager: split trigger values with strsplit

strsplittable needs ClassicAPI 1.17.11; strsplit has been there since
1.7.3, so this keeps the minimum where it is.

* equipmentmanager: let the trigger hint wrap

---------

Co-authored-by: Duciel <336374+Duciel@users.noreply.github.com>
Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
2026-10-27 11:02:44 -05:00
Brues fe376b8e51 Keep buff timer text above the cooldown sweep 2026-10-25 20:32:49 -05:00
Brues e326cea05e Add radial sweeps to buff/debuff icon display 2026-10-25 20:26:45 -05:00
Brues d9e74b3bc5 Add per-frame reverse toggle for cooldown sweeps 2026-10-25 20:24:12 -05:00
Brues 0e428de74c Fix inactive nameplate alpha capped at 99%
CacheConfig clamped notargalpha to 0.99, so a 100% setting never reached full opacity. Clamp to 1.0 instead and detect the target plate by GUID comparison only, removing the alpha-based fallback that required the headroom.
2026-10-25 20:00:50 -05:00
14 changed files with 1457 additions and 16 deletions
+11
View File
@@ -71,6 +71,8 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("buffs", nil, "debuffrowsize", "16") pfUI:UpdateConfig("buffs", nil, "debuffrowsize", "16")
pfUI:UpdateConfig("buffs", nil, "textinside", "0") pfUI:UpdateConfig("buffs", nil, "textinside", "0")
pfUI:UpdateConfig("buffs", nil, "fontsize", "-1") pfUI:UpdateConfig("buffs", nil, "fontsize", "-1")
pfUI:UpdateConfig("buffs", nil, "cooldown_anim", "1")
pfUI:UpdateConfig("buffs", nil, "cooldown_reverse", "1")
pfUI:UpdateConfig("buffbar", "pbuff", "enable", "0") pfUI:UpdateConfig("buffbar", "pbuff", "enable", "0")
pfUI:UpdateConfig("buffbar", "pbuff", "use_unitfonts", "0") pfUI:UpdateConfig("buffbar", "pbuff", "use_unitfonts", "0")
@@ -174,6 +176,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("appearance", "bags", "abovechat", "0") pfUI:UpdateConfig("appearance", "bags", "abovechat", "0")
pfUI:UpdateConfig("appearance", "bags", "hidechat", "0") pfUI:UpdateConfig("appearance", "bags", "hidechat", "0")
pfUI:UpdateConfig("appearance", "bags", "icon_size", "-1") pfUI:UpdateConfig("appearance", "bags", "icon_size", "-1")
pfUI:UpdateConfig("appearance", "bags", "cooldown_reverse", "0")
pfUI:UpdateConfig("appearance", "bags", "bagrowlength", "10") pfUI:UpdateConfig("appearance", "bags", "bagrowlength", "10")
pfUI:UpdateConfig("appearance", "bags", "bankrowlength", "10") pfUI:UpdateConfig("appearance", "bags", "bankrowlength", "10")
pfUI:UpdateConfig("appearance", "bags", "autoSortOnOpen", "0") pfUI:UpdateConfig("appearance", "bags", "autoSortOnOpen", "0")
@@ -516,6 +519,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", unit, "pspace", "-3") pfUI:UpdateConfig("unitframes", unit, "pspace", "-3")
pfUI:UpdateConfig("unitframes", unit, "cooldown_text", "1") pfUI:UpdateConfig("unitframes", unit, "cooldown_text", "1")
pfUI:UpdateConfig("unitframes", unit, "cooldown_anim", "0") pfUI:UpdateConfig("unitframes", unit, "cooldown_anim", "0")
pfUI:UpdateConfig("unitframes", unit, "cooldown_reverse", "1")
pfUI:UpdateConfig("unitframes", unit, "buffs", "TOPLEFT") pfUI:UpdateConfig("unitframes", unit, "buffs", "TOPLEFT")
pfUI:UpdateConfig("unitframes", unit, "buffsize", "20") pfUI:UpdateConfig("unitframes", unit, "buffsize", "20")
pfUI:UpdateConfig("unitframes", unit, "bufflimit", "32") pfUI:UpdateConfig("unitframes", unit, "bufflimit", "32")
@@ -682,6 +686,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("bars", nil, "bind_size", "8") pfUI:UpdateConfig("bars", nil, "bind_size", "8")
pfUI:UpdateConfig("bars", nil, "bind_color", "1,1,0,1") pfUI:UpdateConfig("bars", nil, "bind_color", "1,1,0,1")
pfUI:UpdateConfig("bars", nil, "cd_size", "12") pfUI:UpdateConfig("bars", nil, "cd_size", "12")
pfUI:UpdateConfig("bars", nil, "cooldown_reverse", "0")
pfUI:UpdateConfig("bars", "gryphons", "texture", "None") pfUI:UpdateConfig("bars", "gryphons", "texture", "None")
pfUI:UpdateConfig("bars", "gryphons", "color", ".6,.6,.6,1") pfUI:UpdateConfig("bars", "gryphons", "color", ".6,.6,.6,1")
@@ -695,6 +700,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("totems", nil, "iconsize", "26") pfUI:UpdateConfig("totems", nil, "iconsize", "26")
pfUI:UpdateConfig("totems", nil, "spacing", "3") pfUI:UpdateConfig("totems", nil, "spacing", "3")
pfUI:UpdateConfig("totems", nil, "showbg", "0") pfUI:UpdateConfig("totems", nil, "showbg", "0")
pfUI:UpdateConfig("totems", nil, "cooldown_reverse", "1")
pfUI:UpdateConfig("panel", nil, "use_unitfonts", "0") pfUI:UpdateConfig("panel", nil, "use_unitfonts", "0")
pfUI:UpdateConfig("panel", nil, "hide_leftchat", "0") pfUI:UpdateConfig("panel", nil, "hide_leftchat", "0")
@@ -942,6 +948,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "debufftimers", "1") pfUI:UpdateConfig("nameplates", nil, "debufftimers", "1")
pfUI:UpdateConfig("nameplates", nil, "debufftext", "1") pfUI:UpdateConfig("nameplates", nil, "debufftext", "1")
pfUI:UpdateConfig("nameplates", nil, "debuffanim", "0") pfUI:UpdateConfig("nameplates", nil, "debuffanim", "0")
pfUI:UpdateConfig("nameplates", nil, "debreverse", "1")
pfUI:UpdateConfig("abuttons", nil, "enable", "1") pfUI:UpdateConfig("abuttons", nil, "enable", "1")
pfUI:UpdateConfig("abuttons", nil, "position", "bottom") pfUI:UpdateConfig("abuttons", nil, "position", "bottom")
@@ -969,6 +976,10 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("character", "inventory", "durability", "1") pfUI:UpdateConfig("character", "inventory", "durability", "1")
pfUI:UpdateConfig("character", "inventory", "equipflyout", "0") pfUI:UpdateConfig("character", "inventory", "equipflyout", "0")
pfUI:UpdateConfig("equipmentmanager", nil, "autoswitch", "1")
pfUI:UpdateConfig("equipmentmanager", nil, "announce", "1")
pfUI:UpdateConfig("equipmentmanager", nil, "unusedquality", "1")
pfUI:UpdateConfig("equipmentmanager", nil, "unusedbank", "1")
pfUI:UpdateConfig("character", "reputation", "repRequired", "1") pfUI:UpdateConfig("character", "reputation", "repRequired", "1")
pfUI:UpdateConfig("thirdparty", nil, "chatbg", "1") pfUI:UpdateConfig("thirdparty", nil, "chatbg", "1")
pfUI:UpdateConfig("thirdparty", nil, "showmeter", "0") pfUI:UpdateConfig("thirdparty", nil, "showmeter", "0")
+3
View File
@@ -470,6 +470,7 @@ function pfUI.uf:UpdateConfig()
local cooldown_text = tonumber(f.config.cooldown_text) local cooldown_text = tonumber(f.config.cooldown_text)
local cooldown_anim = tonumber(f.config.cooldown_anim) local cooldown_anim = tonumber(f.config.cooldown_anim)
local cooldown_reverse = tonumber(f.config.cooldown_reverse) or 0
local relative_point = "BOTTOM" local relative_point = "BOTTOM"
if f.config.panchor == "TOPLEFT" then if f.config.panchor == "TOPLEFT" then
@@ -829,6 +830,7 @@ function pfUI.uf:UpdateConfig()
f.buffs[i].cd.pfCooldownType = "ALL" f.buffs[i].cd.pfCooldownType = "ALL"
f.buffs[i].cd.pfCooldownStyleText = cooldown_text f.buffs[i].cd.pfCooldownStyleText = cooldown_text
f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
f.buffs[i].cd.pfCooldownReverse = cooldown_reverse
f.buffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) f.buffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0)
-- immediately show/hide existing cooldown text -- immediately show/hide existing cooldown text
@@ -889,6 +891,7 @@ function pfUI.uf:UpdateConfig()
f.debuffs[i].cd.pfCooldownType = "ALL" f.debuffs[i].cd.pfCooldownType = "ALL"
f.debuffs[i].cd.pfCooldownStyleText = cooldown_text f.debuffs[i].cd.pfCooldownStyleText = cooldown_text
f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
f.debuffs[i].cd.pfCooldownReverse = cooldown_reverse
f.debuffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) f.debuffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0)
-- immediately show/hide existing cooldown text -- immediately show/hide existing cooldown text
+70
View File
@@ -890,4 +890,74 @@ pfUI_translation["frFR"] = {
["Zonetime"] = nil, ["Zonetime"] = nil,
["Zoom & Fade"] = "Zoom et fondu", ["Zoom & Fade"] = "Zoom et fondu",
["Zoom Target Nameplate"] = "Zoom la cible des barres de vie flottantes", ["Zoom Target Nameplate"] = "Zoom la cible des barres de vie flottantes",
["%d items, %d ignored"] = "%d objets, %d ignorés",
["Add the current zone"] = "Ajouter la zone actuelle",
["Announce Automatic Set Switches In Chat"] = "Annoncer les changements automatiques d'ensemble dans le chat",
["Any Form"] = "N'importe quelle forme",
["Aquatic Form"] = "Forme aquatique",
["Automatic Set Switching"] = "Changement automatique d'ensemble",
["Battle Stance"] = "Posture de combat",
["Battleground"] = "Champ de bataille",
["Bear Form"] = "Forme d'ours",
["Berserker Stance"] = "Posture berserker",
["Cat Form"] = "Forme de félin",
["Condition met, but a trigger higher in the list wins"] = "Condition remplie, mais un déclencheur plus haut dans la liste est prioritaire",
["Create an equipment set first."] = "Créez d'abord un ensemble d'équipement.",
["Currently active"] = "Actuellement actif",
["Defensive Stance"] = "Posture défensive",
["Do Nothing"] = "Ne rien faire",
["Dungeon"] = "Donjon",
["Eating / Drinking"] = "Manger / Boire",
["Enable Automatic Set Switching"] = "Activer le changement automatique d'ensemble",
["Equip"] = "Équiper",
["Equip sets automatically when mounted, swimming, eating, in a zone, at a given time and more."] = "Équipe automatiquement des ensembles en monture, en nageant, en mangeant, dans une zone, à une heure donnée, etc.",
["Equipment Manager"] = "Gestionnaire d'équipement",
["Equippable items in your bags, bank and paperdoll that no equipment set uses."] = "Objets équipables dans vos sacs, votre banque et sur votre personnage qu'aucun ensemble n'utilise.",
["Equipping %s"] = "Équipement de %s",
["Equipping %s (%s)"] = "Équipement de %s (%s)",
["Every equippable item is part of a set."] = "Tous les objets équipables font partie d'un ensemble.",
["Ghost Wolf"] = "Loup fantôme",
["Here"] = "Ici",
["Ignored (Right-Click to unignore)"] = "Ignoré (clic droit pour ne plus ignorer)",
["In Bags"] = "Dans les sacs",
["In Bank"] = "En banque",
["Include Bank Items"] = "Inclure les objets en banque",
["Instance Type"] = "Type d'instance",
["Items Not In Any Set"] = "Objets hors de tout ensemble",
["Local time window, e.g. 20:00-23:00"] = "Plage horaire locale, ex. 20:00-23:00",
["Minimum Item Quality"] = "Qualité minimale des objets",
["Moonkin Form"] = "Forme de sélénien",
["Mounted"] = "En monture",
["New Trigger"] = "Nouveau déclencheur",
["No Form (Caster)"] = "Sans forme (lanceur de sorts)",
["No set selected"] = "Aucun ensemble choisi",
["No triggers yet. Click \"New Trigger\" to add one."] = "Aucun déclencheur. Cliquez sur \"Nouveau déclencheur\" pour en ajouter un.",
["Not part of any equipment set"] = "Ne fait partie d'aucun ensemble",
["Open World"] = "Monde extérieur",
["Resting (Inn / City)"] = "Repos (auberge / ville)",
["Restore Previous Gear"] = "Remettre l'équipement précédent",
["Restoring previous gear"] = "Remise de l'équipement précédent",
["Select a trigger to edit it."] = "Sélectionnez un déclencheur pour le modifier.",
["Selected Trigger"] = "Déclencheur sélectionné",
["Separate several zones with ;"] = "Séparez plusieurs zones par ;",
["Shadowform"] = "Forme d'Ombre",
["Shapeshift Form / Stance"] = "Forme / Posture",
["Shift-Click: Link Ctrl-Click: Preview\nRight-Click: Ignore / Unignore"] = "Maj-clic : lien Ctrl-clic : aperçu\nClic droit : ignorer / ne plus ignorer",
["Show Ignored"] = "Afficher les ignorés",
["Stealth"] = "Camouflage",
["Stealthed"] = "Camouflé",
["Swimming"] = "À la nage",
["Targeting A Boss"] = "Cible un boss",
["Time Of Day"] = "Heure de la journée",
["Travel Form"] = "Forme de voyage",
["Tree of Life Form"] = "Forme d'arbre de vie",
["Triggers"] = "Déclencheurs",
["Triggers higher in the list take priority. Gear is never swapped in combat, while dead or while casting: the switch waits until it can happen."] = "Les déclencheurs en haut de la liste sont prioritaires. L'équipement n'est jamais changé en combat, mort ou pendant une incantation : le changement attend que ce soit possible.",
["Unused"] = "Inutilisés",
["Value"] = "Valeur",
["When"] = "Quand",
["When It Ends"] = "À la fin",
["Windows may wrap past midnight (22:00-02:00)."] = "Une plage peut passer minuit (22:00-02:00).",
["Zone"] = "Zone",
["Zone or subzone name"] = "Nom de zone ou de sous-zone",
} }
+1
View File
@@ -1045,6 +1045,7 @@ pfUI:RegisterModule("actionbar", function ()
-- cooldown -- cooldown
f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate") f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate")
f.cd.pfCooldownStyleAnimation = 1 f.cd.pfCooldownStyleAnimation = 1
f.cd.pfCooldownReverse = tonumber(C.bars.cooldown_reverse) or 0
f.cd.pfCooldownType = "NOGCD" f.cd.pfCooldownType = "NOGCD"
f.cd.pfCooldownSize = cd_size f.cd.pfCooldownSize = cd_size
+2
View File
@@ -398,11 +398,13 @@ pfUI:RegisterModule("bags", function ()
local name = "pfBag" .. bag .. "item" .. slot .. "Cooldown" local name = "pfBag" .. bag .. "item" .. slot .. "Cooldown"
bankslot.cd = CreateFrame("Cooldown", name, bankslot, "CooldownFrameTemplate") bankslot.cd = CreateFrame("Cooldown", name, bankslot, "CooldownFrameTemplate")
bankslot.cd.pfCooldownStyleAnimation = 1 bankslot.cd.pfCooldownStyleAnimation = 1
bankslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0
bankslot.cd.pfCooldownType = "NOGCD" bankslot.cd.pfCooldownType = "NOGCD"
else else
local bagslot = pfUI.bags[bag].slots[slot].frame local bagslot = pfUI.bags[bag].slots[slot].frame
bagslot.cd = _G[bagslot:GetName().."Cooldown"] bagslot.cd = _G[bagslot:GetName().."Cooldown"]
bagslot.cd.pfCooldownType = "NOGCD" bagslot.cd.pfCooldownType = "NOGCD"
bagslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0
end end
if not pfUI.bags[bag].slots[slot].frame.backdrop then if not pfUI.bags[bag].slots[slot].frame.backdrop then
+43 -3
View File
@@ -33,7 +33,7 @@ pfUI:RegisterModule("buff", function ()
end end
local slots = buff.btype == "HELPFUL" and helpfulSlots or harmfulSlots local slots = buff.btype == "HELPFUL" and helpfulSlots or harmfulSlots
local name, icon, count, dispelType, _, expirationTime, _, _, _, spellId = C_UnitAuras.UnitAuraBySlot("player", slots[buff.id]) local name, icon, count, dispelType, duration, expirationTime, _, _, _, spellId = C_UnitAuras.UnitAuraBySlot("player", slots[buff.id])
--detect weapon buffs --detect weapon buffs
if buff.btype == "HELPFUL" and ((C.buffs.separateweapons == "0" and buff.gid <= pfUI.buff.wepbuffs.count) or (pfUI.buff.wepbuffs.count > 0 and buff.weapon ~= nil)) then if buff.btype == "HELPFUL" and ((C.buffs.separateweapons == "0" and buff.gid <= pfUI.buff.wepbuffs.count) or (pfUI.buff.wepbuffs.count > 0 and buff.weapon ~= nil)) then
@@ -84,6 +84,28 @@ pfUI:RegisterModule("buff", function ()
return return
end end
-- drive the sweep from the aura duration (weapon enchants and permanent
-- auras report no usable total, so those buttons stay text-only)
if buff.mode == buff.btype and duration and duration > 0 and expirationTime and expirationTime > 0 then
local now = GetTime()
local timeleft = expirationTime - now
if timeleft > 0 then
local effDuration = duration > timeleft and duration or timeleft
local newStart = now + timeleft - effDuration
if buff.cdStart == nil or abs(buff.cdStart - newStart) > .5 or buff.cdDuration ~= effDuration then
CooldownFrame_SetTimer(buff.cd, newStart, effDuration, 1)
buff.cdStart = newStart
buff.cdDuration = effDuration
end
else
CooldownFrame_SetTimer(buff.cd, 0, 0, 0)
buff.cdStart = nil
end
else
CooldownFrame_SetTimer(buff.cd, 0, 0, 0)
buff.cdStart = nil
end
buff:Show() buff:Show()
end end
@@ -106,17 +128,33 @@ pfUI:RegisterModule("buff", function ()
buff.texture:SetTexCoord(.07,.93,.07,.93) buff.texture:SetTexCoord(.07,.93,.07,.93)
buff.texture:SetAllPoints(buff) buff.texture:SetAllPoints(buff)
buff.timer = buff:CreateFontString(nil, "OVERLAY", "GameFontNormal") -- overlay lifts the texts above the sweep: a child frame renders above
-- all of its parent's own regions, so the timer would dim under the
-- dark wedge otherwise (same reason pfCooldownText is its own frame)
buff.overlay = CreateFrame("Frame", nil, buff)
buff.overlay:SetAllPoints(buff)
buff.timer = buff.overlay:CreateFontString(nil, "OVERLAY", "GameFontNormal")
buff.timer:SetTextColor(1,1,1,1) buff.timer:SetTextColor(1,1,1,1)
buff.timer:SetJustifyH("CENTER") buff.timer:SetJustifyH("CENTER")
buff.timer:SetJustifyV("CENTER") buff.timer:SetJustifyV("CENTER")
buff.stacks = buff:CreateFontString(nil, "OVERLAY", "GameFontNormal") buff.stacks = buff.overlay:CreateFontString(nil, "OVERLAY", "GameFontNormal")
buff.stacks:SetTextColor(1,1,1,1) buff.stacks:SetTextColor(1,1,1,1)
buff.stacks:SetJustifyH("RIGHT") buff.stacks:SetJustifyH("RIGHT")
buff.stacks:SetJustifyV("BOTTOM") buff.stacks:SetJustifyV("BOTTOM")
buff.stacks:SetAllPoints(buff) buff.stacks:SetAllPoints(buff)
-- radial sweep (the template covers the button and starts hidden;
-- the cooldown hook drives it from here, text stays with buff.timer)
buff.cd = CreateFrame("Cooldown", buttonName .. "Cooldown", buff, "CooldownFrameTemplate")
buff.cd:SetFrameLevel(buff:GetFrameLevel() + 1)
buff.overlay:SetFrameLevel(buff:GetFrameLevel() + 2)
buff.cd.pfCooldownType = "ALL"
buff.cd.pfCooldownStyleText = 0
buff.cd.pfCooldownStyleAnimation = tonumber(C.buffs.cooldown_anim) or 0
buff.cd.pfCooldownReverse = tonumber(C.buffs.cooldown_reverse) or 0
buff:RegisterForClicks("RightButtonUp") buff:RegisterForClicks("RightButtonUp")
buff.weapon = weapon buff.weapon = weapon
@@ -307,6 +345,8 @@ pfUI:RegisterModule("buff", function ()
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing) offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing)
end end
buff:SetSize(buffSize, buffSize) buff:SetSize(buffSize, buffSize)
buff.cd.pfCooldownStyleAnimation = tonumber(C.buffs.cooldown_anim) or 0
buff.cd.pfCooldownReverse = tonumber(C.buffs.cooldown_reverse) or 0
buff:ClearAllPoints() buff:ClearAllPoints()
buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY) buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY)
+6
View File
@@ -142,6 +142,12 @@ pfUI:RegisterModule("cooldown", function ()
this:SetAlpha(0) this:SetAlpha(0)
end end
-- reversed sweep direction (ClassicAPI backports SetReverse with the
-- modern Cooldown frame; stock Model swipes don't have it, so guard it)
if this.pfCooldownReverse == 1 and this.SetReverse then
this:SetReverse(true)
end
-- print time as text on cooldown frames -- print time as text on cooldown frames
if ( not this.pfCooldownStyleText or this.pfCooldownStyleText == 1) if ( not this.pfCooldownStyleText or this.pfCooldownStyleText == 1)
and start > 0 and duration > 0 and (not enable or enable > 0) then and start > 0 and duration > 0 and (not enable or enable > 0) then
File diff suppressed because it is too large Load Diff
+22
View File
@@ -2341,6 +2341,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U[c], T["Timer"], nil, nil, "header") CreateConfig(U[c], T["Timer"], nil, nil, "header")
CreateConfig(U[c], T["Show Timer Text"], C.unitframes[c], "cooldown_text", "checkbox") CreateConfig(U[c], T["Show Timer Text"], C.unitframes[c], "cooldown_text", "checkbox")
CreateConfig(Reload, T["Show Timer Animation"], C.unitframes[c], "cooldown_anim", "checkbox") CreateConfig(Reload, T["Show Timer Animation"], C.unitframes[c], "cooldown_anim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.unitframes[c], "cooldown_reverse", "checkbox")
CreateConfig(U[c], T["Buffs"], nil, nil, "header") CreateConfig(U[c], T["Buffs"], nil, nil, "header")
CreateConfig(U[c], T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) CreateConfig(U[c], T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position)
@@ -2427,6 +2428,21 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(nil, T["Always Show Equipment Slot Flyouts"], C.character.inventory, "equipflyout", "checkbox") CreateConfig(nil, T["Always Show Equipment Slot Flyouts"], C.character.inventory, "equipflyout", "checkbox")
end) end)
CreateGUIEntry(T["Character"], T["Equipment Manager"], function()
CreateConfig(nil, T["Automatic Set Switching"], nil, nil, "header")
CreateConfig(U["equipmentmanager"], T["Enable Automatic Set Switching"], C.equipmentmanager, "autoswitch", "checkbox")
CreateConfig(U["equipmentmanager"], T["Announce Automatic Set Switches In Chat"], C.equipmentmanager, "announce", "checkbox")
CreateConfig(nil, T["Items Not In Any Set"], nil, nil, "header")
CreateConfig(U["equipmentmanager"], T["Minimum Item Quality"], C.equipmentmanager, "unusedquality", "dropdown", {
"0:" .. ITEM_QUALITY0_DESC,
"1:" .. ITEM_QUALITY1_DESC,
"2:" .. ITEM_QUALITY2_DESC,
"3:" .. ITEM_QUALITY3_DESC,
"4:" .. ITEM_QUALITY4_DESC,
})
CreateConfig(U["equipmentmanager"], T["Include Bank Items"], C.equipmentmanager, "unusedbank", "checkbox")
end)
CreateGUIEntry(T["Character"], T["Reputation"], function() CreateGUIEntry(T["Character"], T["Reputation"], function()
CreateConfig(nil, T["Show Reputation Remaining"], C.character.reputation, "repRequired", "checkbox") CreateConfig(nil, T["Show Reputation Remaining"], C.character.reputation, "repRequired", "checkbox")
end) end)
@@ -2445,6 +2461,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(nil, T["Bankslots Per Row"], C.appearance.bags, "bankrowlength") CreateConfig(nil, T["Bankslots Per Row"], C.appearance.bags, "bankrowlength")
CreateConfig(nil, T["Enable Full-Text Search"], C.appearance.bags, "fulltext") CreateConfig(nil, T["Enable Full-Text Search"], C.appearance.bags, "fulltext")
CreateConfig(nil, T["Item Slot Size"], C.appearance.bags, "icon_size") CreateConfig(nil, T["Item Slot Size"], C.appearance.bags, "icon_size")
CreateConfig(Reload, T["Reverse Cooldown Animation"], C.appearance.bags, "cooldown_reverse", "checkbox")
CreateConfig(nil, T["Auto Sell Grey Items"], C.global, "autosell", "checkbox") CreateConfig(nil, T["Auto Sell Grey Items"], C.global, "autosell", "checkbox")
CreateConfig(nil, T["Auto Repair Items"], C.global, "autorepair", "checkbox") CreateConfig(nil, T["Auto Repair Items"], C.global, "autorepair", "checkbox")
CreateConfig(nil, T["Auto Sort When Opening Bags"], C.appearance.bags, "autoSortOnOpen", "checkbox") CreateConfig(nil, T["Auto Sort When Opening Bags"], C.appearance.bags, "autoSortOnOpen", "checkbox")
@@ -2495,6 +2512,8 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["buff"], T["Number Of Debuffs Per Row"], C.buffs, "debuffrowsize") CreateConfig(U["buff"], T["Number Of Debuffs Per Row"], C.buffs, "debuffrowsize")
CreateConfig(U["buff"], T["Show Duration Inside Buff"], C.buffs, "textinside", "checkbox") CreateConfig(U["buff"], T["Show Duration Inside Buff"], C.buffs, "textinside", "checkbox")
CreateConfig(U["buff"], T["Buff Font Size"], C.buffs, "fontsize") CreateConfig(U["buff"], T["Buff Font Size"], C.buffs, "fontsize")
CreateConfig(Reload, T["Show Timer Animation"], C.buffs, "cooldown_anim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.buffs, "cooldown_reverse", "checkbox")
end) end)
CreateGUIEntry(T["Buffs"], T["Totem Icons"], function() CreateGUIEntry(T["Buffs"], T["Totem Icons"], function()
@@ -2502,6 +2521,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["totems"], T["Icon Size"], C.totems, "iconsize") CreateConfig(U["totems"], T["Icon Size"], C.totems, "iconsize")
CreateConfig(U["totems"], T["Spacing"], C.totems, "spacing", "dropdown", pfUI.gui.dropdowns.spacing) CreateConfig(U["totems"], T["Spacing"], C.totems, "spacing", "dropdown", pfUI.gui.dropdowns.spacing)
CreateConfig(U["totems"], T["Show Background"], C.totems, "showbg", "checkbox") CreateConfig(U["totems"], T["Show Background"], C.totems, "showbg", "checkbox")
CreateConfig(Reload, T["Reverse Cooldown Animation"], C.totems, "cooldown_reverse", "checkbox")
end) end)
CreateGUIEntry(T["Buffs"], T["Player Buff Bar"], function() CreateGUIEntry(T["Buffs"], T["Player Buff Bar"], function()
@@ -2591,6 +2611,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["bars"], T["Keybind Text Size"], C.bars, "bind_size") CreateConfig(U["bars"], T["Keybind Text Size"], C.bars, "bind_size")
CreateConfig(U["bars"], T["Keybind Text Color"], C.bars, "bind_color", "color") CreateConfig(U["bars"], T["Keybind Text Color"], C.bars, "bind_color", "color")
CreateConfig(nil, T["Cooldown Text Size"], C.bars, "cd_size") CreateConfig(nil, T["Cooldown Text Size"], C.bars, "cd_size")
CreateConfig(Reload, T["Reverse Cooldown Animation"], C.bars, "cooldown_reverse", "checkbox")
CreateConfig(nil, T["Auto Paging"], nil, nil, "header") CreateConfig(nil, T["Auto Paging"], nil, nil, "header")
CreateConfig(U["bars"], T["Switch Pages On Alt Key Press"], C.bars, "pagemasteralt", "checkbox") CreateConfig(U["bars"], T["Switch Pages On Alt Key Press"], C.bars, "pagemasteralt", "checkbox")
@@ -2960,6 +2981,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["nameplates"], T["Enable Debuff Timers"], C.nameplates, "debufftimers", "checkbox") CreateConfig(U["nameplates"], T["Enable Debuff Timers"], C.nameplates, "debufftimers", "checkbox")
CreateConfig(U["nameplates"], T["Show Timer Text"], C.nameplates, "debufftext", "checkbox") CreateConfig(U["nameplates"], T["Show Timer Text"], C.nameplates, "debufftext", "checkbox")
CreateConfig(Reload, T["Show Timer Animation"], C.nameplates, "debuffanim", "checkbox") CreateConfig(Reload, T["Show Timer Animation"], C.nameplates, "debuffanim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.nameplates, "debreverse", "checkbox")
CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter) CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter)
CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list") CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list")
+10 -6
View File
@@ -130,8 +130,8 @@ pfUI:RegisterModule("nameplates", function ()
cfg.targetcastbar = C.nameplates["targetcastbar"] == "1" cfg.targetcastbar = C.nameplates["targetcastbar"] == "1"
cfg.notargalpha = tonumber(C.nameplates.notargalpha) or 0.5 cfg.notargalpha = tonumber(C.nameplates.notargalpha) or 0.5
if cfg.notargalpha > 1 then cfg.notargalpha = cfg.notargalpha / 100 end if cfg.notargalpha > 1 then cfg.notargalpha = cfg.notargalpha / 100 end
-- Clamp to 0.99 so non-target plates never reach 1.0 (used for target detection) -- Clamp to 1.0 so a 100% setting yields full opacity (target detection is GUID-based)
if cfg.notargalpha > 0.99 then cfg.notargalpha = 0.99 end if cfg.notargalpha > 1 then cfg.notargalpha = 1 end
cfg.namefightcolor = C.nameplates.namefightcolor == "1" cfg.namefightcolor = C.nameplates.namefightcolor == "1"
cfg.spellname = C.nameplates.spellname == "1" cfg.spellname = C.nameplates.spellname == "1"
cfg.showhp = C.nameplates.showhp == "1" cfg.showhp = C.nameplates.showhp == "1"
@@ -159,6 +159,7 @@ pfUI:RegisterModule("nameplates", function ()
cfg.debufftimers = C.nameplates.debufftimers == "1" cfg.debufftimers = C.nameplates.debufftimers == "1"
cfg.debuffanim = tonumber(C.nameplates.debuffanim) or 0 cfg.debuffanim = tonumber(C.nameplates.debuffanim) or 0
cfg.debufftext = tonumber(C.nameplates.debufftext) or 1 cfg.debufftext = tonumber(C.nameplates.debufftext) or 1
cfg.debreverse = tonumber(C.nameplates.debreverse) or 0
-- Throttle delays, resolved once instead of per plate per tick. -- Throttle delays, resolved once instead of per plate per tick.
-- libthrottle:Get walks the saved-variable table, a defaults fallback and a -- libthrottle:Get walks the saved-variable table, a defaults fallback and a
@@ -445,6 +446,7 @@ pfUI:RegisterModule("nameplates", function ()
-- Set initial config flags (will be cached per-cooldown later) -- Set initial config flags (will be cached per-cooldown later)
plate.debuffs[index].cd.pfCooldownStyleAnimation = cfg.debuffanim plate.debuffs[index].cd.pfCooldownStyleAnimation = cfg.debuffanim
plate.debuffs[index].cd.pfCooldownReverse = cfg.debreverse or 0
plate.debuffs[index].cd.pfCooldownStyleText = cfg.debufftext plate.debuffs[index].cd.pfCooldownStyleText = cfg.debufftext
plate.debuffs[index].cd.pfCooldownType = "ALL" plate.debuffs[index].cd.pfCooldownType = "ALL"
end end
@@ -486,6 +488,7 @@ pfUI:RegisterModule("nameplates", function ()
local cooldown_anim = tonumber(C.nameplates.debuffanim) or 0 local cooldown_anim = tonumber(C.nameplates.debuffanim) or 0
nameplate.debuffs[i].cd.pfCooldownStyleText = cooldown_text nameplate.debuffs[i].cd.pfCooldownStyleText = cooldown_text
nameplate.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim nameplate.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
nameplate.debuffs[i].cd.pfCooldownReverse = tonumber(C.nameplates.debreverse) or 0
end end
end end
@@ -1396,12 +1399,14 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
local cd = plate.debuffs[index].cd local cd = plate.debuffs[index].cd
cd:Show() cd:Show()
if not cachedStart or abs(cachedStart - newStart) > 0.5 then if not cachedStart or abs(cachedStart - newStart) > 0.5 then
if not cd.configCached or cd.cachedAnim ~= cfg.debuffanim or cd.cachedText ~= cfg.debufftext then if not cd.configCached or cd.cachedAnim ~= cfg.debuffanim or cd.cachedText ~= cfg.debufftext or cd.cachedReverse ~= cfg.debreverse then
cd.pfCooldownStyleAnimation = cfg.debuffanim cd.pfCooldownStyleAnimation = cfg.debuffanim
cd.pfCooldownStyleText = cfg.debufftext cd.pfCooldownStyleText = cfg.debufftext
cd.pfCooldownReverse = cfg.debreverse or 0
cd:SetAlpha(cfg.debuffanim == 1 and 1 or 0) cd:SetAlpha(cfg.debuffanim == 1 and 1 or 0)
cd.cachedAnim = cfg.debuffanim cd.cachedAnim = cfg.debuffanim
cd.cachedText = cfg.debufftext cd.cachedText = cfg.debufftext
cd.cachedReverse = cfg.debreverse
cd.configCached = true cd.configCached = true
end end
CooldownFrame_SetTimer(cd, newStart, effDuration, 1) CooldownFrame_SetTimer(cd, newStart, effDuration, 1)
@@ -1445,11 +1450,10 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
if not hasEventUpdate and (nameplate.lasttick or 0) + cfg.throttle_min > now then return end if not hasEventUpdate and (nameplate.lasttick or 0) + cfg.throttle_min > now then return end
-- PERF: Intelligent throttling based on target/castbar status and plate count -- PERF: Intelligent throttling based on target/castbar status and plate count
-- Use GUID comparison as primary target detection: instant, immune to alpha transitions, -- Use GUID comparison for target detection: instant, immune to alpha transitions,
-- and immediately correct on de-target (unlike istarget which updates one tick later) -- and immediately correct on de-target (unlike istarget which updates one tick later)
local targetGuid = state and state.targetGuid local targetGuid = state and state.targetGuid
local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or nil
(state and state.targetGuid and frame:GetAlpha() >= 0.99) or nil
-- Target plate castbar runs on its own dedicated frame (nameplates.castbarFrame). -- Target plate castbar runs on its own dedicated frame (nameplates.castbarFrame).
-- For non-target plates with castbar active, use castbar throttle to ensure -- For non-target plates with castbar active, use castbar throttle to ensure
-- smooth animation without overloading the central loop. -- smooth animation without overloading the central loop.
+1
View File
@@ -115,6 +115,7 @@ pfUI:RegisterModule("totems", function ()
self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0) self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0)
self.bar[i].cd = self.bar[i].cd or CreateFrame("Cooldown", "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate") self.bar[i].cd = self.bar[i].cd or CreateFrame("Cooldown", "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate")
self.bar[i].cd.pfCooldownStyleAnimation = 1 self.bar[i].cd.pfCooldownStyleAnimation = 1
self.bar[i].cd.pfCooldownReverse = tonumber(pfUI_config.totems.cooldown_reverse) or 0
self.bar[i].cd.pfCooldownType = "ALL" self.bar[i].cd.pfCooldownType = "ALL"
self.bar[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp") self.bar[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp")
+1 -1
View File
@@ -5,7 +5,7 @@
## Notes-ruRU: Полная замена пользовательского интерфейса. ## Notes-ruRU: Полная замена пользовательского интерфейса.
## Version: @project-version@ ## Version: @project-version@
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache, pfUI_throttle ## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache, pfUI_throttle
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB, pfUI_eqmgr
## X-Website: https://github.com/brues-code/pfUI ## X-Website: https://github.com/brues-code/pfUI
# ClassicAPI-less fallback. ClassicAPI redirects this read to pfUI_Turtle.toc # ClassicAPI-less fallback. ClassicAPI redirects this read to pfUI_Turtle.toc
+1 -1
View File
@@ -5,7 +5,7 @@
## Notes-ruRU: Полная замена пользовательского интерфейса. ## Notes-ruRU: Полная замена пользовательского интерфейса.
## Version: @project-version@ ## Version: @project-version@
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache, pfUI_throttle ## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache, pfUI_throttle
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB, pfUI_eqmgr
## X-Website: https://github.com/brues-code/pfUI ## X-Website: https://github.com/brues-code/pfUI
# Selected by ClassicAPI on every non-Turtle client. Turtle clients get # Selected by ClassicAPI on every non-Turtle client. Turtle clients get
+1 -1
View File
@@ -5,7 +5,7 @@
## Notes-ruRU: Полная замена пользовательского интерфейса. ## Notes-ruRU: Полная замена пользовательского интерфейса.
## Version: @project-version@ ## Version: @project-version@
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache, pfUI_throttle ## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache, pfUI_throttle
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB, pfUI_eqmgr
## X-Website: https://github.com/brues-code/pfUI ## X-Website: https://github.com/brues-code/pfUI
# Selected by ClassicAPI on Turtle WoW, where it wins over pfUI_ClassicAPI.toc. # Selected by ClassicAPI on Turtle WoW, where it wins over pfUI_ClassicAPI.toc.