From 00c8f2f2b939622b4474341a0ac69ec9d5b691b8 Mon Sep 17 00:00:00 2001 From: IceDynamix <22303902+IceDynamix@users.noreply.github.com> Date: Fri, 9 Aug 2024 21:22:12 +0200 Subject: [PATCH] bump reliquary version to v3.0.0 and ignore multipath packets for now --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- src/export/fribbels.rs | 39 ++++++++------------------------------- 3 files changed, 15 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86a2fdd..9fe1eb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,9 +230,9 @@ dependencies = [ [[package]] name = "etherparse" -version = "0.14.2" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24890603eb4b43aa788f02261ce21714449033e3e2ab93692f0ab18480c3c9b1" +checksum = "21696e6dfe1057a166a042c6d27b89a46aad2ee1003e6e1e03c49d54fd3270d7" dependencies = [ "arrayvec", ] @@ -543,8 +543,8 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reliquary" -version = "1.0.1" -source = "git+https://github.com/IceDynamix/reliquary?tag=v1.0.1#add4b405d8b78adf60dceb6a9efbfb230e12f2c6" +version = "3.0.0" +source = "git+https://github.com/IceDynamix/reliquary?tag=v3.0.0#6ab4524b01ce7c02b731ba74877e9edb5060aa7c" dependencies = [ "base64", "etherparse", @@ -559,7 +559,7 @@ dependencies = [ [[package]] name = "reliquary-archiver" -version = "0.1.6" +version = "0.1.7" dependencies = [ "base64", "clap", @@ -576,7 +576,7 @@ dependencies = [ [[package]] name = "reliquary-proc-macro" version = "0.1.0" -source = "git+https://github.com/IceDynamix/reliquary?tag=v1.0.1#add4b405d8b78adf60dceb6a9efbfb230e12f2c6" +source = "git+https://github.com/IceDynamix/reliquary?tag=v3.0.0#6ab4524b01ce7c02b731ba74877e9edb5060aa7c" dependencies = [ "quote", "syn", diff --git a/Cargo.toml b/Cargo.toml index b0f4a0b..4c8af15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ ureq = { version = "2.9.7", features = ["json"] } [dependencies.reliquary] git = "https://github.com/IceDynamix/reliquary" -tag = "v2.0.0" +tag = "v3.0.0" [profile.release] opt-level = "z" # optimize for size diff --git a/src/export/fribbels.rs b/src/export/fribbels.rs index cf3eb65..49e4662 100644 --- a/src/export/fribbels.rs +++ b/src/export/fribbels.rs @@ -12,10 +12,9 @@ use reliquary::network::gen::command_id; use reliquary::network::gen::proto::Avatar::Avatar as ProtoCharacter; use reliquary::network::gen::proto::AvatarSkillTree::AvatarSkillTree as ProtoSkillTree; use reliquary::network::gen::proto::Equipment::Equipment as ProtoLightCone; -use reliquary::network::gen::proto::Gender::Gender; use reliquary::network::gen::proto::GetAvatarDataScRsp::GetAvatarDataScRsp; use reliquary::network::gen::proto::GetBagScRsp::GetBagScRsp; -use reliquary::network::gen::proto::GetHeroBasicTypeInfoScRsp::GetHeroBasicTypeInfoScRsp; +use reliquary::network::gen::proto::GetMultiPathAvatarInfoScRsp::GetMultiPathAvatarInfoScRsp; use reliquary::network::gen::proto::HeroBasicTypeInfo::HeroBasicTypeInfo; use reliquary::network::gen::proto::PlayerGetTokenScRsp::PlayerGetTokenScRsp; use reliquary::network::gen::proto::Relic::Relic as ProtoRelic; @@ -78,30 +77,7 @@ impl OptimizerExporter { self.uid = Some(uid); } - pub fn add_trailblazer_data(&mut self, hero: GetHeroBasicTypeInfoScRsp) { - let gender = match hero.gender.enum_value().unwrap() { - Gender::GenderNone => "", // probably in the prologue before selecting gender? - Gender::GenderMan => "Caelus", - Gender::GenderWoman => "Stelle" - }; - - self.trailblazer = Some(gender); - info!(gender, "found trailblazer gender"); - - let mut builds: Vec = hero.basic_type_info_list.iter() - .filter_map(|b| export_proto_hero(&self.database, &b)) - .collect(); - - self.current_trailblazer_path = avatar_path_lookup(&self.database, hero.cur_basic_type.value() as u32); - if let Some(path) = self.current_trailblazer_path { - info!(path, "found current trailblazer path"); - } else { - warn!("unknown path for current trailblazer"); - } - - info!(num=builds.len(), "found trailblazer builds"); - self.trailblazer_characters.append(&mut builds); - } + // TODO: add_multipath_avatars pub fn add_inventory(&mut self, bag: GetBagScRsp) { let mut relics: Vec = bag.relic_list.iter() @@ -171,15 +147,16 @@ impl Exporter for OptimizerExporter { } } } - command_id::GetHeroBasicTypeInfoScRsp => { - debug!("detected trailblazer packet"); - let cmd = command.parse_proto::(); + command_id::GetMultiPathAvatarInfoScRsp => { + debug!("detected multipath packet (trailblazer/march 7th)"); + let cmd = command.parse_proto::(); match cmd { Ok(cmd) => { - self.add_trailblazer_data(cmd); + println!("{cmd:?}"); + // TODO: handle multi path packets } Err(error) => { - warn!(%error, "could not parse trailblazer data command"); + warn!(%error, "could not parse multipath data command"); } } }