From abf8408911c057d8aafe90790f5d2f5de0e1d97c Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 20 Nov 2013 18:31:15 -0600 Subject: Nuke and pave the old login system Also, account list now saves profile lists. --- logic/OneSixInstance.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'logic/OneSixInstance.cpp') diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp index 5c93236b..5a83bafc 100644 --- a/logic/OneSixInstance.cpp +++ b/logic/OneSixInstance.cpp @@ -65,7 +65,7 @@ QString replaceTokensIn(QString text, QMap with) return result; } -QStringList OneSixInstance::processMinecraftArgs(LoginResponse response) +QStringList OneSixInstance::processMinecraftArgs(MojangAccountPtr account) { I_D(OneSixInstance); auto version = d->version; @@ -73,11 +73,11 @@ QStringList OneSixInstance::processMinecraftArgs(LoginResponse response) QMap token_mapping; // yggdrasil! - token_mapping["auth_username"] = response.username; - token_mapping["auth_session"] = response.session_id; - token_mapping["auth_access_token"] = response.access_token; - token_mapping["auth_player_name"] = response.player_name; - token_mapping["auth_uuid"] = response.player_id; + token_mapping["auth_username"] = account->username(); + //token_mapping["auth_session"] = response.session_id; + token_mapping["auth_access_token"] = account->accessToken(); + token_mapping["auth_player_name"] = account->currentProfile()->name(); + token_mapping["auth_uuid"] = account->currentProfile()->id(); // this is for offline?: /* @@ -102,7 +102,7 @@ QStringList OneSixInstance::processMinecraftArgs(LoginResponse response) return parts; } -MinecraftProcess *OneSixInstance::prepareForLaunch(LoginResponse response) +MinecraftProcess *OneSixInstance::prepareForLaunch(MojangAccountPtr account) { I_D(OneSixInstance); cleanupAfterRun(); @@ -169,7 +169,7 @@ MinecraftProcess *OneSixInstance::prepareForLaunch(LoginResponse response) args << classPath; } args << version->mainClass; - args.append(processMinecraftArgs(response)); + args.append(processMinecraftArgs(account)); // Set the width and height for 1.6 instances bool maximize = settings().get("LaunchMaximized").toBool(); -- cgit v1.2.3