mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
[7323] Character Customize should not force rename. Author: aerione_alt
--HG-- branch : trunk
This commit is contained in:
@@ -1300,12 +1300,16 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if(objmgr.GetPlayerGUIDByName(newname)) // character with this name already exist
|
||||
// character with this name already exist
|
||||
if(uint64 newguid = objmgr.GetPlayerGUIDByName(newname))
|
||||
{
|
||||
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
|
||||
data << uint8(CHAR_CREATE_NAME_IN_USE);
|
||||
SendPacket( &data );
|
||||
return;
|
||||
if(newguid != guid)
|
||||
{
|
||||
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
|
||||
data << uint8(CHAR_CREATE_NAME_IN_USE);
|
||||
SendPacket( &data );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
CharacterDatabase.escape_string(newname);
|
||||
|
||||
Reference in New Issue
Block a user