Use UnitClassBase for class detection

This commit is contained in:
Brues
2026-07-30 01:26:29 -05:00
parent 838f7f5d25
commit 6d1bfe805e
16 changed files with 22 additions and 24 deletions
+5 -5
View File
@@ -1519,7 +1519,7 @@ function pfUI.uf:RefreshIndicators(unit)
end
if unit.happinessIcon and unit:GetName() == "pfPet" then -- Happiness Icon
local _, pclass = UnitClass("player")
local pclass = UnitClassBase("player")
if unit.config.happinessicon == "0" or pclass ~= "HUNTER" then
unit.happinessIcon:Hide()
else
@@ -1563,7 +1563,7 @@ function pfUI.uf:UpdateDruidMana(unit)
local unitstr = unit.label .. unit.id
if not UnitExists(unitstr) then bar:Hide() return end
if unit.label ~= "player" then
local _, cls = UnitClass(unitstr)
local cls = UnitClassBase(unitstr)
if cls ~= "DRUID" then bar:Hide() return end
end
if UnitPowerType(unitstr) == Enum.PowerType.Mana then bar:Hide() return end
@@ -2217,7 +2217,7 @@ function pfUI.uf:ClickAction(button)
-- drop food on petframe
if label == "pet" and CursorHasItem() then
local _, playerClass = UnitClass("player")
local playerClass = UnitClassBase("player")
if playerClass == "HUNTER" then
DropItemOnUnit("pet")
return
@@ -2327,7 +2327,7 @@ function pfUI.uf:HideIcon(frame, pos)
end
function pfUI.uf:SetupDebuffFilter(allclasses)
local _, myclass = UnitClass("player")
local myclass = UnitClassBase("player")
local debuffs = {}
if myclass == "PALADIN" or myclass == "PRIEST" or myclass == "WARLOCK" or allclasses then
@@ -2350,7 +2350,7 @@ function pfUI.uf:SetupDebuffFilter(allclasses)
end
function pfUI.uf:SetupBuffIndicators(config)
local _, myclass = UnitClass("player")
local myclass = UnitClassBase("player")
local indicators = {}
if config.show_buffs == "1" then -- buffs