|
@@ -110,12 +110,20 @@ void GraphicsPatch::install()
|
|
|
installLoadscreens();
|
|
|
|
|
|
foreach (QString db_name, QStringList({"image", "texture"})) {
|
|
|
+ if (!Settings::getValue("DatabaseNeedInstall/" + db_name).toBool()) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
++elapsed_patches_to_install_;
|
|
|
QMetaObject::invokeMethod(lotro_mgr_, "installPatch", Qt::QueuedConnection,
|
|
|
Q_ARG(QString, getPatchName() + "_" + db_name),
|
|
|
Q_ARG(QString, Settings::getValue("PatchDatabases/" + db_name + "/path").toString())
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ if (elapsed_patches_to_install_ == 0) {
|
|
|
+ emit operationFinished(E_INSTALL, this);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void GraphicsPatch::activate()
|
|
@@ -182,14 +190,14 @@ void GraphicsPatch::onLotroDatManagerOperationFinished(QString operation_name, Q
|
|
|
}
|
|
|
|
|
|
if (operation_name.contains("installPatch")) {
|
|
|
- QString db_name = args[0].toString().split('_').at(1);
|
|
|
- qDebug() << "DATABASE NAME: " << db_name;
|
|
|
-
|
|
|
if (!successful) {
|
|
|
qCritical() << *this << "Database " + args[0].toString() + " (" + args[1].toString() + ") was not installed due to Legacy core error.";
|
|
|
emit errorOccured(E_INSTALL, this, "Database " + args[0].toString() + " (" + args[1].toString() + ") was not installed due to Legacy core error.");
|
|
|
}
|
|
|
|
|
|
+ QString db_name = args[0].toString().split('_').at(1);
|
|
|
+ Settings::setValue("DatabaseNeedInstall/" + db_name, false);
|
|
|
+
|
|
|
--elapsed_patches_to_install_;
|
|
|
if (!elapsed_patches_to_install_) {
|
|
|
is_being_patched_by_lotro_dat_manager_ = false;
|
|
@@ -211,7 +219,7 @@ void GraphicsPatch::onLotroDatManagerOperationFinished(QString operation_name, Q
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void GraphicsPatch::onLotroDatManagerOperationStarted(QString operation_name, QVector<QVariant> args)
|
|
|
+void GraphicsPatch::onLotroDatManagerOperationStarted(QString, QVector<QVariant> args)
|
|
|
{
|
|
|
if (args.size() == 0 || !args[0].toString().contains(getPatchName())) {
|
|
|
return;
|
|
@@ -231,6 +239,10 @@ void GraphicsPatch::onLotroDatManagerStatusChanged(LotroDatManager::Status statu
|
|
|
|
|
|
void GraphicsPatch::installLoadscreens()
|
|
|
{
|
|
|
+ if (!Settings::getValue("DatabaseNeedInstall/loadscreen").toBool()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
QString locale_prefix = Settings::getValue("Lotro/original_locale").toString();
|
|
|
|
|
|
const QStringList loadscreens_filenames = {
|