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
35 changes: 22 additions & 13 deletions packages/solaris/solaris/parse/parsers/autocard_buff.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
class AutocardBuffInfo(TypedDict):
"""Autocard Buff 信息条目"""

effect_icon: str
object: str
param: str
param_des: str
id: int
is_bf_battle_effect: int
is_cold_wave_effect: int
is_death_effect: int
is_growth_effect: int
is_place_effect: int
buff_des: str
buff_object: str
buff_param: str
effect_icon: str
id: int


class AutocardBuffConfig(TypedDict):
Expand Down Expand Up @@ -44,23 +47,29 @@ def parse(self, data: bytes) -> AutocardBuffConfig:

count = reader.ReadSignedInt()
for _ in range(count):
is_bf_battle_effect = reader.ReadSignedInt()
is_cold_wave_effect = reader.ReadSignedInt()
is_death_effect = reader.ReadSignedInt()
is_growth_effect = reader.ReadSignedInt()
is_place_effect = reader.ReadSignedInt()
buff_des = reader.ReadUTFBytesWithLength()
buff_object = reader.ReadUTFBytesWithLength()
buff_param = reader.ReadUTFBytesWithLength()
effect_icon = reader.ReadUTFBytesWithLength()
id_val = reader.ReadSignedInt()
object_val = reader.ReadUTFBytesWithLength()
param = reader.ReadUTFBytesWithLength()
param_des = reader.ReadUTFBytesWithLength()

result['data'].append(
AutocardBuffInfo(
effect_icon=effect_icon,
object=object_val,
param=param,
param_des=param_des,
id=id_val,
is_bf_battle_effect=is_bf_battle_effect,
is_cold_wave_effect=is_cold_wave_effect,
is_death_effect=is_death_effect,
is_growth_effect=is_growth_effect,
is_place_effect=is_place_effect,
buff_des=buff_des,
buff_object=buff_object,
buff_param=buff_param,
effect_icon=effect_icon,
id=id_val,
)
)

Expand Down
3 changes: 3 additions & 0 deletions packages/solaris/solaris/parse/parsers/autocard_skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class AutocardSkinInfo(TypedDict):
rarity: int
resource: str
series: int
session: int
skin_name: str
stat: int
tag: str
Expand Down Expand Up @@ -61,6 +62,7 @@ def parse(self, data: bytes) -> AutocardSkinConfig:
rarity = reader.ReadSignedInt()
resource = reader.ReadUTFBytesWithLength()
series = reader.ReadSignedInt()
session = reader.ReadSignedInt()
skin_name = reader.ReadUTFBytesWithLength()
stat = reader.ReadSignedInt()
tag = reader.ReadUTFBytesWithLength()
Expand All @@ -78,6 +80,7 @@ def parse(self, data: bytes) -> AutocardSkinConfig:
rarity=rarity,
resource=resource,
series=series,
session=session,
skin_name=skin_name,
stat=stat,
tag=tag,
Expand Down
Loading