Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

class AurumEndgameOptionsConfigInfo(TypedDict):
attritube: str
branchid: int
desc: str
group: int
id: int
Expand All @@ -14,6 +15,7 @@ class AurumEndgameOptionsConfigInfo(TypedDict):
rarity: int
related: int
root: int
treeid: int
type: int
value: int

Expand Down Expand Up @@ -46,6 +48,7 @@ def parse(self, data: bytes) -> AurumEndgameOptionsConfigConfig:
for _ in range(num):
item: AurumEndgameOptionsConfigInfo = {
'attritube': reader.ReadUTFBytesWithLength(),
'branchid': reader.ReadSignedInt(),
'desc': reader.ReadUTFBytesWithLength(),
'group': reader.ReadSignedInt(),
'id': reader.ReadSignedInt(),
Expand All @@ -54,6 +57,7 @@ def parse(self, data: bytes) -> AurumEndgameOptionsConfigConfig:
'rarity': reader.ReadSignedInt(),
'related': reader.ReadSignedInt(),
'root': reader.ReadSignedInt(),
'treeid': reader.ReadSignedInt(),
'type': reader.ReadSignedInt(),
'value': reader.ReadSignedInt(),
}
Expand Down
12 changes: 9 additions & 3 deletions packages/solaris/solaris/parse/parsers/hide_moves.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class _HideMoveItem(TypedDict):


class _Root(TypedDict):
_text: str
item: list[_HideMoveItem]


Expand All @@ -30,12 +31,17 @@ def parsed_config_filename(cls) -> str:

def parse(self, data: bytes) -> HideMovesConfig:
reader = BytesReader(data)
result: HideMovesConfig = {'root': {'item': []}}
result: HideMovesConfig = {'root': {'_text': '', 'item': []}}

if not (reader.read_bool() and reader.read_bool()):
if not reader.ReadBoolean():
return result

count = reader.read_i32()
result['root']['_text'] = reader.ReadUTFBytesWithLength()

if not reader.ReadBoolean():
return result

count = reader.ReadSignedInt()

for _ in range(count):
item: _HideMoveItem = {
Expand Down
Loading