Skip to content

Player action events release

Graylin Kim edited this page Jan 18, 2012 · 1 revision

Player Action Events - Type 0x01 (Release Build)

Player Action Event Information for builds < 16561. For documentation on builds > 16561 see the 16561 page.

Player Leave Event - Code 0x09

No additional data associated with this event.

Hotkey Event - Code 0x[1-9]D

The first data byte here acts as an indicator of what type of hotkey event this is:

Set Hotkey to Current Selection - First = 0x00

No data associated with this event

Get Hotkey with No Changes - First = 0x02

No data associated with this event

Get Hotkey with Changes - First > 0x03

This implies that a unit has died, morphed, or is no longer selectable. Possibly that you added units with Shift+Control.

An additional second byte provides another indicator to be used later.

The first 5 bits of the first byte indicate how many bytes following the second should be skipped.

The remaining logic flows as follows:

extras = first >> 3           #Shift off 3 bits to get the first 5
second = bytes.getBigInt(1)   #Get the next byte indicator
bytes.skip(extras)            #Skip the extra bytes

if first & 0x04:
    bytes.skip(1)
    if second & 0x06 == 0x06:
        bytes.skip(1)
Clone this wiki locally