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
9 changes: 9 additions & 0 deletions packages/solaris/solaris/parse/parsers/autocard_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ class AutocardContentInfo(TypedDict):
card_txt: str
des: str
name: str
skins: str
attack: int
compose: int
compose_to: int
cost: int
count_num: int
count_type: int
display: int
headpic_id: int
health: int
id: int
is_use: int
Expand Down Expand Up @@ -59,20 +62,23 @@ def parse(self, data: bytes) -> AutocardContentConfig:
buff_id = reader.ReadUTFBytesWithLength()
buff_param = reader.ReadUTFBytesWithLength()
count_num = reader.ReadSignedInt()
count_type = reader.ReadSignedInt()
display = reader.ReadSignedInt()
attack = reader.ReadSignedInt()
card_txt = reader.ReadUTFBytesWithLength()
compose = reader.ReadSignedInt()
compose_to = reader.ReadSignedInt()
cost = reader.ReadSignedInt()
des = reader.ReadUTFBytesWithLength()
headpic_id = reader.ReadSignedInt()
health = reader.ReadSignedInt()
id_val = reader.ReadSignedInt()
is_use = reader.ReadSignedInt()
level = reader.ReadSignedInt()
name = reader.ReadUTFBytesWithLength()
nature = reader.ReadSignedInt()
pic_id = reader.ReadSignedInt()
skins = reader.ReadUTFBytesWithLength()
subtype = reader.ReadSignedInt()
type_val = reader.ReadSignedInt()

Expand All @@ -83,12 +89,15 @@ def parse(self, data: bytes) -> AutocardContentConfig:
card_txt=card_txt,
des=des,
name=name,
skins=skins,
attack=attack,
compose=compose,
compose_to=compose_to,
cost=cost,
count_num=count_num,
count_type=count_type,
display=display,
headpic_id=headpic_id,
health=health,
id=id_val,
is_use=is_use,
Expand Down
27 changes: 24 additions & 3 deletions packages/solaris/solaris/parse/parsers/autocard_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@ class AutocardPlayerInfo(TypedDict):
action_1: str
action_2: str
action_3: str
book_action_1: str
book_action_2: str
book_action_3: str
des: str
get_des: str
name: str
pos: str
resource: str
skin: str
skin_name: str
tag: str
id: int
jumpinfo: int
max_level: int
move_speed: int
rarity: int
stat: int


class AutocardPlayerConfig(TypedDict):
Expand Down Expand Up @@ -49,33 +56,47 @@ def parse(self, data: bytes) -> AutocardPlayerConfig:

count = reader.ReadSignedInt()
for _ in range(count):
max_level = reader.ReadSignedInt()
pos = reader.ReadUTFBytesWithLength()
action_1 = reader.ReadUTFBytesWithLength()
action_2 = reader.ReadUTFBytesWithLength()
action_3 = reader.ReadUTFBytesWithLength()
book_action_1 = reader.ReadUTFBytesWithLength()
book_action_2 = reader.ReadUTFBytesWithLength()
book_action_3 = reader.ReadUTFBytesWithLength()
des = reader.ReadUTFBytesWithLength()
get_des = reader.ReadUTFBytesWithLength()
id_val = reader.ReadSignedInt()
jumpinfo = reader.ReadSignedInt()
move_speed = reader.ReadSignedInt()
name = reader.ReadUTFBytesWithLength()
rarity = reader.ReadSignedInt()
resource = reader.ReadUTFBytesWithLength()
skin = reader.ReadUTFBytesWithLength()
skin_name = reader.ReadUTFBytesWithLength()
stat = reader.ReadSignedInt()
tag = reader.ReadUTFBytesWithLength()

result['data'].append(
AutocardPlayerInfo(
action_1=action_1,
action_2=action_2,
action_3=action_3,
book_action_1=book_action_1,
book_action_2=book_action_2,
book_action_3=book_action_3,
des=des,
get_des=get_des,
name=name,
pos=pos,
resource=resource,
skin=skin,
skin_name=skin_name,
tag=tag,
id=id_val,
jumpinfo=jumpinfo,
max_level=max_level,
move_speed=move_speed,
rarity=rarity,
stat=stat,
)
)

Expand Down
18 changes: 18 additions & 0 deletions packages/solaris/solaris/parse/parsers/autocard_skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ class AutocardSkinInfo(TypedDict):
content_id: int
get_des: str
id: int
ishow: int
jump_id: int
name: str
position: str
rarity: int
resource: str
series: int
skin_name: str
stat: int
tag: str
type: int


Expand Down Expand Up @@ -48,21 +54,33 @@ def parse(self, data: bytes) -> AutocardSkinConfig:
content_id = reader.ReadSignedInt()
get_des = reader.ReadUTFBytesWithLength()
id_val = reader.ReadSignedInt()
ishow = reader.ReadSignedInt()
jump_id = reader.ReadSignedInt()
name = reader.ReadUTFBytesWithLength()
position = reader.ReadUTFBytesWithLength()
rarity = reader.ReadSignedInt()
resource = reader.ReadUTFBytesWithLength()
series = reader.ReadSignedInt()
skin_name = reader.ReadUTFBytesWithLength()
stat = reader.ReadSignedInt()
tag = reader.ReadUTFBytesWithLength()
type_val = reader.ReadSignedInt()

result['data'].append(
AutocardSkinInfo(
content_id=content_id,
get_des=get_des,
id=id_val,
ishow=ishow,
jump_id=jump_id,
name=name,
position=position,
rarity=rarity,
resource=resource,
series=series,
skin_name=skin_name,
stat=stat,
tag=tag,
type=type_val,
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class Item25(BaseItemData):

hide: int
life_time: int
purpose: int
rarity: int
sort: int
use_max: int
Expand Down Expand Up @@ -212,6 +213,7 @@ def parse_item_fields(self, reader: BytesReader):
sort=reader.ReadSignedInt(),
use_max=reader.ReadSignedInt(),
cat_id=reader.ReadSignedInt(),
purpose=reader.ReadSignedInt(),
wd=reader.ReadSignedInt(),
)

Expand Down
Loading