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
4 changes: 2 additions & 2 deletions packages/solaris/solaris/parse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def run_all_parser(
)
)
with change_workdir(output_dir):
for parser_cls in parser_classes:
for parser_cls, data in parsed_data.items():
parser = parser_cls()
parser.save_parsed_config(parsed_data[parser_cls])
parser.save_parsed_config(data)


__all__ = [
Expand Down
13 changes: 11 additions & 2 deletions packages/solaris/solaris/parse/parsers/sign_icon_fight.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ItemItem(TypedDict):
tips: str
id: int
is_show_num: int
show_monster: int
show_monster: list[str]
show_time: int
sort: int

Expand Down Expand Up @@ -80,7 +80,16 @@ def parse(self, data: bytes) -> _SignIconFightConfig:
# 读取整数字段
item_id = reader.ReadSignedInt()
is_show_num = reader.ReadSignedInt()
show_monster = reader.ReadSignedInt()

# 可选的 showmonster 数组
show_monster: list[str] = []
if reader.ReadBoolean():
show_monster_count = reader.ReadSignedInt()
show_monster = [
reader.ReadUTFBytesWithLength()
for _ in range(show_monster_count)
]

show_time = reader.ReadSignedInt()
sort = reader.ReadSignedInt()

Expand Down
Loading