summaryrefslogtreecommitdiff
path: root/packets/select_character_packet.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-11-28 18:38:42 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-11-28 18:38:42 +0100
commite8aa9f50886b66d525307a58d71036e6fd3d4aa1 (patch)
treece6f59eecf1eb3e1ba2794166c09623d8a2d7d83 /packets/select_character_packet.gd
parentc89f25f59aa493d95bcac8e75ca5cdd57a0403e7 (diff)
next commit
Diffstat (limited to 'packets/select_character_packet.gd')
-rw-r--r--packets/select_character_packet.gd18
1 files changed, 18 insertions, 0 deletions
diff --git a/packets/select_character_packet.gd b/packets/select_character_packet.gd
new file mode 100644
index 0000000..18843cc
--- /dev/null
+++ b/packets/select_character_packet.gd
@@ -0,0 +1,18 @@
+class_name SelectCharacterPacket
+extends Packet
+
+
+static var header := 0x0066
+
+
+## Byte Type: u8
+## Byte Length: 1
+var selected_slot: int
+
+
+func to_bytes():
+ var payload = PackedByteArray([])
+ payload.resize(1)
+ payload.encode_u8(0, selected_slot)
+
+ return get_header() + payload