Scripts/Commands: .account set seclevel command will update security level for online session (#29600)

This commit is contained in:
Mykhailo Redko
2024-01-22 14:58:31 +02:00
committed by GitHub
parent d16596dc59
commit 75016bf4da
3 changed files with 4 additions and 3 deletions

View File

@@ -788,7 +788,8 @@ public:
return false;
}
sAccountMgr->UpdateAccountAccess(nullptr, accountId, securityLevel, realmID);
WorldSession const* session = sWorld->FindSession(accountId);
sAccountMgr->UpdateAccountAccess(session ? session->GetRBACData() : nullptr, accountId, securityLevel, realmID);
handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, accountName->c_str(), securityLevel);
return true;