diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-11-30 12:46:08 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-11-30 12:46:08 +0100 |
commit | d560f77811d4fc6f29bf477356a6d2e58dda0be1 (patch) | |
tree | 3ac2c4267b5c88e40849416115977574e9f09a83 /packets/pin_code_state_packet.gd | |
parent | 313afffce7a823c30acf4853b083f9ca5132e879 (diff) |
next commit
Diffstat (limited to 'packets/pin_code_state_packet.gd')
-rw-r--r-- | packets/pin_code_state_packet.gd | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/packets/pin_code_state_packet.gd b/packets/pin_code_state_packet.gd new file mode 100644 index 0000000..ab75618 --- /dev/null +++ b/packets/pin_code_state_packet.gd @@ -0,0 +1,36 @@ +## rAthena References: +## - chclif_pincode_sendstate +class_name PinCodeStatePacket +extends Packet + + +const HEADER := 0x08b9 +const BYTE_LENGTH := 12 + + +## Byte Type: u32 +## Byte Length: 4 +var pin_code_seed: int + +## Byte Type: u32 +## Byte Length: 4 +var account_id: int + +## Byte Type: u8 +## Byte Length: 1 +var pin_code_state: Constants.PinCodeState + +## Byte Type: u8 +## Byte Length: 1 +var unused: PackedByteArray + + +static func from_bytes(bytes: PackedByteArray): + var packet = PinCodeStatePacket.new() + + packet.pin_code_seed = bytes.decode_u32(2) + packet.account_id = bytes.decode_u32(6) + packet.pin_code_state = bytes.decode_u8(10) + packet.unused = bytes.slice(11) + + return packet |