* FocusUnit
* UnitTokenFromGUID: place focus after target, not after mouseover
Retail's documented scan order is
player -> vehicle -> pet -> party -> partypet -> raid -> raidpet
-> nameplate -> arena -> arenapet -> boss -> target -> focus
-> npc -> mouseover -> softenemy -> softfriend -> softinteract
Earlier commit placed focus at the very end. Moves it into the
target-adjacent slot so a focused unit reverse-resolves to "focus"
the moment it isn't also "target", matching retail.
---------
Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
Now that the engine recognizes `nameplateN` tokens (via the resolver
hook in nameplate/TokenResolver.cpp), they belong in the reverse-
lookup walk too. Iterates the dense ordered list directly via
NamePlate::Events::GetGUIDByIndex — bails on the first zero return,
skipping the token-resolver + SStrCmpI cost per index.
FUN_TOKEN_TO_GUID gates "player" on the object-manager lookup, which
drops out transiently during zone transitions / brief CGPlayer rebuilds
even though [VAR_LOCAL_PLAYER_PTR + 0xC0] still holds a valid GUID.
Short-circuit the bare "player" token to read the canonical pointer
directly so we match modern WoW's semantics. Suffixed tokens still go
through the engine so the chained `.target` walk works.
Doesn't help at addon file-load on first login — the GUID isn't
populated anywhere in the engine until SMSG_UPDATE_OBJECT runs in the
main loop after FrameScript_Initialize returns. Addons that need it at
boot have to wait for PLAYER_LOGIN.