mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[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:
parent
60fe792866
commit
715470a898
12 changed files with 114 additions and 48 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue