aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/auth')
-rw-r--r--launcher/minecraft/auth/AuthSession.cpp5
-rw-r--r--launcher/minecraft/auth/AuthSession.h4
-rw-r--r--launcher/minecraft/auth/Parsers.cpp2
3 files changed, 10 insertions, 1 deletions
diff --git a/launcher/minecraft/auth/AuthSession.cpp b/launcher/minecraft/auth/AuthSession.cpp
index d44f9098..6bea74a3 100644
--- a/launcher/minecraft/auth/AuthSession.cpp
+++ b/launcher/minecraft/auth/AuthSession.cpp
@@ -30,3 +30,8 @@ bool AuthSession::MakeOffline(QString offline_playername)
status = PlayableOffline;
return true;
}
+
+void AuthSession::MakeDemo() {
+ player_name = "Player";
+ demo = true;
+}
diff --git a/launcher/minecraft/auth/AuthSession.h b/launcher/minecraft/auth/AuthSession.h
index 55fbdf39..a75df506 100644
--- a/launcher/minecraft/auth/AuthSession.h
+++ b/launcher/minecraft/auth/AuthSession.h
@@ -11,6 +11,7 @@ class QNetworkAccessManager;
struct AuthSession
{
bool MakeOffline(QString offline_playername);
+ void MakeDemo();
QString serializeUserProperties();
@@ -43,6 +44,9 @@ struct AuthSession
bool auth_server_online = false;
// Did the user request online mode?
bool wants_online = true;
+
+ //Is this a demo session?
+ bool demo = false;
};
typedef std::shared_ptr<AuthSession> AuthSessionPtr;
diff --git a/launcher/minecraft/auth/Parsers.cpp b/launcher/minecraft/auth/Parsers.cpp
index 2b189fe4..ed31e934 100644
--- a/launcher/minecraft/auth/Parsers.cpp
+++ b/launcher/minecraft/auth/Parsers.cpp
@@ -227,7 +227,7 @@ bool parseMinecraftEntitlements(QByteArray & data, MinecraftEntitlement &output)
auto obj = doc.object();
output.canPlayMinecraft = false;
- output.ownsMinecraft = true;
+ output.ownsMinecraft = false;
auto itemsArray = obj.value("items").toArray();
for(auto item: itemsArray) {