refactor(Core/Packet): Guild (#9411)

* Core/Packet: Guild

* Winfi
This commit is contained in:
IntelligentQuantum
2021-12-11 12:30:06 +03:30
committed by GitHub
parent fad214efe0
commit 3591f69662
14 changed files with 1800 additions and 920 deletions

View File

@@ -7649,7 +7649,7 @@ void ObjectMgr::LoadReservedPlayersNames()
LOG_INFO("server.loading", " ");
}
bool ObjectMgr::IsReservedName(const std::string& name) const
bool ObjectMgr::IsReservedName(std::string_view name) const
{
// pussywizard
if (name.size() >= 2 && (name[name.size() - 2] == 'G' || name[name.size() - 2] == 'g') && (name[name.size() - 1] == 'M' || name[name.size() - 1] == 'm'))
@@ -7757,7 +7757,7 @@ bool isValidString(std::wstring wstr, uint32 strictMask, bool numericOrSpace, bo
return false;
}
uint8 ObjectMgr::CheckPlayerName(const std::string& name, bool create)
uint8 ObjectMgr::CheckPlayerName(std::string_view name, bool create)
{
std::wstring wname;
if (!Utf8toWStr(name, wname))
@@ -7782,7 +7782,7 @@ uint8 ObjectMgr::CheckPlayerName(const std::string& name, bool create)
return CHAR_NAME_SUCCESS;
}
bool ObjectMgr::IsValidCharterName(const std::string& name)
bool ObjectMgr::IsValidCharterName(std::string_view name)
{
std::wstring wname;
if (!Utf8toWStr(name, wname))
@@ -7814,7 +7814,7 @@ bool ObjectMgr::IsValidChannelName(const std::string& name)
return isValidString(wname, strictMask, true);
}
PetNameInvalidReason ObjectMgr::CheckPetName(const std::string& name)
PetNameInvalidReason ObjectMgr::CheckPetName(std::string_view name)
{
std::wstring wname;
if (!Utf8toWStr(name, wname))