mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'fixing-character-deletion' into 'master'
Server: Fix character deletion mentioned in #1327 See merge request veloren/veloren!2818
This commit is contained in:
commit
a19f1dfc14
@ -544,6 +544,14 @@ pub fn delete_character(
|
||||
stmt.execute(&[&char_id])?;
|
||||
drop(stmt);
|
||||
|
||||
let pet_ids = get_pet_ids(char_id, transaction)?
|
||||
.iter()
|
||||
.map(|x| Value::from(*x))
|
||||
.collect::<Vec<Value>>();
|
||||
if !pet_ids.is_empty() {
|
||||
delete_pets(transaction, char_id, Rc::new(pet_ids))?;
|
||||
}
|
||||
|
||||
// Delete character
|
||||
let mut stmt = transaction.prepare_cached(
|
||||
"
|
||||
@ -598,14 +606,6 @@ pub fn delete_character(
|
||||
)));
|
||||
}
|
||||
|
||||
let pet_ids = get_pet_ids(char_id, transaction)?
|
||||
.iter()
|
||||
.map(|x| Value::from(*x))
|
||||
.collect::<Vec<Value>>();
|
||||
if !pet_ids.is_empty() {
|
||||
delete_pets(transaction, char_id, Rc::new(pet_ids))?;
|
||||
}
|
||||
|
||||
load_character_list(requesting_player_uuid, transaction)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user