mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
A Cooldown was vanilla's indicator Model with CooldownFrameTemplate loaded into it, so SetReverse and SetDrawEdge stored flags that changed nothing, and every cooldown paid a Model's per-frame cost. Cooldown is now a CSimpleFrame subclass built the way CGCooldown::Create builds it: one SMemAlloc block, the engine's frame constructor, and copies of CSimpleFrame's two vtables with 4.3.4's overrides in their 1.12 slots (update, layer emit, alpha, size change, LoadXML, identity, destructor). It runs 4.3.4's sweep / flash / reverse state machine and queues the star fan, flash and edge as layer-batch strips animated in place. - The five methods live in a class method hash of their own, so only a Cooldown has them; it is released after CGGameUI's unregister pass. - GetObjectType / GetFrameType answer through the engine's virtuals; the Lua re-registrations are gone. - star4.blp ships with 1.12; edge.blp does not, so its 16x16 image is created in memory through TextureCreateWithCallback. - A Cooldown inheriting the stock Model CooldownFrameTemplate applies 4.3.4's template (setAllPoints, hidden); reverse / drawEdge XML attributes are read. - CooldownFrame_SetTimer calls SetCooldown on a Cooldown and keeps 1.12's body for the Models stock buttons use. - Mask.cpp's path loader moves to texture/Load; frame/RenderBatch queues quads into a layer batch. Verified in-game: sweep, flash and hide; reverse with the edge line; stock action-button cooldowns unchanged; repeated /reload.