Merge branch 'develop' into develop

This commit is contained in:
Sebastían
2021-07-13 19:31:59 -05:00
committed by GitHub
7 changed files with 128 additions and 13 deletions

View File

@@ -896,7 +896,8 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt
}
else
{
process->appendStep(new Update(pptr, Net::Mode::Offline));
process->appendStep(new Update(pptr, Net::Mode::Online));
// TODO: Separate "cracked" logins (offline from auth servers) from genuine offline logins (no internet)
}
// if there are any jar mods

View File

@@ -29,3 +29,17 @@ bool AuthSession::MakeOffline(QString offline_playername)
status = PlayableOffline;
return true;
}
bool AuthSession::MakeCracked(QString offline_playername)
{
session = "-";
// Filling session with dummy data
client_token = "ff64ff64ff64ff64ff64ff64ff64ff64";
access_token = "ff64ff64ff64ff64ff64ff64ff64ff64";
// TODO: Fetch actual UUID's from Mojang API so they match with real ones
uuid = QString(QCryptographicHash::hash(offline_playername.toLocal8Bit(), QCryptographicHash::Md5).toHex());
player_name = offline_playername;
status = PlayableOffline;
return true;
}

View File

@@ -17,6 +17,7 @@ struct User
struct MULTIMC_LOGIC_EXPORT AuthSession
{
bool MakeOffline(QString offline_playername);
bool MakeCracked(QString offline_playername);
QString serializeUserProperties();