feat: Add support for 4.1.5x

This commit is contained in:
amizing25
2026-03-17 21:24:16 +07:00
parent c697c799d6
commit cc389bd368
9 changed files with 101229 additions and 91043 deletions
+2 -2
View File
@@ -1,13 +1,13 @@
use super::*;
pub static BASE_AVATAR_IDS: [u32; 79] = [
pub static BASE_AVATAR_IDS: [u32; 81] = [
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, 1402, 1401, 1404, 1403, 1405, 1407, 1406,
1409, 1014, 1015, 1408, 1410, 1412, 1413, 1414, 1415, 1321, 1501, 1502, 1504,
1409, 1014, 1015, 1408, 1410, 1412, 1413, 1414, 1415, 1321, 1501, 1502, 1504,1505,1506
];
pub async fn on_get_avatar_data_cs_req(
+9 -9
View File
@@ -27,8 +27,8 @@ pub async fn on_get_friend_login_info_cs_req(
_req: &GetFriendLoginInfoCsReq,
res: &mut GetFriendLoginInfoScRsp,
) {
res.cobofagagkm = vec![SERVER_UID];
res.pkdoflgoaof = vec![SERVER_UID];
res.bhjonholeaa = vec![SERVER_UID];
res.doahbaphmbo = vec![SERVER_UID];
}
pub async fn on_get_friend_list_info_cs_req(
@@ -65,9 +65,9 @@ pub async fn on_get_private_chat_history_cs_req(
.iter()
.map(|text| ChatMessageData {
create_time: cur_time,
aeelknkiici: Some(Jdpgjoadlle {
nihajmhkobc: 1,
mhhbnffopoj: Some(jdpgjoadlle::Mhhbnffopoj::Uid(SERVER_UID)),
ngiifilphni: Some(Pkjcignoion {
ifkjohednbd: 1,
fpcdpdphkjj: Some(pkjcignoion::Fpcdpdphkjj::Uid(SERVER_UID)),
}),
message_datas: vec![MessageChatData {
message_type: 1,
@@ -285,12 +285,12 @@ fn create_send_message(
) -> RevcMsgScNotify {
RevcMsgScNotify {
chat_type,
dkdlooaaake: to,
eokimloiohi: to,
recv_message_data: Some(ChatMessageData {
create_time: cur_timestamp_ms(),
aeelknkiici: Some(Jdpgjoadlle {
nihajmhkobc: 0,
mhhbnffopoj: Some(jdpgjoadlle::Mhhbnffopoj::Uid(from)),
ngiifilphni: Some(Pkjcignoion {
ifkjohednbd: 0,
fpcdpdphkjj: Some(pkjcignoion::Fpcdpdphkjj::Uid(from)),
}),
message_datas: vec![MessageChatData {
message_type,
+12 -9
View File
@@ -42,7 +42,7 @@ pub async fn on_enter_scene_cs_req(
req: &EnterSceneCsReq,
res: &mut EnterSceneScRsp,
) {
if load_scene(session, req.entry_id, true, Some(req.teleport_id))
if load_scene(session, req.entry_id, true, Some(req.entry_id2))
.await
.is_err()
{
@@ -55,9 +55,8 @@ pub async fn on_get_scene_map_info_cs_req(
req: &GetSceneMapInfoCsReq,
res: &mut GetSceneMapInfoScRsp,
) {
for floor_id in &req.floor_id_list {
for floor_id in req.scene_identifiers.iter().map(|v| v.floor_id) {
let mut map_info = SceneMapInfo {
retcode: 0,
chest_list: vec![
ChestInfo {
chest_type: 101,
@@ -72,13 +71,13 @@ pub async fn on_get_scene_map_info_cs_req(
..Default::default()
},
],
floor_id: *floor_id,
floor_id: floor_id,
..Default::default()
};
let floor_configs = GAME_RES
.map_default_entrance_map
.get(floor_id)
.get(&floor_id)
.and_then(|v| {
GAME_RES
.level_output_configs
@@ -88,7 +87,7 @@ pub async fn on_get_scene_map_info_cs_req(
if let Some((_, floor_config)) = floor_configs {
for (group_id, group) in floor_config.scenes.iter() {
map_info.maze_group_list.push(MazeGroup {
map_info.group_list.push(MapInfoGroup {
group_id: *group_id,
..Default::default()
});
@@ -98,7 +97,7 @@ pub async fn on_get_scene_map_info_cs_req(
}
for prop in &group.props {
map_info.maze_prop_list.push(MazePropState {
map_info.map_info_prop_list.push(MapInfoProp {
group_id: prop.group_id,
state: prop.prop_state,
config_id: prop.inst_id,
@@ -114,7 +113,7 @@ pub async fn on_get_scene_map_info_cs_req(
}
map_info.lighten_section_list = floor_config.sections.clone();
map_info.floor_saved_data = floor_config.saved_values.clone();
map_info.floor_saved_value_map = floor_config.saved_values.clone();
// #TODO!
// map_info
// .chest_unlock_progress_list
@@ -275,6 +274,10 @@ async fn load_scene(
..Default::default()
}),
floor_saved_data: scene.saved_values.clone(),
scene_identifier: Some(SceneIdentifier {
floor_id,
..Default::default()
}),
..Default::default()
};
@@ -404,7 +407,7 @@ async fn load_scene(
scene_info.entity_group_list.push(SceneEntityGroupInfo {
state: 0,
group_id: 0,
ggnjmghhhmj: HashMap::with_capacity(0),
opljdfoomgf: HashMap::with_capacity(0),
entity_list: json
.lineups
.iter()