fix(Core/ObjectAcessor): Fix crash caused by forced character renames (#13527)

This commit is contained in:
Skjalf 2022-10-24 12:24:23 -03:00 committed by GitHub
parent c54d56c7d0
commit e55d7cb951
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View file

@ -381,6 +381,8 @@ public:
{
target->SetName(newName);
ObjectAccessor::UpdatePlayerNameMapReference(player->GetName(), target);
if (WorldSession* session = target->GetSession())
session->KickPlayer("HandleCharacterRenameCommand GM Command renaming character");
}