summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/launch/ClaimAccount.cpp
blob: 71670b4fe69281491bc6d40d9fad73b07eae888a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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();
}