Untitled
unknown
plain_text
3 years ago
706 B
4
Indexable
local stance = CreateFrame("Frame") stance:RegisterEvent("UNIT_AURA", "player") stance:RegisterEvent("PLAYER_ENTERING_WORLD") local btn = CreateFrame("Frame","Vrm", UIParent) local texture = btn:CreateTexture(nil,"ARTWORK") texture:SetScale(0.7) texture:SetPoint("LEFT", UIParent, "CENTER", -195, -61) stance:SetScript("OnEvent", function(self, event, ...) if event == ("UNIT_AURA") or event == ("PLAYER_ENTERING_WORLD") then local isdefstance = AuraUtil.FindAuraByName("Defensive Stance", "player") if isdefstance and texture:GetTexture() ~= 132341 then texture:SetTexture(132341) elseif not isdefstance and texture:GetTexture() ~= 132349 then texture:SetTexture(132349) end end end)
Editor is loading...