From 0c861db7a201c813530e703257f286257f39872f Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sat, 20 Nov 2021 16:22:22 +0100 Subject: NOISSUE Some happy little refactors --- launcher/minecraft/launch/ClaimAccount.cpp | 6 +++++- launcher/minecraft/launch/LauncherPartLaunch.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'launcher/minecraft/launch') diff --git a/launcher/minecraft/launch/ClaimAccount.cpp b/launcher/minecraft/launch/ClaimAccount.cpp index a1180f0a..bb4f6806 100644 --- a/launcher/minecraft/launch/ClaimAccount.cpp +++ b/launcher/minecraft/launch/ClaimAccount.cpp @@ -1,11 +1,15 @@ #include "ClaimAccount.h" #include +#include "Application.h" +#include "minecraft/auth/AccountList.h" + ClaimAccount::ClaimAccount(LaunchTask* parent, AuthSessionPtr session): LaunchStep(parent) { if(session->status == AuthSession::Status::PlayableOnline) { - m_account = session->m_accountPtr; + auto accounts = APPLICATION->accounts(); + m_account = accounts->getAccountByProfileName(session->player_name); } } diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp index ff022c40..190bbbbf 100644 --- a/launcher/minecraft/launch/LauncherPartLaunch.cpp +++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp @@ -72,7 +72,7 @@ void LauncherPartLaunch::executeTask() m_process.setDetachable(true); auto classPath = minecraftInstance->getClassPath(); - classPath.prepend(FS::PathCombine(ENV.getJarsPath(), "NewLaunch.jar")); + classPath.prepend(FS::PathCombine(ENV->getJarsPath(), "NewLaunch.jar")); auto natPath = minecraftInstance->getNativePath(); #ifdef Q_OS_WIN -- cgit