feat: Add support for version 2.7.5x

This commit is contained in:
amizing25 2024-12-03 19:33:38 +07:00
parent d14f4a9d49
commit 274a03de54
12 changed files with 110610 additions and 8394 deletions

View File

@ -2,11 +2,11 @@ use crate::net::tools::FreesrData;
use super::*;
static UNLOCKED_AVATARS: [u32; 59] = [
static UNLOCKED_AVATARS: [u32; 61] = [
8001, 1001, 1002, 1003, 1004, 1005, 1006, 1008, 1009, 1013, 1101, 1102, 1103, 1104, 1105, 1106,
1107, 1108, 1109, 1110, 1111, 1112, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210,
1211, 1212, 1213, 1214, 1215, 1217, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1312,
1315, 1310, 1314, 1218, 1221, 1220, 1222, 1223, 1317, 1313, 1225,
1315, 1310, 1314, 1218, 1221, 1220, 1222, 1223, 1317, 1313, 1225, 1402, 1401,
];
pub async fn on_get_avatar_data_cs_req(

View File

@ -280,8 +280,8 @@ async fn create_battle_info(caster_id: u32, skill_index: u32) -> SceneBattleInfo
player_detail_info: Some(RogueMagicBattleUnitInfo {
item: Some(Item::BattleRogueMagicData(BattleRogueMagicData {
round_cnt: Some(BattleRogueMagicRoundCount {
eiganlcjpoi: 3,
kdjdjompbbh: 0,
jnejloobmad: 3,
jfaidmkbmof: 0,
}),
battle_scepter_list: player
.battle_config
@ -321,7 +321,7 @@ async fn create_battle_info(caster_id: u32, skill_index: u32) -> SceneBattleInfo
.collect(),
})),
}),
scepter: Some(Cijjendfjlo { kklaobblgce: 5 }),
scepter: Some(Hnpkkiadpid { mokbhfdehnf: 5 }),
});
}

View File

@ -1,5 +1,3 @@
use std::sync::atomic::Ordering;
use crate::{
net::{
tools::{FreesrData, MultiPathAvatar},
@ -158,23 +156,6 @@ pub async fn on_send_msg_cs_req(
.await
.unwrap();
}
"dvd" => {
session.toggle_dvd().await;
session
.send(RevcMsgScNotify {
msg_type: body.msg_type,
text: format!(
"DVD toggled to {}",
session.dvd_running.load(Ordering::SeqCst)
),
emote: body.emote,
from_uid: SERVER_UID,
to_uid: 25,
chat_type: body.chat_type,
})
.await
.unwrap();
}
_ => {}
}
}

View File

@ -126,7 +126,7 @@ dummy! {
GetBoxingClubInfo,
GetNpcStatus,
TextJoinQuery,
GetSpringRecoverData,
// GetSpringRecoverData, // Removed 2.7.51
// GetChatFriendHistory,
GetSecretKeyInfo,
GetVideoVersionKey,

View File

@ -24,12 +24,12 @@ pub async fn on_player_heart_beat_cs_req(
) {
res.client_time_ms = body.client_time_ms;
res.server_time_ms = cur_timestamp_ms();
// res.download_data = Some(ClientDownloadData {
// version: 51,
// time: res.server_time_ms as i64,
// data: rbase64::decode("bG9jYWwgZnVuY3Rpb24gYmV0YV90ZXh0KG9iaikKICAgIGxvY2FsIGdhbWVPYmplY3QgPSBDUy5Vbml0eUVuZ2luZS5HYW1lT2JqZWN0LkZpbmQoIlVJUm9vdC9BYm92ZURpYWxvZy9CZXRhSGludERpYWxvZyhDbG9uZSkiKQoKICAgIGlmIGdhbWVPYmplY3QgdGhlbgogICAgICAgIGxvY2FsIHRleHRDb21wb25lbnQgPSBnYW1lT2JqZWN0OkdldENvbXBvbmVudEluQ2hpbGRyZW4odHlwZW9mKENTLlJQRy5DbGllbnQuTG9jYWxpemVkVGV4dCkpCgogICAgICAgIGlmIHRleHRDb21wb25lbnQgdGhlbgogICAgICAgICAgICB0ZXh0Q29tcG9uZW50LnRleHQgPSAiUm9iaW5TUiBpcyBhIGZyZWUgYW5kIG9wZW4gc291cmNlIHNvZnR3YXJlLiBkaXNjb3JkLmdnL3JldmVyc2Vkcm9vbXMiCiAgICAgICAgZW5kCiAgICBlbHNlCiAgICBlbmQKZW5kCgpiZXRhX3RleHQoKQ==").unwrap(),
// njddjhapnbo: 0
// });
res.download_data = Some(ClientDownloadData {
version: 51,
time: res.server_time_ms as i64,
data: rbase64::decode("bG9jYWwgZnVuY3Rpb24gYmV0YV90ZXh0KG9iaikKICAgIGxvY2FsIGdhbWVPYmplY3QgPSBDUy5Vbml0eUVuZ2luZS5HYW1lT2JqZWN0LkZpbmQoIlVJUm9vdC9BYm92ZURpYWxvZy9CZXRhSGludERpYWxvZyhDbG9uZSkiKQoKICAgIGlmIGdhbWVPYmplY3QgdGhlbgogICAgICAgIGxvY2FsIHRleHRDb21wb25lbnQgPSBnYW1lT2JqZWN0OkdldENvbXBvbmVudEluQ2hpbGRyZW4odHlwZW9mKENTLlJQRy5DbGllbnQuTG9jYWxpemVkVGV4dCkpCgogICAgICAgIGlmIHRleHRDb21wb25lbnQgdGhlbgogICAgICAgICAgICB0ZXh0Q29tcG9uZW50LnRleHQgPSAiUm9iaW5TUiBpcyBhIGZyZWUgYW5kIG9wZW4gc291cmNlIHNvZnR3YXJlLiBkaXNjb3JkLmdnL3JldmVyc2Vkcm9vbXMiCiAgICAgICAgZW5kCiAgICBlbHNlCiAgICBlbmQKZW5kCgpiZXRhX3RleHQoKQ==").unwrap(),
ghkpbpdfijh: 0
});
}
pub async fn on_player_login_finish_cs_req(

View File

@ -56,8 +56,8 @@ pub async fn on_enter_scene_cs_req(
return;
};
res.gfkihhopjdg = req.gfkihhopjdg;
res.ihoaaecihik = player.scene.entry_id != req.entry_id;
res.alggcgibmmh = req.alggcgibmmh;
res.abnfeadenmg = player.scene.entry_id != req.entry_id;
}
pub async fn on_get_scene_map_info_cs_req(
@ -65,7 +65,7 @@ pub async fn on_get_scene_map_info_cs_req(
req: &GetSceneMapInfoCsReq,
res: &mut GetSceneMapInfoScRsp,
) {
for entry_id in &req.entry_id_list {
for floor_id in &req.floor_id_list {
let mut map_info = MazeMapData {
retcode: 0,
unlocked_chest_list: vec![
@ -82,7 +82,7 @@ pub async fn on_get_scene_map_info_cs_req(
..Default::default()
},
],
entry_id: *entry_id,
floor_id: *floor_id,
..Default::default()
};
@ -91,9 +91,14 @@ pub async fn on_get_scene_map_info_cs_req(
}
let group_config = GAME_RES
.level_output_configs
.get(entry_id)
.and_then(|v| v.iter().next());
.map_default_entrance_map
.get(floor_id)
.and_then(|v| {
GAME_RES
.level_output_configs
.get(v)
.and_then(|v| v.iter().next())
});
if let Some((_, group_config)) = group_config {
for (group_id, group) in group_config.scenes.iter() {
@ -363,7 +368,7 @@ async fn load_scene(
scene_info.entity_group_list.push(SceneEntityGroupInfo {
state: 0,
group_id: 0,
fjhodibbaan: HashMap::new(),
gbnnlkibhon: HashMap::new(),
entity_list: json
.lineups
.iter()

File diff suppressed because one or more lines are too long

View File

@ -564,6 +564,8 @@ pub enum MultiPathAvatar {
MaleHarmony = 8005,
#[default]
FemaleHarmony = 8006,
MaleRememberance = 8007,
FemaleRememberance = 8008,
MarchHunt = 1224,
MarchPreservation = 1001,
Unk = 0,
@ -578,6 +580,8 @@ impl From<u32> for MultiPathAvatar {
8004 => Self::FemalePreservation,
8005 => Self::MaleHarmony,
8006 => Self::FemaleHarmony,
8007 => Self::FemaleHarmony,
8008 => Self::FemaleHarmony,
1224 => Self::MarchHunt,
1001 => Self::MarchPreservation,
_ => Self::Unk,
@ -608,6 +612,8 @@ impl MultiPathAvatar {
MultiPathAvatar::MarchHunt => MultiPathAvatarType::Mar7thRogueType,
MultiPathAvatar::MarchPreservation => MultiPathAvatarType::Mar7thKnightType,
MultiPathAvatar::Unk => MultiPathAvatarType::None,
MultiPathAvatar::MaleRememberance => MultiPathAvatarType::BoyMemoryType,
MultiPathAvatar::FemaleRememberance => MultiPathAvatarType::GirlMemoryType,
}
}
@ -619,6 +625,8 @@ impl MultiPathAvatar {
Self::FemalePreservation,
Self::MaleHarmony,
Self::FemaleHarmony,
Self::MaleRememberance,
Self::FemaleRememberance,
Self::MarchHunt,
Self::MarchPreservation,
]

View File

@ -138,6 +138,7 @@ pub struct JsonConfig {
/// `entryid` -> `P[planeId]_F[floorId]` -> `groupId`
pub level_output_configs: HashMap<u32, HashMap<String, LevelOutputConfig>>,
pub avatar_configs: HashMap<u32, AvatarConfig>,
pub map_default_entrance_map: HashMap<u32, u32>
}
pub static GAME_RES: LazyLock<JsonConfig> = LazyLock::new(|| {

View File

@ -1,21 +1,21 @@
{
"lineups": {
"0": 1220,
"1": 1222,
"2": 1304,
"3": 1309
"0": 1402,
"1": 1303,
"2": 1317,
"3": 8001
},
"position": {
"x": 64574,
"y": 1699,
"z": 258502,
"rot_y": 243401
"x": 193720,
"y": 2171,
"z": 156800,
"rot_y": 259188
},
"scene": {
"plane_id": 20332,
"floor_id": 20332001,
"entry_id": 2033201
"plane_id": 20413,
"floor_id": 20413001,
"entry_id": 2041301
},
"main_character": "FemaleHarmony",
"main_character": "MaleHarmony",
"march_type": "FemaleHarmony"
}

File diff suppressed because it is too large Load Diff

103249
res.json

File diff suppressed because it is too large Load Diff