MultiMC5/api/logic/minecraft/launch/ClaimAccount.cpp
2018-07-15 14:51:05 +02:00

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();
}