mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 11:10:00 +00:00
HasCatForm via GetShapeshiftFormID
Drops the C_UnitAuras helpful-aura iteration in favor of a direct engine state read. GetShapeshiftFormID returns vanilla 1.12.1's stable per-form DBC ID (Cat = 1), so the helper collapses to a one-liner that's locale-independent, talent-independent, and works without scanning any buff list.
This commit is contained in:
@@ -913,14 +913,10 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
|
||||
local inCatForm = nil
|
||||
local prowlActive = nil
|
||||
|
||||
-- Cat Form's icon path is stable across locales and ranks, so we match on
|
||||
-- the texture rather than spellID (which differs between cast spellID and
|
||||
-- the resulting buff's spellID in the descriptor).
|
||||
-- Cat Form ID per vanilla 1.12 SpellShapeshiftForm.dbc.
|
||||
local CAT_FORM = 1
|
||||
local function HasCatForm()
|
||||
for _, a in ipairs(C_UnitAuras.GetUnitAuras("player", "HELPFUL")) do
|
||||
if strfind(a.icon, "Ability_Druid_CatForm") then return true end
|
||||
end
|
||||
return nil
|
||||
return GetShapeshiftFormID() == CAT_FORM and true or nil
|
||||
end
|
||||
|
||||
local function FullScan()
|
||||
|
||||
Reference in New Issue
Block a user