mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
feat(Core/DBC): Implement NamesProfanity and NamesReserved DBC (#14956)
This commit is contained in:
@@ -356,12 +356,6 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(createInfo->Name))
|
||||
{
|
||||
SendCharCreate(CHAR_NAME_RESERVED);
|
||||
return;
|
||||
}
|
||||
|
||||
// speedup check for heroic class disabled case
|
||||
uint32 heroic_free_slots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
|
||||
if (heroic_free_slots == 0 && AccountMgr::IsPlayerAccount(GetSecurity()) && createInfo->Class == CLASS_DEATH_KNIGHT)
|
||||
@@ -1351,13 +1345,6 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
// check name limitations
|
||||
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(renameInfo->Name))
|
||||
{
|
||||
SendCharRename(CHAR_NAME_RESERVED, renameInfo.get());
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure that the character belongs to the current account, that rename at login is enabled
|
||||
// and that there is no character with the desired new name
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_FREE_NAME);
|
||||
@@ -1698,13 +1685,6 @@ void WorldSession::HandleCharCustomizeCallback(std::shared_ptr<CharacterCustomiz
|
||||
return;
|
||||
}
|
||||
|
||||
// check name limitations
|
||||
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(customizeInfo->Name))
|
||||
{
|
||||
SendCharCustomize(CHAR_NAME_RESERVED, customizeInfo.get());
|
||||
return;
|
||||
}
|
||||
|
||||
// character with this name already exist
|
||||
if (ObjectGuid newguid = sCharacterCache->GetCharacterGuidByName(customizeInfo->Name))
|
||||
{
|
||||
@@ -2083,13 +2063,6 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
return;
|
||||
}
|
||||
|
||||
// check name limitations
|
||||
if (AccountMgr::IsPlayerAccount(GetSecurity()) && sObjectMgr->IsReservedName(factionChangeInfo->Name))
|
||||
{
|
||||
SendCharFactionChange(CHAR_NAME_RESERVED, factionChangeInfo.get());
|
||||
return;
|
||||
}
|
||||
|
||||
// character with this name already exist
|
||||
if (ObjectGuid newguid = sCharacterCache->GetCharacterGuidByName(factionChangeInfo->Name))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user