diff options
author | megamage <none@none> | 2009-07-10 08:25:33 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-10 08:25:33 +0800 |
commit | 6976043e228b35687125e66f19933c44ebc561ba (patch) | |
tree | 4c8a8372c34bf276854c0c38e39bbe3b2c6d36b5 /src/game/ObjectMgr.h | |
parent | 474af870d71a46c02b28a713c19080af6e2f5781 (diff) |
[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
Diffstat (limited to 'src/game/ObjectMgr.h')
-rw-r--r-- | src/game/ObjectMgr.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 037ba4a78f2..4c83e584421 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -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); |