Files
PrismLauncher/launcher/minecraft/launch/ClaimAccount.cpp
Octol1ttle a9f3be9f45 refactor: LaunchController
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2026-02-18 00:19:30 +05:00

27 lines
594 B
C++

#include "ClaimAccount.h"
#include <launch/LaunchTask.h>
#include "Application.h"
#include "minecraft/auth/AccountList.h"
ClaimAccount::ClaimAccount(LaunchTask* parent, AuthSessionPtr session) : LaunchStep(parent)
{
if (session->launchMode == LaunchMode::Normal) {
auto accounts = APPLICATION->accounts();
m_account = accounts->getAccountByProfileName(session->player_name);
}
}
void ClaimAccount::executeTask()
{
if (m_account) {
lock.reset(new UseLock(m_account.get()));
}
emitSucceeded();
}
void ClaimAccount::finalize()
{
lock.reset();
}