diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-11-29 21:54:32 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-11-29 21:54:32 +0100 |
commit | 313afffce7a823c30acf4853b083f9ca5132e879 (patch) | |
tree | 5a7370392ebd39314612166b35e6f53e67441c0b /packets/character_server_login_success_packet.gd | |
parent | e8aa9f50886b66d525307a58d71036e6fd3d4aa1 (diff) |
next commit
Diffstat (limited to 'packets/character_server_login_success_packet.gd')
-rw-r--r-- | packets/character_server_login_success_packet.gd | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/packets/character_server_login_success_packet.gd b/packets/character_server_login_success_packet.gd index 800e218..bfe6c45 100644 --- a/packets/character_server_login_success_packet.gd +++ b/packets/character_server_login_success_packet.gd @@ -2,6 +2,10 @@ class_name CharacterServerLoginSuccessPacket extends Packet +const HEADER := 0x082d +const BYTE_LENGTH := 0 + + ## Byte Length: 2 var unknown: int @@ -27,18 +31,12 @@ var unused: PackedByteArray static func from_bytes(bytes: PackedByteArray): var packet = CharacterServerLoginSuccessPacket.new() - packet.unknown = bytes.decode_u16(0) - packet.normal_slot_count = bytes.decode_u8(2) - packet.vip_slot_count = bytes.decode_u8(3) - packet.billing_slot_count = bytes.decode_u8(4) - packet.producible_slot_count = bytes.decode_u8(5) - packet.valid_slot = bytes.decode_u8(6) - packet.unused = bytes.slice(7, 7 + 20) + packet.unknown = bytes.decode_u16(6) + packet.normal_slot_count = bytes.decode_u8(8) + packet.vip_slot_count = bytes.decode_u8(9) + packet.billing_slot_count = bytes.decode_u8(10) + packet.producible_slot_count = bytes.decode_u8(11) + packet.valid_slot = bytes.decode_u8(12) + packet.unused = bytes.slice(13, 13 + 20) return packet - -static func from_bytes_via_peer(peer: StreamPeer): - var _header = peer.get_data(6) - var remaining_bytes = peer.get_data(peer.get_available_bytes()) - - return from_bytes(remaining_bytes[1]) |