feat(Core): CanAccountCreateCharacter hook (#13020)

This commit is contained in:
ZhengPeiRu21
2022-09-18 21:58:18 -06:00
committed by GitHub
parent f658c8ea0c
commit 7dc598f364
3 changed files with 25 additions and 0 deletions

View File

@@ -432,6 +432,11 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
std::function<void(PreparedQueryResult)> finalizeCharacterCreation = [this, createInfo](PreparedQueryResult result)
{
if (!sScriptMgr->CanAccountCreateCharacter(createInfo, GetAccountId()))
{
SendCharCreate(CHAR_CREATE_DISABLED);
return;
}
bool haveSameRace = false;
uint32 heroicReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
bool hasHeroicReqLevel = (heroicReqLevel == 0);