Core/Accounts: Delete all bans related to an account when it has been deleted.
This commit is contained in:
@@ -91,10 +91,15 @@ AccountOpResult DeleteAccount(uint32 accountId)
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_TUTORIALS);
|
||||
stmt->setUInt32(0, accountId);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ACCOUNT_DATA);
|
||||
stmt->setUInt32(0, accountId);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_BAN);
|
||||
stmt->setUInt32(0, accountId);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
SQLTransaction trans = LoginDatabase.BeginTransaction();
|
||||
|
||||
stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT);
|
||||
@@ -109,6 +114,10 @@ AccountOpResult DeleteAccount(uint32 accountId)
|
||||
stmt->setUInt32(0, accountId);
|
||||
trans->Append(stmt);
|
||||
|
||||
stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT_BANNED);
|
||||
stmt->setUInt32(0, accountId);
|
||||
trans->Append(stmt);
|
||||
|
||||
LoginDatabase.CommitTransaction(trans);
|
||||
|
||||
return AOR_OK;
|
||||
|
||||
Reference in New Issue
Block a user