WeakAuras / WeakAuras2

World of Warcraft addon that provides a powerful framework to display customizable graphics on your screen.
https://weakauras.wtf
GNU General Public License v2.0
1.27k stars 313 forks source link

How to clean custom shine to the default glow? #704

Closed XiaoSeee closed 6 years ago

XiaoSeee commented 6 years ago

I see someone use some custom shine,like this

{
    "changes": [{
            "property": "glow",
            "value": true
        }, {
            "property": "customcode",
            "value": {
                "custom": ""
            }
        }, {
            "property": "inverse"
        }, {
            "property": "desaturate"
        }, {
            "property": "color"
        }
    ],
    "check": {
        "trigger": 0,
        "value": 1,
        "variable": "show"
    }
}
local red, green, blue = 1,1,1
local r = aura_env.region
if not r.shine then
    local shine = CreateFrame(\"FRAME\", \"WA\"..aura_env.id..\"shine\", r, \"AutoCastShineTemplate\")
    shine:SetAllPoints()
    r.shine = shine
end

function r:SetGlow(showGlow)
    if (showGlow) then
        AutoCastShine_AutoCastStart(r.shine, red, green, blue)
    else
        AutoCastShine_AutoCastStop(r.shine)
    end
end

when it start shine,it always shine. I need some time start whit shine ,some time start whit default glow.Do you know how to clean custom shine to the default glow?

emptyrivers commented 6 years ago

This is not a help forum. You can come to our discord server HERE to ask for help making auras.