feat(Core/Character): Implement profanity_name (#15156)

This commit is contained in:
Kitzunu
2023-03-04 21:43:14 +01:00
committed by GitHub
parent 6e61f38454
commit 9eb4b3a336
16 changed files with 139 additions and 12 deletions

View File

@@ -1337,6 +1337,11 @@ public:
[[nodiscard]] bool IsReservedName(std::string_view name) const;
void AddReservedPlayerName(std::string const& name);
// profanity names
void LoadProfanityPlayersNames();
[[nodiscard]] bool IsProfanityName(std::string_view name) const;
void AddProfanityPlayerName(std::string const& name);
// name with valid structure and symbols
static uint8 CheckPlayerName(std::string_view name, bool create = false);
static PetNameInvalidReason CheckPetName(std::string_view name);
@@ -1506,6 +1511,10 @@ private:
typedef std::set<std::wstring> ReservedNamesContainer;
ReservedNamesContainer _reservedNamesStore;
//character profanity names
typedef std::set<std::wstring> ProfanityNamesContainer;
ReservedNamesContainer _profanityNamesStore;
GameTeleContainer _gameTeleStore;
ScriptNameContainer _scriptNamesStore;