From a14e88ff4d0d87841a44254e2bff1784da6e8b48 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 15 Dec 2024 14:23:25 +0100 Subject: next commit --- packets/character_server/pin_code_state_packet.gd | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 packets/character_server/pin_code_state_packet.gd (limited to 'packets/character_server/pin_code_state_packet.gd') diff --git a/packets/character_server/pin_code_state_packet.gd b/packets/character_server/pin_code_state_packet.gd new file mode 100644 index 0000000..ab75618 --- /dev/null +++ b/packets/character_server/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 -- cgit v1.2.3