[8126] Improvemets in player/pet/charter name checks.

* Implement new config options for minimal player/pet/charter name length (2 by default)
* Better error reporting at problems in names.
* Add check from max pet/charter name length (same as for player names at client side)
This commit is contained in:
VladimirMangos 2009-07-05 19:58:26 +04:00
parent 60fe792866
commit 715470a898
12 changed files with 114 additions and 48 deletions

View file

@ -401,9 +401,10 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data )
pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo() )
return;
if(!ObjectMgr::IsValidPetName(name))
PetNameInvalidReason res = ObjectMgr::CheckPetName(name);
if(res != PET_NAME_SUCCESS)
{
SendPetNameInvalid(PET_NAME_INVALID, name, NULL);
SendPetNameInvalid(res, name, NULL);
return;
}