mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 10:26:02 +00:00
swing timer fixes and additions
* fixed offhand timer incorrectly showing for 2H weapon users * fixed sw_texture resolving pfUI.media key correctly instead of passing raw file path * added proper offhand weapon detection via GetEquippedItem + GetItemStatsField (Nampower), with vanilla API fallback * added UNIT_DIED event to reset timer when target dies * added ACTIONBAR_SLOT_CHANGED event to keep HS/Cleave slot cache up to date * added immediate offhand bar hide when OH weapon is unequipped mid-combat * added player GUID caching for UNIT_DIED comparison * added GUI options: texture, font size, show/hide timer text, MH/OH labels, offhand bar, HS/Cleave queue color * added HS/Cleave queue color coding for Warriors (green = Cleave, yellow = Heroic Strike) * added unit frame text options: attack speed, min/max damage, unit string, HP/mana display variants, pet name * removed unreliable dual-wield heuristic guard (mhAge < 0.1) Co-authored-by: Zedris
This commit is contained in:
@@ -3224,6 +3224,42 @@ function pfUI.uf:GetStatusValue(unit, pos)
|
||||
end
|
||||
elseif config == "powerminmax" then
|
||||
return unit:GetColor("power") .. pfUI.api.Abbreviate(mp) .. "/" .. pfUI.api.Abbreviate(mpmax)
|
||||
elseif config == "attackspeed" then
|
||||
local mainSpeed = UnitAttackSpeed(unitstr)
|
||||
return unit:GetColor("unit") .. format("Spd: %.2f", mainSpeed)
|
||||
elseif config == "attackdmg" then
|
||||
local lowDmg, hiDmg = UnitDamage(unitstr)
|
||||
return unit:GetColor("unit") .. format("Dmg: %.0f - %.0f", lowDmg, hiDmg)
|
||||
elseif config == "unit-left" then
|
||||
local name = unit:GetColor("unit") .. pfUI.uf:GetNameString(unitstr)
|
||||
local level = unit:GetColor("level") .. pfUI.uf:GetLevelString(unitstr)
|
||||
return level .. "|cffffffff | " .. name
|
||||
elseif config == "unit-right" then
|
||||
local name = unit:GetColor("unit") .. pfUI.uf:GetNameString(unitstr)
|
||||
local level = unit:GetColor("level") .. pfUI.uf:GetLevelString(unitstr)
|
||||
return name .. "|cffffffff | " .. level
|
||||
elseif config == "unit-white-left" then
|
||||
local name = "|cffffffff" .. pfUI.uf:GetNameString(unitstr)
|
||||
local level = "|cffffffff" .. pfUI.uf:GetLevelString(unitstr)
|
||||
return level .. " |cffffffff | " .. name
|
||||
elseif config == "unit-white-right" then
|
||||
local name = "|cffffffff" .. pfUI.uf:GetNameString(unitstr)
|
||||
local level = "|cffffffff" .. pfUI.uf:GetLevelString(unitstr)
|
||||
return name .. " |cffffffff | " .. level
|
||||
elseif config == "hp-right" then
|
||||
return unit:GetColor("health") .. ceil(rhp / rhpmax * 100) .. "%" .. " | " .. pfUI.api.Abbreviate(rhp)
|
||||
elseif config == "hp-left" then
|
||||
return unit:GetColor("health") .. pfUI.api.Abbreviate(rhp) .. " | " .. ceil(rhp / rhpmax * 100) .. "%"
|
||||
elseif config == "mana-auto-deli" then
|
||||
if mp ~= mpmax and UnitPowerType(unitstr) == 0 then
|
||||
return "|cffffffff" .. pfUI.api.Abbreviate(mp) .. " - " .. ceil(mp / mpmax * 100) .. "%"
|
||||
else
|
||||
return "|cffffffff" .. pfUI.api.Abbreviate(mp)
|
||||
end
|
||||
elseif config == "mana-current-deli" then
|
||||
return "|cffffffff" .. pfUI.api.Abbreviate(mp)
|
||||
elseif config == "petname" then
|
||||
return "|cffffffff" .. (UnitName(unitstr) or "")
|
||||
else
|
||||
return ""
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user