forked from endernon/JadeSR-origin-DONOTUSE
merge 2
This commit is contained in:
commit
948b7b560d
3 changed files with 4 additions and 3 deletions
|
@ -9,7 +9,7 @@ use std::fs;
|
||||||
use crate::{net::PlayerSession, util};
|
use crate::{net::PlayerSession, util};
|
||||||
|
|
||||||
pub async fn on_get_bag_cs_req(session: &PlayerSession, _: &GetBagCsReq) -> Result<()> {
|
pub async fn on_get_bag_cs_req(session: &PlayerSession, _: &GetBagCsReq) -> Result<()> {
|
||||||
let json_data = fs::read_to_string("./inventory.json").expect("Failed to read inventory.json");
|
let json_data = fs::read_to_string("PATH HERE").expect("Failed to read inventory.json");
|
||||||
let json_value: Value = serde_json::from_str(&json_data).expect("Failed to parse JSON data");
|
let json_value: Value = serde_json::from_str(&json_data).expect("Failed to parse JSON data");
|
||||||
|
|
||||||
// Extract ranks
|
// Extract ranks
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
[
|
[
|
||||||
{"tid": 23002, "rank": 3, "exp": 0, "unique_id": 57, "promotion": 6, "level": 75, "base_avatar_id": 0, "is_protected": true},
|
{"tid": 23002, "rank": 3, "exp": 0, "unique_id": 57, "promotion": 6, "level": 75, "base_avatar_id": 0, "is_protected": true},
|
||||||
{"tid": 23015, "rank": 4, "exp": 0, "unique_id": 58, "promotion": 6, "level": 80, "base_avatar_id": 0, "is_protected": true}
|
{"tid": 23015, "rank": 4, "exp": 0, "unique_id": 58, "promotion": 6, "level": 80, "base_avatar_id": 0, "is_protected": true},
|
||||||
|
{"tid": 23015, "rank": 4, "exp": 0, "unique_id": 59, "promotion": 6, "level": 79, "base_avatar_id": 0, "is_protected": true}
|
||||||
]
|
]
|
||||||
|
|
|
@ -9,7 +9,7 @@ use std::fs;
|
||||||
use crate::{net::PlayerSession, util};
|
use crate::{net::PlayerSession, util};
|
||||||
|
|
||||||
pub async fn on_get_bag_cs_req(session: &PlayerSession, _: &GetBagCsReq) -> Result<()> {
|
pub async fn on_get_bag_cs_req(session: &PlayerSession, _: &GetBagCsReq) -> Result<()> {
|
||||||
let json_data = fs::read_to_string("inventory.rs").expect("Failed to read inventory.json");
|
let json_data = fs::read_to_string("PATH HERE").expect("Failed to read inventory.json");
|
||||||
let json_value: Value = serde_json::from_str(&json_data).expect("Failed to parse JSON data");
|
let json_value: Value = serde_json::from_str(&json_data).expect("Failed to parse JSON data");
|
||||||
|
|
||||||
// Extract ranks
|
// Extract ranks
|
||||||
|
|
Loading…
Reference in a new issue