mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 03:14:49 +00:00
25 lines
461 B
C++
25 lines
461 B
C++
#include "ClaimAccount.h"
|
|
#include <launch/LaunchTask.h>
|
|
|
|
ClaimAccount::ClaimAccount(LaunchTask* parent, AuthSessionPtr session): LaunchStep(parent)
|
|
{
|
|
if(session->status == AuthSession::Status::PlayableOnline)
|
|
{
|
|
m_account = session->m_accountPtr;
|
|
}
|
|
}
|
|
|
|
void ClaimAccount::executeTask()
|
|
{
|
|
if(m_account)
|
|
{
|
|
lock.reset(new UseLock(m_account));
|
|
emitSucceeded();
|
|
}
|
|
}
|
|
|
|
void ClaimAccount::finalize()
|
|
{
|
|
lock.reset();
|
|
}
|