Created
August 19, 2011 02:32
-
-
Save fredimachado/1155894 to your computer and use it in GitHub Desktop.
Update realmcharacters table after deleting a char
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp | |
index c022d81..2afcd86 100755 | |
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp | |
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp | |
@@ -752,6 +752,8 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data) | |
Player::DeleteFromDB(guid, GetAccountId()); | |
+ LoginDatabase.PExecute("UPDATE realmcharacters SET numchars = numchars - 1 WHERE acctid = '%d' AND realmid = '%d'", GetAccountId(), realmID); | |
+ | |
WorldPacket data(SMSG_CHAR_DELETE, 1); | |
data << (uint8)CHAR_DELETE_SUCCESS; | |
SendPacket(&data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment