Skip to content

Commit

Permalink
fix: req
Browse files Browse the repository at this point in the history
  • Loading branch information
googlefan256 committed Nov 8, 2023
1 parent ac4aaa5 commit fceb916
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/enka-api/src/character.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ fn parse_equip_list(list: &Vec<Value>) -> (Option<Weapon>, Vec<Reliquary>) {
for entry in list {
if entry.get("reliquary").is_some() {
if let Some(r) = parse_equip_reliquary(entry) {
println!("{:?}", r);
reliquarys.push(r);
}
} else if entry.get("weapon").is_some() {
Expand Down Expand Up @@ -516,7 +517,7 @@ fn parse_equip_reliquary(entry: &Value) -> Option<Reliquary> {
position: ReliquaryType::parse(flat.get("equipType")?.as_str()?).ok()?,
icon: flat.get("icon")?.as_str()?.to_owned(),
name: flat.get("nameTextMapHash")?.as_u64()?,
set_name: u32::from_str(flat.get("setNameTextMapHash")?.as_str()?).ok()?,
set_name: flat.get("setNameTextMapHash")?.as_u64()? as u32,
rarity: flat.get("rankLevel")?.as_u64()? as u8,
level: (reliquary.get("level")?.as_u64()? - 1) as u8,
main_stats: parse_reliquary_stat(flat.get("reliquaryMainstat")?, "mainPropId")?,
Expand Down

0 comments on commit fceb916

Please sign in to comment.