PrismLauncher/launcher/minecraft/launch/ClaimAccount.cpp

25 lines
461 B
C++
Raw Normal View History

#include "ClaimAccount.h"
#include <launch/LaunchTask.h>
ClaimAccount::ClaimAccount(LaunchTask* parent, AuthSessionPtr session): LaunchStep(parent)
{
2018-07-15 13:51:05 +01:00
if(session->status == AuthSession::Status::PlayableOnline)
{
m_account = session->m_accountPtr;
}
}
void ClaimAccount::executeTask()
{
2018-07-15 13:51:05 +01:00
if(m_account)
{
lock.reset(new UseLock(m_account));
emitSucceeded();
}
}
void ClaimAccount::finalize()
{
2018-07-15 13:51:05 +01:00
lock.reset();
}