[8126] Improvemets in player/pet/charter name checks. Author: VladimirMangos
* 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)
--HG--
branch : trunk
This commit is contained in:
@@ -312,8 +312,10 @@ struct GM_Ticket
|
||||
typedef std::list<GM_Ticket*> GmTicketList;
|
||||
SkillRangeType GetSkillRangeType(SkillLineEntry const *pSkill, bool racial);
|
||||
|
||||
#define MAX_PLAYER_NAME 12 // max allowed by client name length
|
||||
#define MAX_PLAYER_NAME 12 // max allowed by client name length
|
||||
#define MAX_INTERNAL_PLAYER_NAME 15 // max server internal player name length ( > MAX_PLAYER_NAME for support declined names )
|
||||
#define MAX_PET_NAME 12 // max allowed by client name length
|
||||
#define MAX_CHARTER_NAME 24 // max allowed by client name length
|
||||
|
||||
bool normalizePlayerName(std::string& name);
|
||||
|
||||
@@ -759,9 +761,9 @@ class ObjectMgr
|
||||
bool IsReservedName(const std::string& name) const;
|
||||
|
||||
// name with valid structure and symbols
|
||||
static bool IsValidName( const std::string& name, bool create = false );
|
||||
static uint8 CheckPlayerName( const std::string& name, bool create = false );
|
||||
static PetNameInvalidReason CheckPetName( const std::string& name );
|
||||
static bool IsValidCharterName( const std::string& name );
|
||||
static bool IsValidPetName( const std::string& name );
|
||||
|
||||
static bool CheckDeclinedNames(std::wstring mainpart, DeclinedName const& names);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user