summaryrefslogtreecommitdiff
path: root/packets
diff options
context:
space:
mode:
Diffstat (limited to 'packets')
-rw-r--r--packets/equippable_item_information.gd2
-rw-r--r--packets/item_option.gd2
-rw-r--r--packets/map_server/server_message_packet.gd2
-rw-r--r--packets/regular_item_information.gd2
4 files changed, 3 insertions, 5 deletions
diff --git a/packets/equippable_item_information.gd b/packets/equippable_item_information.gd
index 32c04e1..517297b 100644
--- a/packets/equippable_item_information.gd
+++ b/packets/equippable_item_information.gd
@@ -91,7 +91,7 @@ static func from_bytes(bytes: ByteStream):
static func array_from_bytes(bytes: ByteStream) -> Array[EquippableItemInformation]:
var array: Array[EquippableItemInformation] = []
- while bytes.available():
+ while bytes.available() > 0:
var chunk = from_bytes(bytes)
array.append(chunk)
diff --git a/packets/item_option.gd b/packets/item_option.gd
index 9a226db..1cf338f 100644
--- a/packets/item_option.gd
+++ b/packets/item_option.gd
@@ -31,7 +31,7 @@ static func from_bytes(bytes: ByteStream):
static func array_from_bytes(bytes: ByteStream) -> Array[ItemOption]:
var array: Array[ItemOption] = []
- while bytes.available():
+ while bytes.available() > 0:
var chunk = from_bytes(bytes)
array.append(chunk)
diff --git a/packets/map_server/server_message_packet.gd b/packets/map_server/server_message_packet.gd
index 6ab2a3f..9b8d846 100644
--- a/packets/map_server/server_message_packet.gd
+++ b/packets/map_server/server_message_packet.gd
@@ -22,6 +22,4 @@ static func from_bytes(bytes: PackedByteArray):
packet.message = bytes.slice(4).get_string_from_utf8()
- print("Message: ", packet.message)
-
return packet
diff --git a/packets/regular_item_information.gd b/packets/regular_item_information.gd
index 1c12a58..d3aa25b 100644
--- a/packets/regular_item_information.gd
+++ b/packets/regular_item_information.gd
@@ -56,7 +56,7 @@ static func from_bytes(bytes: ByteStream):
static func array_from_bytes(bytes: ByteStream) -> Array[RegularItemInformation]:
var array: Array[RegularItemInformation] = []
- while bytes.available():
+ while bytes.available() > 0:
var chunk = from_bytes(bytes)
array.append(chunk)