Compare commits

...

2 commits

Author SHA1 Message Date
58ca6b01b7 Some more (Messy) star event code
Some checks are pending
Build docker images / build (push) Waiting to run
Rust Build / build-x86_64 (push) Waiting to run
Rust Build / build-aarch64 (aarch64, ubuntu-latest) (push) Waiting to run
Rust Build / build-windows (push) Waiting to run
2024-07-21 15:14:05 -05:00
3a83ae3ec9 Delete logs 2024-07-21 10:59:07 -05:00
13 changed files with 121 additions and 17106 deletions

File diff suppressed because one or more lines are too long

BIN
logs/ew

Binary file not shown.

BIN
logs/ew-

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,142 +0,0 @@
Server started: http://127.0.0.1:8080
Request: /api/start/assetHash
req: {"asset_version":"4c921d2443335e574a82e04ec9ea243c","environment":"release"}
POST: https://api.app.lovelive-sif2.bushimo.jp/api/start/assetHash
accept: */*
user-agent: UnityPlayer/2021.3.14f1 (UnityWebRequest/1.0, libcurl/7.84.0-DEV)
content-type: application/json
aoharu-sid: 01711638213
aoharu-os: Android OS 9 / API-28 (SP1A.210812.016/G998BXXU4BULF)
aoharu-ignore-gamelib: 0
4eddbbe3: E2jAmwNa3Af63xOqTfJ32nDIr4h7vBFj+xO+Fp8PjKeave/Y3kSwWhfmBLCKtd2DjqyucTjfLO+3ZHcrdz1OWg==
aoharu-asset-hash: 67f8f261c16b3cca63e520a25aad6c1c
retry-flag: NONE
retry-count: 0
aoharu-platform: Android
a6573cbe: ulHrlY0iHzkwQI1ztbSjjDfP3MpiQqlmEAxPX1vFsmQRPcVSh3pyyAfLFKDZeUwKXVS+Ln77blomPlvu8WHg8A==
50f02981: 0
aoharu-user-id: 0
aoharu-is-authorized: FALSE
content-length: 128
aoharu-timestamp: 1711638213
aoharu-os-version: 9
aoharu-crash-reporter: ccYdXpP1Rz6zc1LGUHlxGs
aoharu-device: samsung SM-G998B
aoharu-client-version: 1.11.2
f19c72ba: d17fc736c893e1bac7370e92a73d756b
aoharu-asset-version: 4c921d2443335e574a82e04ec9ea243c
aoharu-environment: release
x-unity-version: 2021.3.14f1
resp: {"code":0,"server_time":1711638214,"data":{"asset_hash":"67f8f261c16b3cca63e520a25aad6c1c"}}
Request: /api/start/assetHash
req: {"asset_version":"4c921d2443335e574a82e04ec9ea243c","environment":"release"}
POST: https://api.app.lovelive-sif2.bushimo.jp/api/start/assetHash
retry-flag: NONE
retry-count: 0
aoharu-client-version: 1.11.2
aoharu-platform: Android
aoharu-user-id: 0
aoharu-timestamp: 1711638235
aoharu-ignore-gamelib: 0
content-type: application/json
aoharu-crash-reporter: dGHSxhq6R8isjzovoCt0Gn
aoharu-os-version: 9
aoharu-sid: 01711638235
aoharu-is-authorized: FALSE
accept: */*
aoharu-asset-version: 4c921d2443335e574a82e04ec9ea243c
aoharu-asset-hash: 67f8f261c16b3cca63e520a25aad6c1c
x-unity-version: 2021.3.14f1
f19c72ba: d17fc736c893e1bac7370e92a73d756b
50f02981: 0
aoharu-os: Android OS 9 / API-28 (SP1A.210812.016/G998BXXU4BULF)
user-agent: UnityPlayer/2021.3.14f1 (UnityWebRequest/1.0, libcurl/7.84.0-DEV)
aoharu-environment: release
content-length: 128
aoharu-device: samsung SM-G998B
resp: {"code":0,"server_time":1711638236,"data":{"asset_hash":"67f8f261c16b3cca63e520a25aad6c1c"}}
Request: /api/start
req: {"asset_version":"4c921d2443335e574a82e04ec9ea243c","environment":"release"}
POST: https://api.app.lovelive-sif2.bushimo.jp/api/start
aoharu-sid: 2542420100533811711638245
retry-count: 0
aoharu-environment: release
content-type: application/json
accept: */*
aoharu-platform: Android
aoharu-os-version: 9
aoharu-timestamp: 1711638245
aoharu-is-authorized: TRUE
f19c72ba: d17fc736c893e1bac7370e92a73d756b
aoharu-asset-version: 4c921d2443335e574a82e04ec9ea243c
retry-flag: NONE
aoharu-device: samsung SM-G998B
aoharu-client-version: 1.11.2
aoharu-ignore-gamelib: 0
user-agent: UnityPlayer/2021.3.14f1 (UnityWebRequest/1.0, libcurl/7.84.0-DEV)
aoharu-os: Android OS 9 / API-28 (SP1A.210812.016/G998BXXU4BULF)
aoharu-asset-hash: 67f8f261c16b3cca63e520a25aad6c1c
a6573cbe: nKqyXVK4DpbHyeosgIG9pVKjlsxjw7KPfzIoFcdmqLeF1QRlO1rrZVASIEeO1pVZfuYunCP1xWC3mNWKTmYCzg==
aoharu-user-id: 254242010053381
aoharu-crash-reporter: dGHSxhq6R8isjzovoCt0Gn
x-unity-version: 2021.3.14f1
content-length: 128
50f02981: 0
resp: {"code":0,"server_time":1711638247,"data":{"asset_hash":"67f8f261c16b3cca63e520a25aad6c1c","token":"4e543313064835b02f86063939a3ae33b57e8ef0"}}
Request: /api/user
GET: https://api.app.lovelive-sif2.bushimo.jp/api/user
aoharu-platform: Android
content-type: application/json
aoharu-client-version: 1.11.2
user-agent: UnityPlayer/2021.3.14f1 (UnityWebRequest/1.0, libcurl/7.84.0-DEV)
aoharu-asset-hash: 67f8f261c16b3cca63e520a25aad6c1c
f19c72ba: d17fc736c893e1bac7370e92a73d756b
aoharu-timestamp: 1711638254
aoharu-os: Android OS 9 / API-28 (SP1A.210812.016/G998BXXU4BULF)
a6573cbe: t5fCURTyeCquoiNp0QpVy4Qr0ULYQErARlh9kZMhPYaPPYhfoViJcEEEKTOcGI+seNM4z50E/iSPgJlGEtjLsQ==
aoharu-environment: release
aoharu-os-version: 9
retry-count: 0
accept: */*
aoharu-user-id: 254242010053381
x-unity-version: 2021.3.14f1
4eddbbe3: nKqyXVK4DpbHyeosgIG9pVKjlsxjw7KPfzIoFcdmqLeF1QRlO1rrZVASIEeO1pVZfuYunCP1xWC3mNWKTmYCzg==
aoharu-crash-reporter: dGHSxhq6R8isjzovoCt0Gn
aoharu-device: samsung SM-G998B
50f02981: 0
retry-flag: NONE
aoharu-sid: 2542420100533811711638254
aoharu-ignore-gamelib: 0
aoharu-asset-version: 4c921d2443335e574a82e04ec9ea243c
aoharu-is-authorized: TRUE
resp: {"code":0,"server_time":1711638255,"data":{"user":{"id":254242010053381,"name":"\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u4e2d","comment":"\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\uff01","exp":0,"main_deck_slot":1,"favorite_master_card_id":0,"favorite_card_evolve":0,"guest_smile_master_card_id":0,"guest_cool_master_card_id":0,"guest_pure_master_card_id":0,"friend_request_disabled":1,"master_title_ids":[0,0],"profile_settings":[1,2,3,4,5,6,7],"sif_user_id":0,"ss_user_id":0,"birthday":"","last_login_time":1711638246},"gem":{"total":0,"charge":0,"free":0},"card_list":[],"deck_list":[{"slot":1,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":2,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":3,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":4,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":5,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":6,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":7,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":8,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":9,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":10,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]},{"slot":100,"leader_role":0,"main_card_ids":[0,0,0,0,0,0,0,0,0]}],"stamina":{"stamina":100,"last_updated_time":1711638255},"character_list":[],"tutorial_step":0,"item_list":[],"point_list":[],"story_list":[],"live_list":[],"live_mission_list":[],"master_music_ids":[1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1014,1015,1016,1017,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1035,1037,1038,1039,1040,1041,1042,1044,1045,1046,1047,1048,1049,1050,1054,1055,1057,1058,1059,1060,1061,1062,1063,1064,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1123,1124,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2142,2143,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2156,2157,2158,2159,2160,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2179,2180,2181,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074,3075,3076,3077,3078,3079,3080,3081,3082,3083,3084,3085,3086,3087,3088,3089,3090,3091,3092,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,3109,3110,3111,3112,3113,3114,3115,3116,3117,3118,3119,3121,3122,3123,3124,3125,3126,3127,3128,3129,3134,3135,3136,3137,3138,3139,3140,3141,3142,3143,3144,3145,3146,3147,3148,3149,3150,3151,3152,3153,3154,3155,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4059,4060,4061,4064,4065,4066,4067,4068,4069,4071,4073,4074,4075,4076,4077,4078,4079,4080,4081,4082,4083,4084,4085,4086,4087,4088,4089,4090,4091,4092,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4110,4111,4112,4113,4114,4115,4116,4117,4118,4119,5001,5002,5003,5004,5005,5006,5007,5008,5009,5010,5011,5012,5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027,5028,5029,5030,5031,6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,9001,9002,9003,9004,9005,9006,9007,9008,9009,9010,9011,9012,9013,9014,9015,9016,9017,9018,9019,9020,9021,9022,9023,9024,9025,9026,9027,9028,9029,9030,9031,9032],"event_point_list":[],"start_time":null,"master_title_ids":[],"lottery_list":[],"shop_list":[],"function_lock_list":[],"movie":null,"subscription_list":[],"membership":[]}}
Server started: http://127.0.0.1:8080
Request: /api/start/assetHash
req: {"asset_version":"4c921d2443335e574a82e04ec9ea243c","environment":"release"}
POST: https://api.app.lovelive-sif2.bushimo.jp/api/start/assetHash
content-length: 128
aoharu-timestamp: 1711639248
accept: */*
aoharu-user-id: 0
aoharu-os-version: 9
aoharu-asset-version: 4c921d2443335e574a82e04ec9ea243c
aoharu-asset-hash: 67f8f261c16b3cca63e520a25aad6c1c
retry-count: 0
x-unity-version: 2021.3.14f1
retry-flag: NONE
a6573cbe: DEPZiwdyDnZLkO2C9N7jqC/tWUqD443GcAf9hRf6O+S1tgAszUGiTCImxgSujsc/AmIEiHDZgm6Z8KEf+2W99g==
aoharu-os: Android OS 9 / API-28 (SP1A.210812.016/G998BXXU4BULF)
aoharu-client-version: 1.11.2
aoharu-is-authorized: TRUE
aoharu-sid: 01711639248
aoharu-environment: release
aoharu-ignore-gamelib: 0
50f02981: 0
aoharu-crash-reporter: fDgyNjzeQtipmkgxL1FVUe
aoharu-device: samsung SM-G998B
content-type: application/json
4eddbbe3: kg8ZdUDip0+CdmbdxPMRRPkg0Hv4n/XAg6gRUI9Z6b1SdSCXFTKJbIxMHKCQTClD5HS/J2tlxBQCdQxxOAsyrg==
user-agent: UnityPlayer/2021.3.14f1 (UnityWebRequest/1.0, libcurl/7.84.0-DEV)
f19c72ba: d17fc736c893e1bac7370e92a73d756b
aoharu-platform: Android
resp: {"code":0,"server_time":1711639249,"data":{"asset_hash":"67f8f261c16b3cca63e520a25aad6c1c"}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -82,8 +82,8 @@ async fn api_req(req: HttpRequest, body: String) -> HttpResponse {
"/api/event/ranking" => event::ranking(req, body),
"/api/event_star_live/change_target_music" => event::change_target_music(req, body),
"/api/event_star_live/start" => live::event_start(req, body),
"/api/event_star_live/end" => live::event_end(req, body),
//"/api/event_star_live/skip" => live::event_skip(req, body),
"/api/event_star_live/end" => event::event_end(req, body),
"/api/event_star_live/skip" => event::event_skip(req, body),
"/api/live/start" => live::start(req, body),
"/api/live/end" => live::end(req, body),
"/api/live/skip" => live::skip(req, body),

View file

@ -1,4 +1,4 @@
use json::{JsonValue, object};
use json::{JsonValue, object, array};
use actix_web::HttpRequest;
use rand::Rng;
@ -6,16 +6,28 @@ use crate::encryption;
use crate::include_file;
use crate::router::{userdata, global, databases};
// I believe(?) this is all?
const STAR_EVENT_IDS: [u32; 3] = [127, 135, 139];
fn get_event_data(key: &str, event_id: u32) -> JsonValue {
let mut event = userdata::get_acc_event(key);
let is_star_event = STAR_EVENT_IDS.contains(&event_id);
println!("is_star_event: {}, {}", is_star_event, event_id);
if event[event_id.to_string()].is_empty() {
event[event_id.to_string()] = json::parse(&include_file!("src/router/userdata/new_user_event.json")).unwrap();
if is_star_event {
let mut ev = event[event_id.to_string()].clone();
init_star_event(&mut ev);
save_event_data(key, event_id, ev);
event = userdata::get_acc_event(key);
}
}
if is_star_event && event["star_last_reset"][event_id.to_string()].as_u64().unwrap_or(0) <= global::timestamp_since_midnight() {
event["star_last_reset"][event_id.to_string()] = (global::timestamp_since_midnight() + (24 * 60 * 60)).into();
event[event_id.to_string()]["star_event"]["star_event_bonus_daily_count"] = 0.into();
}
event[event_id.to_string()].clone()
}
@ -149,6 +161,94 @@ pub fn ranking(_req: HttpRequest, _body: String) -> Option<JsonValue> {
})
}
const POINTS_PER_LEVEL: i64 = 55;
fn get_star_rank(points: i64) -> i64 {
((points - (points % POINTS_PER_LEVEL)) / POINTS_PER_LEVEL) + 1
}
pub fn event_live(req: HttpRequest, body: String, skipped: bool) -> Option<JsonValue> {
let key = global::get_login(req.headers(), &body);
let body_temp = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
let event_id = if skipped {
body_temp["master_event_id"].as_u32().unwrap()
} else {
crate::router::live::get_end_live_event_id(&key, &body_temp)?
};
let mut resp = crate::router::live::live_end(&req, &body, skipped);
let key = global::get_login(req.headers(), &body);
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
let mut event = get_event_data(&key, event_id);
let live_id = databases::LIVE_LIST[body["master_live_id"].to_string()]["masterMusicId"].as_i64().unwrap();
let raw_score = body["live_score"]["score"].as_u64().unwrap_or(resp["high_score"].as_u64().unwrap());
let bonus_event = event["star_event"]["star_event_bonus_daily_count"].as_u64().unwrap();
let bonus_play_times = event["star_event"]["star_event_play_times_bonus_count"].as_u64().unwrap();
let score = raw_score + (raw_score * bonus_event) + (raw_score * bonus_play_times);
let mut all_clear = 1;
let mut cleared = false;
for data in event["star_event"]["star_music_list"].members_mut() {
if data["master_music_id"] == live_id && score >= data["goal_score"].as_u64().unwrap() {
data["is_cleared"] = 1.into();
cleared = true;
}
if data["is_cleared"] == 0 {
all_clear = 0;
}
}
if cleared {
event["star_event"]["star_event_bonus_daily_count"] = (event["star_event"]["star_event_bonus_daily_count"].as_u32().unwrap() + 1).into();
event["star_event"]["star_event_bonus_count"] = (event["star_event"]["star_event_bonus_count"].as_u32().unwrap() + 1).into();
event["star_event"]["star_event_play_times_bonus_count"] = (event["star_event"]["star_event_play_times_bonus_count"].as_u32().unwrap() + 1).into();
event["point_ranking"]["point"] = (event["point_ranking"]["point"].as_i64().unwrap_or(0) + 31).into();
event["star_event"]["star_level"] = get_star_rank(event["point_ranking"]["point"].as_i64().unwrap()).into();
}
resp["star_event_bonus_list"] = object!{
"star_event_bonus": bonus_event,
"star_event_bonus_score": bonus_event * raw_score,
"star_play_times_bonus": bonus_play_times,
"star_play_times_bonus_score": bonus_play_times * raw_score,
"card_bonus": 0,
"card_bonus_score": 0
};
resp["event_point_list"] = array![];
resp["event_ranking_data"] = object! {
"event_point_rank": event["point_ranking"]["point"].clone(),
"next_reward_rank_point": 0,
"event_score_rank": 0,
"next_reward_rank_score": 0,
"next_reward_rank_level": 0
};
resp["is_star_all_clear"] = all_clear.into();
resp["star_level"] = event["star_event"]["star_level"].clone();
resp["music_data"] = event["star_event"]["star_music_list"].clone();
resp["total_score"] = score.into();
resp["star_event"] = event["star_event"].clone();
save_event_data(&key, event_id, event);
println!("{}", resp);
Some(resp)
}
pub fn event_end(req: HttpRequest, body: String) -> Option<JsonValue> {
event_live(req, body, false)
}
pub fn event_skip(req: HttpRequest, body: String) -> Option<JsonValue> {
event_live(req, body, true)
}
// Start request structs
// These start with CJsonSendParam in the source

View file

@ -201,6 +201,17 @@ fn get_end_live_deck_id(login_token: &str, body: &JsonValue) -> Option<i32> {
Some(rv)
}
pub fn get_end_live_event_id(login_token: &str, body: &JsonValue) -> Option<u32> {
let server_data = userdata::get_server_data(login_token);
if server_data["last_live_started"].is_null() {
return None;
}
let index = server_data["last_live_started"].members().position(|r| r["master_live_id"] == body["master_live_id"])?;
let rv = server_data["last_live_started"][index]["master_event_id"].as_u32()?;
Some(rv)
}
fn live_retire(login_token: &str, body: &JsonValue) {
let mut server_data = userdata::get_server_data(login_token);
check_for_stale_data(&mut server_data, body["master_live_id"].as_i64().unwrap());
@ -228,8 +239,8 @@ pub fn start(req: HttpRequest, body: String) -> Option<JsonValue> {
Some(array![])
}
pub fn event_start(_req: HttpRequest, _body: String) -> Option<JsonValue> {
Some(array![])
pub fn event_start(req: HttpRequest, body: String) -> Option<JsonValue> {
start(req, body)
}
pub fn continuee(req: HttpRequest, body: String) -> Option<JsonValue> {
@ -515,7 +526,7 @@ fn get_live_character_list(lp_used: i32, deck_id: i32, user: &JsonValue, mission
rv
}
fn live_end(req: &HttpRequest, body: &str, skipped: bool) -> JsonValue {
pub fn live_end(req: &HttpRequest, body: &str, skipped: bool) -> JsonValue {
let key = global::get_login(req.headers(), body);
let body = json::parse(&encryption::decrypt_packet(body).unwrap()).unwrap();
let user2 = userdata::get_acc_home(&key);
@ -644,52 +655,3 @@ pub fn end(req: HttpRequest, body: String) -> Option<JsonValue> {
pub fn skip(req: HttpRequest, body: String) -> Option<JsonValue> {
Some(live_end(&req, &body, true))
}
pub fn event_end(req: HttpRequest, body: String) -> Option<JsonValue> {
let mut resp = live_end(&req, &body, false);
let key = global::get_login(req.headers(), &body);
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
let mut event = userdata::get_acc_event(&key);
let live_id = databases::LIVE_LIST[body["master_live_id"].to_string()]["masterMusicId"].as_i64().unwrap();
let mut all_clear = 1;
for data in event["event_data"]["star_event"]["star_music_list"].members_mut() {
if data["master_music_id"].as_i64().unwrap() == live_id {
data["is_cleared"] = 1.into();
}
if !data["is_cleared"].as_i32().unwrap() == 0 {
all_clear = 0;
}
}
resp["event_point_list"] = array![];
resp["event_ranking_data"] = object!{
"event_point_rank": event["event_data"]["point_ranking"]["point"].clone(),
"next_reward_rank_point": 0,
"event_score_rank": 0,
"next_reward_rank_score": 0,
"next_reward_rank_level": 0
};
resp["star_level"] = event["event_data"]["star_event"]["star_level"].clone();
resp["music_data"] = event["event_data"]["star_event"]["star_music_list"].clone();
resp["is_star_all_clear"] = all_clear.into();
resp["star_event_bonus_list"] = object!{
"star_event_bonus": 0,
"star_event_bonus_score": 0,
"star_play_times_bonus": 0,
"star_play_times_bonus_score": 0,
"card_bonus": 0,
"card_bonus_score": 0
};
resp["total_score"] = body["live_score"]["score"].clone();
resp["star_event"] = object!{
"star_event_bonus_daily_count": event["event_data"]["point_ranking"]["star_event_bonus_daily_count"].clone(),
"star_event_bonus_count": event["event_data"]["point_ranking"]["star_event_bonus_count"].clone(),
"star_event_play_times_bonus_count": event["event_data"]["point_ranking"]["star_event_play_times_bonus_count"].clone()
};
userdata::save_acc_event(&key, event);
Some(resp)
}