SFX-WoW / Masque

A button-skinning engine for World of Warcraft.
Other
48 stars 11 forks source link

Bug: Animations Settings not Applying Correctly #396

Closed zhpzhp closed 2 weeks ago

zhpzhp commented 2 months ago

Game Flavor

Retail

Game Version

11.0.2

Add-On Version

11.0.1

Description

Disable the three options(cast animation, interrupt animation, targeting reticles) in the advanced tab only works until the reload.

Screenshots

1

StormFX commented 2 months ago

I have confirmed this to be a bug. For some reason, the animation events are being registered after the PLAYER_LOGIN event, causing Masque's adjustments to be overridden. The following code should help until I get a release put out. Add this at line 55 of Masque.lua.

-- Events Frame
if WOW_RETAIL then
    local MSQ_EVENTS_FRAME = CreateFrame("Frame")
    MSQ_EVENTS_FRAME:Hide()

    local function OnEvent(...)
        local db = Core.db.profile
        local UpdateEffect = Core.UpdateEffect

        for k, v in pairs(db.Effects) do
            UpdateEffect(k, v)
        end 
    end

    -- Delay the unregistering of events until after `PLAYER_LOGIN`.
    MSQ_EVENTS_FRAME:RegisterEvent("PLAYER_ENTERING_WORLD")
    MSQ_EVENTS_FRAME:SetScript("OnEvent", OnEvent)
end
zhpzhp commented 2 months ago

Works perfectly! Thank you

StormFX commented 2 months ago

You bet. I'll try to get a release sometime this week or next. Busy schedule.