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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 0 deletions

View file

@ -81,3 +81,18 @@ void ScriptMgr::OnFailedPasswordChange(uint32 accountId)
script->OnFailedPasswordChange(accountId);
});
}
bool ScriptMgr::CanAccountCreateCharacter(std::shared_ptr<CharacterCreateInfo> createInfo, uint32 accountId)
{
auto ret = IsValidBoolScript<AccountScript>([&](AccountScript* script)
{
return !script->CanAccountCreateCharacter(createInfo, accountId);
});
if (ret && *ret)
{
return false;
}
return true;
}