feat: Add support for 3.7.5x

This commit is contained in:
amizing25
2025-11-04 23:16:14 +07:00
parent f1ef8d8da2
commit 56bdb1abc1
20 changed files with 59097 additions and 61538 deletions
+8 -8
View File
@@ -1,4 +1,4 @@
use proto::{Avatar, AvatarSkillTree, MultiPathAvatarTypeInfo};
use proto::{Avatar, AvatarSkillTree, MultiPathAvatarInfo};
use serde::{Deserialize, Serialize};
use std::collections::{BTreeMap, HashMap};
@@ -67,14 +67,14 @@ impl FreesrData {
})
.collect::<Vec<_>>(),
equipment_unique_id: lightcone.map(|v| v.get_unique_id()).unwrap_or_default(),
first_met_timestamp: 1712924677,
first_met_time_stamp: 1712924677,
equip_relic_list: relics.map(|v| v.into()).collect::<Vec<_>>(),
unk_enhanced_id: avatar.enhanced_id.unwrap_or_default(),
..Default::default()
})
}
pub fn get_avatar_multipath_proto(&self, avatar_id: u32) -> Option<MultiPathAvatarTypeInfo> {
pub fn get_avatar_multipath_proto(&self, avatar_id: u32) -> Option<MultiPathAvatarInfo> {
let avatar = self.avatars.get(&avatar_id)?;
let mp_type = MultiPathAvatar::from(avatar_id);
@@ -82,7 +82,7 @@ impl FreesrData {
return None;
}
Some(MultiPathAvatarTypeInfo {
Some(MultiPathAvatarInfo {
avatar_id: mp_type as i32,
rank: avatar.data.rank,
equip_relic_list: self
@@ -91,7 +91,7 @@ impl FreesrData {
.filter(|relic| relic.equip_avatar == mp_type as u32)
.map(|relic| relic.into())
.collect(),
skilltree_list: avatar
multi_path_skill_tree: avatar
.data
.skills
.iter()
@@ -111,7 +111,7 @@ impl FreesrData {
})
}
pub fn get_multi_path_info(&self) -> Vec<MultiPathAvatarTypeInfo> {
pub fn get_multi_path_info(&self) -> Vec<MultiPathAvatarInfo> {
MultiPathAvatar::to_vec()
.into_iter()
.filter_map(|mp_type| {
@@ -120,7 +120,7 @@ impl FreesrData {
}
let avatar_info = self.avatars.get(&((mp_type) as u32))?;
Some(MultiPathAvatarTypeInfo {
Some(MultiPathAvatarInfo {
avatar_id: mp_type as i32,
rank: avatar_info.data.rank,
equip_relic_list: self
@@ -129,7 +129,7 @@ impl FreesrData {
.filter(|relic| relic.equip_avatar == mp_type as u32)
.map(|relic| relic.into())
.collect(),
skilltree_list: avatar_info
multi_path_skill_tree: avatar_info
.data
.skills
.iter()
+2 -2
View File
@@ -163,7 +163,7 @@ impl AvatarJson {
})
.collect::<Vec<_>>(),
equipment_unique_id: lightcone.map(|v| v.get_unique_id()).unwrap_or_default(),
first_met_timestamp: 1712924677,
first_met_time_stamp: 1712924677,
equip_relic_list: relics.iter().map(|v| (*v).into()).collect::<Vec<_>>(),
unk_enhanced_id: self.enhanced_id.unwrap_or_default(),
..Default::default()
@@ -212,7 +212,7 @@ impl AvatarJson {
for buff_id in &self.techniques {
battle_buff.push(BattleBuff {
wave_flag: 0xffffffff,
owner_id: index,
owner_index: index,
level: 1,
id: *buff_id,
dynamic_values: HashMap::from([(String::from("SkillIndex"), 2.0)]),
+3 -8
View File
@@ -37,9 +37,10 @@ impl Default for BattleConfig {
}
}
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[derive(Default, Debug, Serialize, Deserialize, Clone, PartialEq)]
pub enum BattleType {
#[serde(alias = "DEFAULT")]
#[default]
Default = 0,
#[serde(alias = "MOC")]
Moc = 1,
@@ -49,12 +50,6 @@ pub enum BattleType {
AA = 5,
}
impl Default for BattleType {
fn default() -> Self {
Self::Default
}
}
// BATTLE BUFFS
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct BattleBuffJson {
@@ -78,7 +73,7 @@ impl BattleBuffJson {
id: self.id,
level: self.level,
wave_flag: 0xffffffff,
owner_id: 0xffffffff,
owner_index: 0xffffffff,
dynamic_values: if let Some(dyn_key) = &self.dynamic_key {
HashMap::from([(dyn_key.key.clone(), dyn_key.value as f32)])
} else {
+1 -1
View File
@@ -18,7 +18,7 @@ pub struct Lightcone {
impl_from!(Lightcone, Equipment, |value| {
Equipment {
equip_avatar_id: value.equip_avatar,
dress_avatar_id: value.equip_avatar,
exp: 0,
is_protected: false,
level: value.level,
+2 -2
View File
@@ -28,8 +28,8 @@ impl Monster {
}
SceneMonsterWave {
wave_id,
wave_param: Some(SceneMonsterWaveParam {
battle_wave_id: wave_id,
monster_param: Some(SceneMonsterWaveParam {
level: monsters.iter().map(|v| v.level).max().unwrap_or(95),
..Default::default()
}),
+1 -1
View File
@@ -74,7 +74,7 @@ impl_from!(Relic, EquipRelic, |value| {
impl_from!(Relic, proto::Relic, |value| {
proto::Relic {
equip_avatar_id: value.equip_avatar,
dress_avatar_id: value.equip_avatar,
exp: 0,
is_protected: false,
level: value.level,