[7323] Character Customize should not force rename. Author: aerione_alt

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-22 17:26:03 -06:00
parent 588fe25b20
commit ed5b3780ed
2 changed files with 10 additions and 6 deletions

View File

@@ -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);