refactor(Core/Account): Move account flag logic from AccountMgr to WorldSession (#22558)

This commit is contained in:
Kitzunu
2025-07-27 08:54:16 +02:00
committed by GitHub
parent 24d1a4808f
commit 3f46e05d36
7 changed files with 38 additions and 46 deletions

View File

@@ -698,8 +698,6 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSes
LoginDatabase.Execute(stmt);
AccountMgr::ValidateAccountFlags(account.Id, account.Flags, account.Security);
// At this point, we can safely hook a successful login
sScriptMgr->OnAccountLogin(account.Id);
@@ -707,7 +705,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSes
sScriptMgr->OnLastIpUpdate(account.Id, address);
_worldSession = new WorldSession(account.Id, std::move(authSession->Account), shared_from_this(), account.Security,
_worldSession = new WorldSession(account.Id, std::move(authSession->Account), account.Flags, shared_from_this(), account.Security,
account.Expansion, account.MuteTime, account.Locale, account.Recruiter, account.IsRectuiter, account.Security ? true : false, account.TotalTime);
_worldSession->ReadAddonsInfo(authSession->AddonInfo);
@@ -718,6 +716,8 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSes
_worldSession->InitWarden(account.SessionKey, account.OS);
}
_worldSession->ValidateAccountFlags();
sWorldSessionMgr->AddSession(_worldSession);
AsyncRead();