Skip to content

Commit

Permalink
Fix frame
Browse files Browse the repository at this point in the history
  • Loading branch information
Xerxes-2 committed Apr 28, 2024
1 parent 93f1995 commit d6691d2
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 98 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "majsoul_max_rs"
version = "0.3.7"
version = "0.3.8"
edition = "2021"

[lib]
Expand Down
172 changes: 77 additions & 95 deletions liqi_config/settings.mod.json
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
{
"mainChar": 200001,
"mainChar": 200005,
"charSkin": {
"200087": 408701,
"200040": 404001,
"200067": 406701,
"200090": 409001,
"200070": 407001,
"200052": 405201,
"200028": 402801,
"200079": 407901,
"200060": 406001,
"200016": 401601,
"200068": 406801,
"200051": 405101,
"200043": 404301,
"200019": 401901,
"200082": 408201,
"200005": 400501,
"200065": 406501,
"200085": 408501,
"200020": 402001,
"200029": 402901,
"200012": 401201,
"200022": 402201,
"200042": 404201,
"200014": 401401,
"200058": 405801,
"200039": 403901,
"200064": 406401,
"200001": 400101,
"200061": 406101,
"200071": 407101,
"200056": 405601,
"200084": 408401,
"200054": 405401,
"200021": 402101,
"200055": 405501,
"200030": 403001,
"200006": 400601,
"200063": 406301,
"200041": 404101,
"200077": 407701,
"200013": 401301,
"200020": 402001,
"200046": 404601,
"200081": 408101,
"200042": 404201,
"200043": 404301,
"200025": 402501,
"200068": 406801,
"200012": 401201,
"200050": 405001,
"200023": 402301,
"200022": 402201,
"200078": 407801,
"200072": 407201,
"200054": 405401,
"200057": 405701,
"200005": 400506,
"200069": 406901,
"200017": 401701,
"200021": 402101,
"200011": 401101,
"200047": 404701,
"200032": 403201,
"200031": 403101,
"200063": 406301,
"200044": 404401,
"200004": 400401,
"200010": 401001,
"200033": 403301,
"200002": 400201,
"200049": 404901,
"200037": 403701,
"200045": 404501,
"200038": 403801,
"200083": 408301,
"200088": 408801,
"200081": 408101,
"200034": 403401,
"200035": 403501,
"200087": 408701,
"200008": 400801,
"200040": 404001,
"200002": 400201,
"200074": 407401,
"200026": 402601,
"200018": 401801,
"200032": 403201,
"200059": 405901,
"200014": 401401,
"200027": 402701,
"200057": 405701,
"200066": 406601,
"200025": 402501,
"200069": 406901,
"200003": 400301,
"200008": 400801,
"200015": 401501,
"200089": 408901,
"200033": 403301,
"200013": 401301,
"200071": 407101,
"200007": 400701,
"200086": 408601,
"200055": 405501,
"200009": 400901,
"200078": 407801,
"200080": 408001,
"200003": 400301,
"200070": 407001,
"200073": 407301,
"200058": 405801,
"200076": 407601,
"200036": 403601,
"200024": 402401,
"200060": 406001,
"200053": 405301,
"200086": 408601,
"200062": 406201,
"200052": 405201,
"200056": 405601,
"200041": 404101,
"200066": 406601,
"200026": 402601,
"200036": 403601,
"200075": 407501,
"200031": 403101,
"200018": 401801,
"200038": 403801,
"200048": 404801,
"200015": 401501,
"200030": 403001,
"200035": 403501,
"200062": 406201,
"200039": 403901,
"200089": 408901
"200045": 404501,
"200067": 406701,
"200004": 400401,
"200009": 400901,
"200076": 407601,
"200083": 408301,
"200037": 403701,
"200082": 408201,
"200085": 408501,
"200024": 402401,
"200065": 406501,
"200023": 402301,
"200080": 408001,
"200084": 408401,
"200051": 405101,
"200090": 409001,
"200046": 404601,
"200059": 405901,
"200061": 406101,
"200088": 408801,
"200079": 407901,
"200019": 401901,
"200011": 401101,
"200077": 407701,
"200049": 404901,
"200016": 401601,
"200028": 402801,
"200047": 404701,
"200010": 401001
},
"nickname": "",
"starCharacter": [],
Expand All @@ -101,26 +101,8 @@
"viewsPresets": [
[
{
"slot": 0,
"item_id": 305001,
"type": 0,
"item_id_list": []
},
{
"slot": 1,
"item_id": 305007,
"type": 0,
"item_id_list": []
},
{
"slot": 2,
"item_id": 305010,
"type": 0,
"item_id_list": []
},
{
"slot": 3,
"item_id": 305011,
"slot": 5,
"item_id": 305500,
"type": 0,
"item_id_list": []
}
Expand Down
5 changes: 4 additions & 1 deletion src/modder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ impl Modder {
for p in &mut msg.players {
self.change_player(p).await;
}
info!("Respond authGame: {:?}", msg);
modified_data = Some(msg.encode_to_vec());
}
".lq.Lobby.fetchTitleList" => {
Expand Down Expand Up @@ -398,6 +397,10 @@ impl Modder {
[MOD_SETTINGS.read().await.preset_index as usize]
.clone(),
);
// avatar_frame id is view.item_id which view.slot is 5
if let Some(frame) = p.views.iter().find(|v| v.slot == 5) {
p.avatar_frame = frame.item_id;
}
}
}
if MOD_SETTINGS.read().await.show_server() {
Expand Down

0 comments on commit d6691d2

Please sign in to comment.