mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 07:06:23 +00:00
refactor(Core/ObjectMgr): Handle Profanity & Reserved Names in load (#19259)
* refactor(Core/ObjectMgr): Handle Profanity & Reserved Names in load * closes https://github.com/azerothcore/azerothcore-wotlk/issues/18556 * Update ObjectMgr.cpp * Update ObjectMgr.cpp * I swear I am not drunk * We already check all of these * fix build * Forgot we dont send the responsecode in senderrormessage * last commit I swear
This commit is contained in:
@@ -4980,8 +4980,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
|
||||
m_name = fields[2].Get<std::string>();
|
||||
|
||||
// check name limitations
|
||||
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS ||
|
||||
(AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && (sObjectMgr->IsReservedName(m_name) || sObjectMgr->IsProfanityName(m_name))))
|
||||
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS || AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()))
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, uint16(AT_LOGIN_RENAME));
|
||||
|
||||
Reference in New Issue
Block a user