summaryrefslogtreecommitdiff
path: root/packets/character_list_size_packet.gd
blob: 9491e1d0572ddae53f075779543d58a3c9d63122 (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
# TODO: really correct? chclif_charlist_notify in rAthena
class_name CharacterListSizePacket
extends Packet


const HEADER := 0x09a0
const BYTE_LENGTH := 6


## Byte Type: u32
## Byte Length: 4
var page_to_load: int

## Byte Type: u16
## Byte Length: 2
var character_slot_count: int


static func from_bytes(bytes: PackedByteArray):
	var packet = CharacterListSizePacket.new()
	
	packet.page_to_load = bytes.decode_u32(2)
	packet.character_slot_count = bytes.decode_u16(4)
	
	return packet