Core/Players: Fixed deleting characters, remove CharacterNameData only after the character is deleted, not before
This commit is contained in:
@@ -5013,10 +5013,13 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
}
|
||||
default:
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
|
||||
return;
|
||||
}
|
||||
|
||||
if (updateRealmChars)
|
||||
sWorld->UpdateRealmCharCount(accountId);
|
||||
|
||||
sWorld->DeleteCharacterNameData(GUID_LOPART(guid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -738,7 +738,6 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData)
|
||||
std::string IP_str = GetRemoteAddress();
|
||||
sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d, IP: %s deleted character: %s, GUID: %u, Level: %u", accountId, IP_str.c_str(), name.c_str(), GUID_LOPART(guid), level);
|
||||
sScriptMgr->OnPlayerDelete(guid);
|
||||
sWorld->DeleteCharacterNameData(GUID_LOPART(guid));
|
||||
|
||||
if (sLog->ShouldLog(LOG_FILTER_PLAYER_DUMP, LOG_LEVEL_INFO)) // optimize GetPlayerDump call
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user