mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 03:37:45 +00:00
Fix deleting characters in the lobby not working
This statement broke at some point, and the size of the custom IPC was wrong too.
This commit is contained in:
parent
58eb154ae4
commit
61f0ccdacd
2 changed files with 16 additions and 5 deletions
|
@ -20,7 +20,7 @@ impl ReadWriteIpcSegment for CustomIpcSegment {
|
|||
CustomIpcType::NameIsAvailableResponse => 1,
|
||||
CustomIpcType::RequestCharacterList => 4,
|
||||
CustomIpcType::RequestCharacterListRepsonse => 1 + (1184 * 8),
|
||||
CustomIpcType::DeleteCharacter => 4,
|
||||
CustomIpcType::DeleteCharacter => 8,
|
||||
CustomIpcType::CharacterDeleted => 1,
|
||||
CustomIpcType::ImportCharacter => 132,
|
||||
CustomIpcType::RemakeCharacter => 1024 + 8,
|
||||
|
|
|
@ -478,10 +478,21 @@ impl WorldDatabase {
|
|||
pub fn delete_character(&self, content_id: u64) {
|
||||
let connection = self.connection.lock().unwrap();
|
||||
|
||||
let mut stmt = connection
|
||||
.prepare("DELETE FROM character_data WHERE content_id = ?1; DELETE FROM characters WHERE content_id = ?1;")
|
||||
.unwrap();
|
||||
stmt.execute((content_id,)).unwrap();
|
||||
// delete data
|
||||
{
|
||||
let mut stmt = connection
|
||||
.prepare("DELETE FROM character_data WHERE content_id = ?1")
|
||||
.unwrap();
|
||||
stmt.execute((content_id,)).unwrap();
|
||||
}
|
||||
|
||||
// delete char
|
||||
{
|
||||
let mut stmt = connection
|
||||
.prepare("DELETE FROM characters WHERE content_id = ?1")
|
||||
.unwrap();
|
||||
stmt.execute((content_id,)).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the remake mode for a character
|
||||
|
|
Loading…
Add table
Reference in a new issue