Hi guys,
I've tried doing this via conditions (Doesn't have an option) and have also tried a custom trigger (with the help of chat gpt to fill in my syntax gaps), but I can't seem to correctly identify the background texture I want. The texture is changing, but the bar is either transparent or has an alpha value of 0, and i'm unsure how to test further. The code block i'm currently using is:
function(events, ...)
local unit = "player"
local auraID = 24858
local texture = "Blizzard Lunar Power"
local LSM = LibStub("LibSharedMedia-3.0")
-- Check if the aura is active
local function IsAuraActive(unit, auraID)
for i = 1, 40 do
local _, _, _, _, _, _, _, _, _, spellID = UnitBuff(unit, i)
if spellID == auraID then
print("Aura 24858 is active")
return true
end
end
print("Aura 24858 is not active")
return false
end
-- Set the bar texture when the aura is active
local function SetBarTexture()
if IsAuraActive(unit, auraID) then
print("Setting bar texture to Blizzard Lunar Power")
aura_env.region.bar:SetStatusBarTexture(LSM:Fetch("progressbar", texture))
else
print("Resetting to default texture")
aura_env.region.bar:SetStatusBarTexture(LSM:Fetch("progressbar", aura_env.region.bar.defaultTexture))
end
end
-- Run the function to set the bar texture
SetBarTexture()
return false -- Returning false since this is a non-activation trigger
end