diff options
Diffstat (limited to 'packets/character_server_information.gd')
-rw-r--r-- | packets/character_server_information.gd | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packets/character_server_information.gd b/packets/character_server_information.gd index f67b065..19f22c1 100644 --- a/packets/character_server_information.gd +++ b/packets/character_server_information.gd @@ -2,6 +2,9 @@ class_name CharacterServerInformation extends PacketChunk +const BYTE_LENGTH := 160 + + ## Byte Type: u32 ## Byte Length: 4 var server_ip: PackedByteArray @@ -31,10 +34,6 @@ var display_new: int var unknown: PackedByteArray -func _init() -> void: - byte_length = 160 - - func get_server_ip(): return "%s.%s.%s.%s" % [ server_ip.decode_u8(0), @@ -58,8 +57,8 @@ static func from_bytes(bytes: PackedByteArray): return info -static func array_from_bytes(bytes: PackedByteArray) -> Array: - var array = [] +static func array_from_bytes(bytes: PackedByteArray) -> Array[CharacterServerInformation]: + var array: Array[CharacterServerInformation] = [] var offset = 0 while offset < bytes.size(): |