allow attacker_team_id to be empty, PS4 bug

This commit is contained in:
41666 2022-12-09 17:42:17 -05:00
parent 26f0ce1a1a
commit b91019e8b4

View file

@ -23,11 +23,7 @@ lazy_static! {
} }
async fn send_init(tx: futures::channel::mpsc::UnboundedSender<Message>) { async fn send_init(tx: futures::channel::mpsc::UnboundedSender<Message>) {
let worlds_raw = env::var("WORLDS").unwrap_or_default(); let worlds_raw = env::var("WORLDS").unwrap_or("all".to_string());
if worlds_raw == "" {
println!("WORLDS not set");
return;
}
let worlds: Vec<&str> = worlds_raw.split(',').collect(); let worlds: Vec<&str> = worlds_raw.split(',').collect();
// Send setup message // Send setup message
@ -261,7 +257,7 @@ struct Event {
world_id: i32, world_id: i32,
character_id: String, character_id: String,
attacker_character_id: String, attacker_character_id: String,
#[serde(deserialize_with = "deserialize_number_from_string")] #[serde(default, deserialize_with = "deserialize_number_from_string")]
attacker_team_id: i32, attacker_team_id: i32,
#[serde(deserialize_with = "deserialize_number_from_string")] #[serde(deserialize_with = "deserialize_number_from_string")]
team_id: i32, team_id: i32,