blob: ab756187a1be086dbdab6e5182d373b6f16acd95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
|