Reset star lives when all completed
All checks were successful
Build docker images / build (push) Successful in 56m5s

This commit is contained in:
Ethan O'Brien 2024-07-21 18:12:34 -05:00
parent 8a0c8c1728
commit 29128094e7

View file

@ -200,6 +200,14 @@ pub fn event_live(req: HttpRequest, body: String, skipped: bool) -> Option<JsonV
}
}
if all_clear == 1 {
switch_music(&mut event, 1);
switch_music(&mut event, 2);
switch_music(&mut event, 3);
switch_music(&mut event, 4);
switch_music(&mut event, 5);
}
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();
@ -228,7 +236,6 @@ pub fn event_live(req: HttpRequest, body: String, skipped: bool) -> Option<JsonV
"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();