summaryrefslogtreecommitdiffstats
path: root/logic/OneSixInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-11-24 18:41:35 +0100
committerPetr Mrázek <peterix@gmail.com>2013-11-24 18:41:35 +0100
commit82225a21e1b7f1671a42c1511032c59ecda0503f (patch)
treebed0663df62a7210da6928c50a6ba99aed53cd1f /logic/OneSixInstance.cpp
parentca297fca79a7b1b96e41ba5abed4956af9383c16 (diff)
parent75e7932607bdd84d2867765eb6f07dcec95ee193 (diff)
downloadMultiMC-82225a21e1b7f1671a42c1511032c59ecda0503f.tar
MultiMC-82225a21e1b7f1671a42c1511032c59ecda0503f.tar.gz
MultiMC-82225a21e1b7f1671a42c1511032c59ecda0503f.tar.lz
MultiMC-82225a21e1b7f1671a42c1511032c59ecda0503f.tar.xz
MultiMC-82225a21e1b7f1671a42c1511032c59ecda0503f.zip
Merge branch 'feature_yggdrasil' into develop
Conflicts: gui/MainWindow.cpp logic/OneSixInstance.h Fix missing session id functionality for legacy and old onesix.
Diffstat (limited to 'logic/OneSixInstance.cpp')
-rw-r--r--logic/OneSixInstance.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp
index 7764d225..a947b7c0 100644
--- a/logic/OneSixInstance.cpp
+++ b/logic/OneSixInstance.cpp
@@ -66,7 +66,7 @@ QString replaceTokensIn(QString text, QMap<QString, QString> with)
return result;
}
-QStringList OneSixInstance::processMinecraftArgs(LoginResponse response)
+QStringList OneSixInstance::processMinecraftArgs(MojangAccountPtr account)
{
I_D(OneSixInstance);
auto version = d->version;
@@ -74,11 +74,11 @@ QStringList OneSixInstance::processMinecraftArgs(LoginResponse response)
QMap<QString, QString> 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"] = account->sessionId();
+ 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?:
/*
@@ -105,7 +105,7 @@ QStringList OneSixInstance::processMinecraftArgs(LoginResponse response)
return parts;
}
-MinecraftProcess *OneSixInstance::prepareForLaunch(LoginResponse response)
+MinecraftProcess *OneSixInstance::prepareForLaunch(MojangAccountPtr account)
{
I_D(OneSixInstance);
cleanupAfterRun();
@@ -177,7 +177,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();