mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-09 15:10:00 +00:00
Fetch the totem buff icon via GetBuffDataByIndex
Use C_UnitAuras.GetBuffDataByIndex(guid, 1) instead of GetUnitAuras(guid)[1]: a passive totem's provided buff is its single helpful aura, so the buff- filtered single-slot fetch is both more precise and cheaper than building the full aura list to take the first entry.
This commit is contained in:
@@ -306,8 +306,8 @@ pfUI:RegisterModule("nameplates", function ()
|
||||
if C.nameplates.totemicons ~= "1" then return nil end
|
||||
if CreatureType(plate) ~= 11 then return nil end
|
||||
if plate.totemIcon then return plate.totemIcon end
|
||||
local auras = C_UnitAuras.GetUnitAuras(plate.cachedGuid)
|
||||
if auras and auras[1] then plate.totemIcon = auras[1].icon end
|
||||
local aura = C_UnitAuras.GetBuffDataByIndex(plate.cachedGuid, 1)
|
||||
if aura then plate.totemIcon = aura.icon end
|
||||
return plate.totemIcon
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user