diff options
author | kaelima <kaelima@live.se> | 2012-05-06 02:37:31 +0200 |
---|---|---|
committer | kaelima <kaelima@live.se> | 2012-05-06 02:37:31 +0200 |
commit | f34e650fe0f6a2a6c5ade1e71064cd5575a3caf5 (patch) | |
tree | 24fba6e8f911aa783ae7a2a370b562c8b03dde05 /src/server/game/Accounts/AccountMgr.cpp | |
parent | 072bab69512bb91d13905ad422ab90c6ef629299 (diff) |
Core/Accounts: Delete all bans related to an account when it has been deleted.
Diffstat (limited to 'src/server/game/Accounts/AccountMgr.cpp')
-rwxr-xr-x | src/server/game/Accounts/AccountMgr.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 9963ade54f9..8076f800356 100755 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -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; |