diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-03-26 16:56:57 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-03-27 22:35:06 +0200 |
commit | f032e32133023ed8396fc2b6ead7eadc2816a25b (patch) | |
tree | 10ce52261bf06dd9f000896b4e993fb45cd7e3fc /logic/minecraft/VersionFile.cpp | |
parent | d587720010036e3335e321f192449808a75e958b (diff) | |
download | MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar.gz MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar.lz MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.tar.xz MultiMC-f032e32133023ed8396fc2b6ead7eadc2816a25b.zip |
NOISSUE finalize support for new mojang version format
Diffstat (limited to 'logic/minecraft/VersionFile.cpp')
-rw-r--r-- | logic/minecraft/VersionFile.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/logic/minecraft/VersionFile.cpp b/logic/minecraft/VersionFile.cpp index 451c3c8b..573c4cb4 100644 --- a/logic/minecraft/VersionFile.cpp +++ b/logic/minecraft/VersionFile.cpp @@ -25,14 +25,14 @@ bool VersionFile::hasJarMods() void VersionFile::applyTo(MinecraftProfile *profile) { auto theirVersion = profile->getMinecraftVersion(); - if (!theirVersion.isNull() && !mcVersion.isNull()) + if (!theirVersion.isNull() && !dependsOnMinecraftVersion.isNull()) { - if (QRegExp(mcVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1) + if (QRegExp(dependsOnMinecraftVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1) { - throw MinecraftVersionMismatch(fileId, mcVersion, theirVersion); + throw MinecraftVersionMismatch(fileId, dependsOnMinecraftVersion, theirVersion); } } - profile->applyMinecraftVersion(id); + profile->applyMinecraftVersion(minecraftVersion); profile->applyMainClass(mainClass); profile->applyAppletClass(appletClass); profile->applyMinecraftArguments(minecraftArguments); @@ -51,4 +51,10 @@ void VersionFile::applyTo(MinecraftProfile *profile) profile->applyLibrary(library); } profile->applyProblemSeverity(getProblemSeverity()); + auto iter = mojangDownloads.begin(); + while(iter != mojangDownloads.end()) + { + profile->applyMojangDownload(iter.key(), iter.value()); + iter++; + } } |