mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core\Characters: Consecutive letters validation for CheckPlayerName
Closes #7694
This commit is contained in:
@@ -7301,6 +7301,11 @@ uint8 ObjectMgr::CheckPlayerName(const std::string& name, bool create)
|
||||
if (!isValidString(wname, strictMask, false, create))
|
||||
return CHAR_NAME_MIXED_LANGUAGES;
|
||||
|
||||
wstrToLower(wname);
|
||||
for (size_t i = 2; i < wname.size(); ++i)
|
||||
if (wname[i] == wname[i-1] && wname[i] == wname[i-2])
|
||||
return CHAR_NAME_THREE_CONSECUTIVE;
|
||||
|
||||
return CHAR_NAME_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user