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

SChangeDirection (0x11)

Previous: SRemoveItem | Server action index | Next: SDamageEffect

SChangeDirection is server-to-client action 0x11 in the 4.21 protocol.

Direction: server to client

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.

Payload format

OffsetWidthFieldEstablished meaning
0x004object_idUnsigned big-endian object identifier.
0x041directionDirection value. The mapped handler applies values 0 through 3.
0x05payload_length - 5unknown_05Any additional payload bytes; the mapped handler does not read them.

Handler functions

Function addressCurrent IDA nameRole
Darkages.exe:0x00468A90ui_map_dispatch_server_packetAccepts and dispatches the action in MapPane.
Darkages.exe:0x0046B574ui_map_handle_object_directionReads the object ID and direction and updates the matching map object.

Handler notes

ui_map_dispatch_server_packet calls ui_map_handle_object_direction. The helper reads the object ID at payload offset 0x00 and the direction at payload offset 0x04.

Schema status

The handler reads object_id, locates the map object, and applies direction only when its value is from 0 through 3. This payload prefix is established directly from the 4.21 instructions.