summaryrefslogtreecommitdiff
path: root/packets/login_server_login_packet.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-12-15 14:23:25 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-12-15 14:23:25 +0100
commita14e88ff4d0d87841a44254e2bff1784da6e8b48 (patch)
tree0507cb8117da7943805a6479aef4526edb2db4dd /packets/login_server_login_packet.gd
parentca4d1945598863d0ce297f4272317e5dd5797f88 (diff)
next commit
Diffstat (limited to 'packets/login_server_login_packet.gd')
-rw-r--r--packets/login_server_login_packet.gd41
1 files changed, 0 insertions, 41 deletions
diff --git a/packets/login_server_login_packet.gd b/packets/login_server_login_packet.gd
deleted file mode 100644
index 0fa117d..0000000
--- a/packets/login_server_login_packet.gd
+++ /dev/null
@@ -1,41 +0,0 @@
-class_name LoginServerLoginPacket
-extends Packet
-
-
-const HEADER := 0x064
-const BYTE_LENGTH := 55
-
-
-## Byte Type: u32
-## Byte Length: 4
-var version: int = 0
-
-## Byte Length: 24
-var username: String
-
-## Byte Length: 24
-var password: String
-
-## Byte Type: u8
-## Byte Length: 1
-var client_type: int = 0
-
-
-func to_bytes():
- var username_bytes = username.to_utf8_buffer()
- username_bytes.resize(24)
-
- var password_bytes = password.to_utf8_buffer()
- password_bytes.resize(24)
-
- var payload = PackedByteArray([])
- payload.resize(4)
- payload.encode_u32(0, version)
-
- payload.append_array(username_bytes)
- payload.append_array(password_bytes)
-
- payload.resize(53)
- payload.encode_u8(52, client_type)
-
- return get_header() + payload