fix(unitframes): Player Aura Bars sometimes not loading on login - #2056
Open
JuJuFX-dev wants to merge 1 commit into
Open
fix(unitframes): Player Aura Bars sometimes not loading on login#2056JuJuFX-dev wants to merge 1 commit into
JuJuFX-dev wants to merge 1 commit into
Conversation
…d of a login poll The login build relied on PAB's PLAYER_LOGIN handler running after the Unit Frames enable router in another file. When it ran first, the ns._eufEnabled guard stood PAB down silently: Blizzard's BuffFrame stayed up and no custom bar was built until an options change reached PAB_ProfileResync. Reported with BigWigs enabled. SetupOptionsPanel now calls ns.PAB_CreateBars once ns.db is set, which drops the PLAYER_LOGIN branch, the retry loop and the _eufEnabled stamp. A disabled Unit Frames module never runs SetupOptionsPanel, so PAB still stays down.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bugreport: https://discord.com/channels/585577383847788554/1547821004644946010
What does this PR do?
Fixes Player Aura Bars sometimes not loading on login. The affected player sees Blizzard's default buff frame instead of the PAB default bars, and custom bars (e.g. defensives) do not show at all, with no Lua error. Opening the EllesmereUI options, or any other change that reaches
ReloadFrames, brings everything back until the next login. It was reported with BigWigs enabled and went away with BigWigs disabled.Root cause: the login build hung off a
PLAYER_LOGINhandler inEllesmereUIUnitFrames_PlayerAuraBars.luawhose first line wasif not ns._eufEnabled then return end. That flag is stamped byEnableBody(), which runs from a differentPLAYER_LOGINhandler inEllesmereUIUnitFrames.lua, so the build only worked when that handler had already run. Whenever PAB's handler ran first it stood down silently, with no retry and no error:HideBlizzardPlayerAuras()and the custom bar build both live insideCreateBars(), so neither happened. The only later build path isPAB_ProfileResync()at the tail ofReloadFrames, which is why an options change fixed it.The fix removes the dependency on handler order instead of patching around it.
SetupOptionsPanel(), the point wherens.dbis set, now callsns.PAB_CreateBars()directly, following the existingns._InitEUIModule()call in the same function. That removes the PABPLAYER_LOGINbranch, theTryCreateBarsretry loop and thens._eufEnabledstamp. The build lands in the same tick as before (the old first retry ran right afterSetupOptionsPanel). A disabled Unit Frames module never runsSetupOptionsPanel, so PAB still stays down there without a separate check.How was it tested?
Tested in-game on live.
Screenshots
N/A, no visual change beyond the bars showing at login as intended.
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard frames: N/A, Blizzard frame handling is unchanged