Rollback name check

This commit is contained in:
Yunfan Li
2024-07-03 20:01:14 +08:00
parent cc5adebbe4
commit 2a2e2ec445

View File

@@ -4980,7 +4980,8 @@ 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()))
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS ||
(AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && (sObjectMgr->IsReservedName(m_name) || sObjectMgr->IsProfanityName(m_name))))
{
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
stmt->SetData(0, uint16(AT_LOGIN_RENAME));