mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-24 12:32:42 +00:00
base patch
This commit is contained in:
@@ -821,7 +821,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
|
||||
|
||||
@@ -24,6 +24,12 @@ bool AuthSession::MakeOffline(QString offline_playername)
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -36,6 +36,26 @@ void LaunchController::login()
|
||||
{
|
||||
JavaCommon::checkJVMArgs(m_instance->settings()->get("JvmArgs").toString(), m_parentWidget);
|
||||
|
||||
// Mojang account login bypass
|
||||
QString usedname = "Player";
|
||||
QString name = QInputDialog::getText(m_parentWidget, tr("Player name"),
|
||||
tr("Choose your offline mode player name."),
|
||||
QLineEdit::Normal, "Player", &ok);
|
||||
if (!ok)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (name.length())
|
||||
{
|
||||
usedname = name;
|
||||
}
|
||||
m_session = std::make_shared<AuthSession>();
|
||||
m_session->MakeOffline(usedname);
|
||||
|
||||
launchInstance();
|
||||
|
||||
// Original login code
|
||||
/*
|
||||
// Find an account to use.
|
||||
std::shared_ptr<MojangAccountList> accounts = MMC->accounts();
|
||||
MojangAccountPtr account = accounts->activeAccount();
|
||||
@@ -182,7 +202,7 @@ void LaunchController::login()
|
||||
}
|
||||
}
|
||||
}
|
||||
emitFailed(tr("Failed to launch."));
|
||||
emitFailed(tr("Failed to launch."));*/
|
||||
}
|
||||
|
||||
void LaunchController::launchInstance()
|
||||
|
||||
Reference in New Issue
Block a user