Skip to content

Commit

Permalink
Merge pull request #47 from IceDynamix/reliquary-update
Browse files Browse the repository at this point in the history
Update to game version 2.4
  • Loading branch information
IceDynamix authored Aug 13, 2024
2 parents 026048e + 9d65eb9 commit 6468805
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 66 deletions.
59 changes: 30 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "reliquary-archiver"
version = "0.1.7"
version = "0.1.8"
edition = "2021"
license = "MIT"
repository = "https://github.com/IceDynamix/reliquary-archiver"
Expand All @@ -12,18 +12,18 @@ homepage = "https://github.com/IceDynamix/reliquary-archiver"

[dependencies]
base64 = "0.22.1"
clap = { version = "4.5.4", features = ["derive"] }
clap = { version = "4.5.14", features = ["derive"] }
color-eyre = "0.6.3"
pcap = "2.0.0"
serde = { version = "1.0.201", features = ["derive"] }
serde_json = "1.0.117"
serde = { version = "1.0.205", features = ["derive"] }
serde_json = "1.0.122"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] }
ureq = { version = "2.9.7", features = ["json"] }
ureq = { version = "2.10.1", 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
Expand Down
39 changes: 8 additions & 31 deletions src/export/fribbels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Character> = 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<Relic> = bag.relic_list.iter()
Expand Down Expand Up @@ -171,15 +147,16 @@ impl Exporter for OptimizerExporter {
}
}
}
command_id::GetHeroBasicTypeInfoScRsp => {
debug!("detected trailblazer packet");
let cmd = command.parse_proto::<GetHeroBasicTypeInfoScRsp>();
command_id::GetMultiPathAvatarInfoScRsp => {
debug!("detected multipath packet (trailblazer/march 7th)");
let cmd = command.parse_proto::<GetMultiPathAvatarInfoScRsp>();
match cmd {
Ok(cmd) => {
self.add_trailblazer_data(cmd);
// TODO: handle multi path packets
warn!("ignored multipath characters for now, will be supported in next version");
}
Err(error) => {
warn!(%error, "could not parse trailblazer data command");
warn!(%error, "could not parse multipath data command");
}
}
}
Expand Down

0 comments on commit 6468805

Please sign in to comment.