summaryrefslogtreecommitdiff
path: root/packets/character_information.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-11-30 12:46:08 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-11-30 12:46:08 +0100
commitd560f77811d4fc6f29bf477356a6d2e58dda0be1 (patch)
tree3ac2c4267b5c88e40849416115977574e9f09a83 /packets/character_information.gd
parent313afffce7a823c30acf4853b083f9ca5132e879 (diff)
next commit
Diffstat (limited to 'packets/character_information.gd')
-rw-r--r--packets/character_information.gd11
1 files changed, 5 insertions, 6 deletions
diff --git a/packets/character_information.gd b/packets/character_information.gd
index 20e40cd..a2ac0ab 100644
--- a/packets/character_information.gd
+++ b/packets/character_information.gd
@@ -2,6 +2,9 @@ class_name CharacterInformation
extends PacketChunk
+const BYTE_LENGTH := 175
+
+
## Byte Type: u32
## Byte Length: 4
var character_id: int
@@ -179,10 +182,6 @@ var character_name_change: int
var gender: Constants.Gender
-func _init() -> void:
- byte_length = 175
-
-
static func from_bytes(bytes: PackedByteArray):
var info = CharacterInformation.new()
@@ -234,8 +233,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[CharacterInformation]:
+ var array: Array[CharacterInformation] = []
var offset = 0
while offset < bytes.size():