Core/Player: Fix old issue with creating a character if using declined names. Thx to someone, whose name was lost on old forums

This commit is contained in:
tobmaps
2011-05-10 18:52:28 +07:00
parent f3a12453a0
commit bd6750b4d0
4 changed files with 16 additions and 6 deletions
@@ -1150,7 +1150,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
}
}
if (!ObjectMgr::CheckDeclinedNames(GetMainPartOfName(wname, 0), declinedname))
if (!ObjectMgr::CheckDeclinedNames(wname, declinedname))
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
@@ -628,7 +628,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
std::wstring wname;
Utf8toWStr(name, wname);
if (!ObjectMgr::CheckDeclinedNames(GetMainPartOfName(wname, 0), declinedname))
if (!ObjectMgr::CheckDeclinedNames(wname, declinedname))
{
SendPetNameInvalid(PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME, name, &declinedname);
return;