#230 No upper bound on LUA script spinning (FakeQueue)

Status: Awaiting review · Area: UI & Interface · Addons & API

Players use macros that force the client to loop in a script to time channeled spells precisely, and there is no limit on this.

Current behavior

Hello WoW Forever team, I would first like to give a little bit of context: Channeled spells are currently not queueable in forever, this includes Shadow Priests signature spell "Mind Flay". It is widely accepted for proper chaining of Mind Flays without clipping the final tick of damage to be a form of skill expression. This also applies to Drain Soul/Life, and will apply to Wrack. However, where there is skill expression player's will look to addons and weakauras to bridge the gap where possible. Sometime in WotLK Classic, a weakaura popped up to promise to fix just that. By calculating the time for the next tick, and forcing the client so spin in a LUA while loop via a macro to delay the input perfectly, it was possible simulate proper queueing behaviour. This was eventually "patched" in WotLK classic to some arbitrary LUA script spinning watchdog timer. WoW Forever is not based on the Classic client, and lacks that patch because of QoL down the line in further expansions removed the problem, making this solution obsolete. WoW Forever, despite massive changes to how the addon API works, still provides all the tools those FakeQueue addons/auras need to operate (mostly UnitChannelInfo("player")) I have attached a video of me stalling my client using a port of those weakauras close to 1 second (a full tick). while GetTimePreciseSec() * 1000 - start < waitFor do fakeQueue() end local function fakeQueue() -- do *nothing* end

Expected behavior

This is a little bit opinionated because it depends on philosophy. The skill expression stance: Strip the API of the tools that provide the information to operate precise channel info timings, probably disabling some custom cast bar functinality as collateral. (In my opinion a clean way would be to restrict the use of GetTimePreciseSec() in combat, maybe as a secret value?) The quality of life stance: Add proper queueing for channeled spells, removing the problem that makes people resort to these measures. This might not sit well with people valuing "vanilla-like" mechanics and original skill expression. The half measure: Patch a watchdog spin timer into the client as you did with WotLK classic and tolerate minor undermining of skill expression.

How to reproduce

1. Make a weakaura/foreveraura/addon that measures any amount of time you want to stall your client for, this value can be dynamic in combat, and use this code pattern in a globally registered lua function (let's call it FQ)
local function fakeQueue()
    -- do *nothing*
end
local function FQChannel()
  local start = GetTimePreciseSec() * 1000
  local waitFor =  1000
  while GetTimePreciseSec() * 1000 - start < waitFor do
                  fakeQueue()
  end
end
setglobal("FQ", FQChannel)

2.Make a Macro to apply the delay:
`
/run FQ()
/use Mind Flay
`
3. Use it, the game will spin/stall for some time, appearing as an extended freeze frame before unlocking again and then using the spell.