mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 10:26:02 +00:00
Use UnitClassBase for class detection
This commit is contained in:
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user