mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07: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
|
|
@ -14043,7 +14043,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
m_name = fields[3].GetCppString();
|
||||
|
||||
// check name limitations
|
||||
if(!ObjectMgr::IsValidName(m_name) || (GetSession()->GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(m_name)))
|
||||
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS ||
|
||||
GetSession()->GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(m_name))
|
||||
{
|
||||
delete result;
|
||||
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE guid ='%u'", uint32(AT_LOGIN_RENAME),guid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue