Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CUseSpell (0x0F)

Previous: CSay | Client action index | Next: CTransferServer

CUseSpell is the documentation name for client-to-server action 0x0F in the 4.21 client. The friendly source class name is not retained, but the action’s spell-slot construction and delayed submission are established directly.

Direction: client to server

Encrypted: Yes. See Sequence and XOR Transformation.

Payload offsets begin with the first byte after the action. The frame marker, frame length, action, sequence, and trailing zero are excluded.

Confirmed immediate payload form

OffsetWidthFieldEstablished meaning
0x001spell_slotSlot byte read from the activated spell pane at object +0xF4.

Darkages.exe:0x00455684 ui_spell_slot_begin_cast builds exactly two logical bytes, [0x0F, spell_slot], for the confirmed immediate path. Other targeting modes enter separate input panes; their final packet fields are not yet mapped.

Delayed submission

ui_spell_delay_begin copies the complete logical packet and its length into the delay controller before deciding when to send it. With a zero delay it calls net_c_queue_send immediately. With a nonzero delay it sends CSpellDelayRequest 0x4D, emits configured CSpellDelaySay 0x4E phrases on 1000 ms timers, and queues the held 0x0F packet on the final tick.

The delay phrases come from SpellBook.cfg and are matched to the spell name. This local delay means the final CUseSpell submission may be owned by a timer callback rather than the original mouse Event.

Functions

AddressCurrent IDA nameRole
Darkages.exe:0x00455684ui_spell_slot_begin_castBuild the confirmed [0x0F, slot] form.
Darkages.exe:0x004556F4ui_spell_delay_beginCopy and hold the logical packet, or submit it immediately.
Darkages.exe:0x00456940ui_spell_delay_handle_timerSubmit the held packet on the final delay tick.

See UI, Input, and Packet Flows for the input-to-timer-to-network path.