feat: Add support for 4.0.5x
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
target/
|
||||
Cargo.lock
|
||||
proto/StarRail.proto
|
||||
/prebuild
|
||||
/assets
|
||||
.vscode
|
||||
.prebuilt
|
||||
+4658
-3992
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
use super::*;
|
||||
|
||||
pub static BASE_AVATAR_IDS: [u32; 78] = [
|
||||
pub static BASE_AVATAR_IDS: [u32; 79] = [
|
||||
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,
|
||||
1409, 1014, 1015, 1408, 1410, 1412, 1413, 1414, 1415, 1321, 1501, 1502, 1504,
|
||||
];
|
||||
|
||||
pub async fn on_get_avatar_data_cs_req(
|
||||
|
||||
@@ -22,10 +22,10 @@ pub async fn on_start_cocoon_stage_cs_req(
|
||||
res.battle_info = Some(battle_info);
|
||||
}
|
||||
|
||||
pub async fn on_start_quick_cocoon_stage_cs_req(
|
||||
pub async fn on_quick_start_cocoon_stage_cs_req(
|
||||
session: &mut PlayerSession,
|
||||
req: &StartQuickCocoonStageCsReq,
|
||||
res: &mut StartQuickCocoonStageScRsp,
|
||||
req: &QuickStartCocoonStageCsReq,
|
||||
res: &mut QuickStartCocoonStageScRsp,
|
||||
) {
|
||||
let mut battle_info = create_battle_info(session, 0, 0).await;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::path::Path;
|
||||
|
||||
use common::structs::MultiPathAvatar;
|
||||
use proto::{chat_message_extend_data::ExtendType, dabbfcoafjg::Eedaadmacap};
|
||||
use proto::chat_data::ExtendType;
|
||||
use std::path::Path;
|
||||
use tokio::fs;
|
||||
|
||||
use crate::{
|
||||
@@ -28,8 +27,8 @@ pub async fn on_get_friend_login_info_cs_req(
|
||||
_req: &GetFriendLoginInfoCsReq,
|
||||
res: &mut GetFriendLoginInfoScRsp,
|
||||
) {
|
||||
res.ckjhinjopgk = vec![SERVER_UID];
|
||||
res.dfommfkiami = vec![SERVER_UID];
|
||||
res.cobofagagkm = vec![SERVER_UID];
|
||||
res.pkdoflgoaof = vec![SERVER_UID];
|
||||
}
|
||||
|
||||
pub async fn on_get_friend_list_info_cs_req(
|
||||
@@ -65,23 +64,17 @@ pub async fn on_get_private_chat_history_cs_req(
|
||||
res.chat_message_list = SERVER_CHAT_HISTORY
|
||||
.iter()
|
||||
.map(|text| ChatMessageData {
|
||||
message_type: MsgType::CustomText.into(),
|
||||
create_time: cur_time,
|
||||
content: String::from(*text),
|
||||
sender_id: SERVER_UID,
|
||||
chat_message_extend_data: Some(ChatMessageExtendData {
|
||||
extend_type: Some(ExtendType::MessageText(String::from(*text))),
|
||||
aeelknkiici: Some(Jdpgjoadlle {
|
||||
nihajmhkobc: 1,
|
||||
mhhbnffopoj: Some(jdpgjoadlle::Mhhbnffopoj::Uid(SERVER_UID)),
|
||||
}),
|
||||
bofjjhikijl: Some(Dabbfcoafjg {
|
||||
eedaadmacap: Some(Eedaadmacap::Uid(SERVER_UID)),
|
||||
kcpbmeabmph: 0,
|
||||
}),
|
||||
dgmnkagbcem: Some(Gpcnkeaofea {
|
||||
chat_message_extend_data: Some(ChatMessageExtendData {
|
||||
extend_type: Some(ExtendType::MessageText(String::from(*text))),
|
||||
}),
|
||||
message_type: MsgType::CustomText.into(),
|
||||
message_datas: vec![MessageChatData {
|
||||
message_type: 1,
|
||||
chat_data: Some(ChatData {
|
||||
extend_type: Some(ExtendType::MessageText(text.to_string())),
|
||||
}),
|
||||
}],
|
||||
..Default::default()
|
||||
})
|
||||
.collect();
|
||||
@@ -100,9 +93,9 @@ pub async fn on_send_msg_cs_req(
|
||||
};
|
||||
|
||||
let msg = body
|
||||
.dgmnkagbcem
|
||||
.message_datas
|
||||
.as_ref()
|
||||
.and_then(|x| x.chat_message_extend_data.as_ref())
|
||||
.and_then(|x| x.chat_data.as_ref())
|
||||
.and_then(|x| x.extend_type.as_ref())
|
||||
.and_then(|x| match x {
|
||||
ExtendType::MessageText(s) => Some(s.as_str()),
|
||||
@@ -118,9 +111,11 @@ pub async fn on_send_msg_cs_req(
|
||||
.send(create_send_message(
|
||||
25,
|
||||
SERVER_UID,
|
||||
body.message_type,
|
||||
body.message_datas
|
||||
.as_ref()
|
||||
.map(|v| v.message_type)
|
||||
.unwrap_or_default(),
|
||||
body.chat_type,
|
||||
body.chat_message_extend_data.clone(),
|
||||
String::from("Inventory Synced"),
|
||||
))
|
||||
.await
|
||||
@@ -151,9 +146,11 @@ pub async fn on_send_msg_cs_req(
|
||||
.send(create_send_message(
|
||||
25,
|
||||
SERVER_UID,
|
||||
body.message_type,
|
||||
body.message_datas
|
||||
.as_ref()
|
||||
.map(|v| v.message_type)
|
||||
.unwrap_or_default(),
|
||||
body.chat_type,
|
||||
body.chat_message_extend_data.clone(),
|
||||
format!("Success change mc to {mc:#?}"),
|
||||
))
|
||||
.await
|
||||
@@ -188,9 +185,11 @@ pub async fn on_send_msg_cs_req(
|
||||
.send(create_send_message(
|
||||
25,
|
||||
SERVER_UID,
|
||||
body.message_type,
|
||||
body.message_datas
|
||||
.as_ref()
|
||||
.map(|v| v.message_type)
|
||||
.unwrap_or_default(),
|
||||
body.chat_type,
|
||||
body.chat_message_extend_data.clone(),
|
||||
format!("Success change march to {march_type:#?}"),
|
||||
))
|
||||
.await
|
||||
@@ -204,9 +203,11 @@ pub async fn on_send_msg_cs_req(
|
||||
.send(create_send_message(
|
||||
25,
|
||||
SERVER_UID,
|
||||
body.message_type,
|
||||
body.message_datas
|
||||
.as_ref()
|
||||
.map(|v| v.message_type)
|
||||
.unwrap_or_default(),
|
||||
body.chat_type,
|
||||
body.chat_message_extend_data.clone(),
|
||||
format!("File {path:?} does not exist!"),
|
||||
))
|
||||
.await
|
||||
@@ -220,9 +221,11 @@ pub async fn on_send_msg_cs_req(
|
||||
.send(create_send_message(
|
||||
25,
|
||||
SERVER_UID,
|
||||
body.message_type,
|
||||
body.message_datas
|
||||
.as_ref()
|
||||
.map(|v| v.message_type)
|
||||
.unwrap_or_default(),
|
||||
body.chat_type,
|
||||
body.chat_message_extend_data.clone(),
|
||||
format!("Failed to read file: {err:?}"),
|
||||
))
|
||||
.await
|
||||
@@ -248,9 +251,11 @@ pub async fn on_send_msg_cs_req(
|
||||
.send(create_send_message(
|
||||
25,
|
||||
SERVER_UID,
|
||||
body.message_type,
|
||||
body.message_datas
|
||||
.as_ref()
|
||||
.map(|v| v.message_type)
|
||||
.unwrap_or_default(),
|
||||
body.chat_type,
|
||||
body.chat_message_extend_data.clone(),
|
||||
format!("Executed {path:?}"),
|
||||
))
|
||||
.await
|
||||
@@ -276,35 +281,23 @@ fn create_send_message(
|
||||
from: u32,
|
||||
message_type: i32,
|
||||
chat_type: i32,
|
||||
extend_data: Option<ChatMessageExtendData>,
|
||||
msg: String,
|
||||
) -> RevcMsgScNotify {
|
||||
RevcMsgScNotify {
|
||||
message_type,
|
||||
message_text: msg.clone(),
|
||||
source_uid: from,
|
||||
target_uid: to,
|
||||
chat_type,
|
||||
chat_message_extend_data: extend_data,
|
||||
mjaocldhphm: 0,
|
||||
revc_message_data: Some(ChatMessageData {
|
||||
message_type: MsgType::CustomText.into(),
|
||||
dkdlooaaake: to,
|
||||
recv_message_data: Some(ChatMessageData {
|
||||
create_time: cur_timestamp_ms(),
|
||||
content: msg.clone(),
|
||||
sender_id: SERVER_UID,
|
||||
chat_message_extend_data: Some(ChatMessageExtendData {
|
||||
extend_type: Some(ExtendType::MessageText(msg.clone())),
|
||||
aeelknkiici: Some(Jdpgjoadlle {
|
||||
nihajmhkobc: 0,
|
||||
mhhbnffopoj: Some(jdpgjoadlle::Mhhbnffopoj::Uid(from)),
|
||||
}),
|
||||
bofjjhikijl: Some(Dabbfcoafjg {
|
||||
eedaadmacap: Some(Eedaadmacap::Uid(SERVER_UID)),
|
||||
kcpbmeabmph: 0,
|
||||
}),
|
||||
dgmnkagbcem: Some(Gpcnkeaofea {
|
||||
chat_message_extend_data: Some(ChatMessageExtendData {
|
||||
extend_type: Some(ExtendType::MessageText(msg.clone())),
|
||||
}),
|
||||
message_type: MsgType::CustomText.into(),
|
||||
message_datas: vec![MessageChatData {
|
||||
message_type,
|
||||
chat_data: Some(ChatData {
|
||||
extend_type: Some(chat_data::ExtendType::MessageText(msg)),
|
||||
}),
|
||||
}],
|
||||
..Default::default()
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ pub async fn on_get_big_data_all_recommend_cs_req(
|
||||
res.recommend_type = Some(RecommendType::AvatarRelic(BigDataRecommendAvatarRelic {
|
||||
recomended_relic_info_list: BASE_AVATAR_IDS
|
||||
.into_iter()
|
||||
.map(|avatar_id| RecommendedRelicInfo {
|
||||
.map(|avatar_id| BigDataAvatarRelicRecommend {
|
||||
avatar_id,
|
||||
..Default::default()
|
||||
})
|
||||
|
||||
@@ -404,7 +404,7 @@ async fn load_scene(
|
||||
scene_info.entity_group_list.push(SceneEntityGroupInfo {
|
||||
state: 0,
|
||||
group_id: 0,
|
||||
jjeeocobckc: HashMap::with_capacity(0),
|
||||
ggnjmghhhmj: HashMap::with_capacity(0),
|
||||
entity_list: json
|
||||
.lineups
|
||||
.iter()
|
||||
|
||||
@@ -208,7 +208,7 @@ trait_handler! {
|
||||
StartCocoonStage;
|
||||
PveBattleResult;
|
||||
SceneCastSkill;
|
||||
StartQuickCocoonStage;
|
||||
QuickStartCocoonStage;
|
||||
|
||||
// Teleport
|
||||
GetEnteredScene;
|
||||
|
||||
+12
-12
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"lineups": {
|
||||
"0": 1015,
|
||||
"1": 1306,
|
||||
"2": 1403,
|
||||
"3": 1414
|
||||
"0": 1414,
|
||||
"1": 1410,
|
||||
"2": 0,
|
||||
"3": 0
|
||||
},
|
||||
"position": {
|
||||
"x": -26968,
|
||||
"y": 78953,
|
||||
"z": 14457,
|
||||
"rot_y": 11858
|
||||
"x": 422379,
|
||||
"y": 25904,
|
||||
"z": -308312,
|
||||
"rot_y": 0
|
||||
},
|
||||
"scene": {
|
||||
"plane_id": 20411,
|
||||
"floor_id": 20411001,
|
||||
"entry_id": 2041101
|
||||
"plane_id": 20511,
|
||||
"floor_id": 20511001,
|
||||
"entry_id": 2051101
|
||||
},
|
||||
"main_character": "FemaleRememberance",
|
||||
"main_character": "FemaleRemembrance",
|
||||
"march_type": "MarchHunt"
|
||||
}
|
||||
+39051
File diff suppressed because it is too large
Load Diff
+52089
-48870
File diff suppressed because it is too large
Load Diff
@@ -46,5 +46,17 @@
|
||||
"ex_resource_url": "",
|
||||
"lua_url": "",
|
||||
"ifix_url": ""
|
||||
},
|
||||
"OSBETAWin4.0.51X": {
|
||||
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14026982_55a517a26691_89300298bf2b2e",
|
||||
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14036546_28a134460a9a_5805431f75f0ff",
|
||||
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14028456_7088b08fd431_59194837d90977",
|
||||
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
|
||||
},
|
||||
"OSBETAWin4.0.51": {
|
||||
"asset_bundle_url": "",
|
||||
"ex_resource_url": "",
|
||||
"lua_url": "",
|
||||
"ifix_url": ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user