|
@@ -1,4 +1,4 @@
|
|
|
-#include "lotro.h"
|
|
|
+#include "lotromgr.h"
|
|
|
#include "filesystem.h"
|
|
|
|
|
|
#include <QtConcurrent/QtConcurrent>
|
|
@@ -9,11 +9,11 @@
|
|
|
#include <iostream>
|
|
|
#include <fstream>
|
|
|
|
|
|
-Lotro::Lotro(QSettings* app_settings_, QObject *parent) : app_settings(app_settings_),
|
|
|
+LotroMgr::LotroMgr(QSettings* app_settings_, QObject *parent) : app_settings(app_settings_),
|
|
|
QObject(parent) {
|
|
|
}
|
|
|
|
|
|
-void Lotro::initialiseDatFile(QString file_path) {
|
|
|
+void LotroMgr::initialiseDatFile(QString file_path) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
emit processStarted("initialiseDatFile", {file_path});
|
|
@@ -31,7 +31,7 @@ void Lotro::initialiseDatFile(QString file_path) {
|
|
|
emit processFinished("initialiseDatFile", {QString("Success")});
|
|
|
}
|
|
|
|
|
|
-void Lotro::changeLocale() {
|
|
|
+void LotroMgr::changeLocale() {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -61,7 +61,7 @@ void Lotro::changeLocale() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::getLocaleFileContents(long long file_id, int locale) {
|
|
|
+void LotroMgr::getLocaleFileContents(long long file_id, int locale) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -93,7 +93,7 @@ void Lotro::getLocaleFileContents(long long file_id, int locale) {
|
|
|
emit processFinished("getFileContents", {"Success", file_id, locale});
|
|
|
}
|
|
|
|
|
|
-void Lotro::importFilesFromDatabase(QString database_path) {
|
|
|
+void LotroMgr::importFilesFromDatabase(QString database_path) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -124,7 +124,7 @@ void Lotro::importFilesFromDatabase(QString database_path) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::importFile(long long file_id, QString file_path) {
|
|
|
+void LotroMgr::importFile(long long file_id, QString file_path) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -195,7 +195,7 @@ void Lotro::importFile(long long file_id, QString file_path) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-void Lotro::importTextFragment(long long file_id, long long fragment_id,
|
|
|
+void LotroMgr::importTextFragment(long long file_id, long long fragment_id,
|
|
|
QString fragment_contents, QString arguments) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
@@ -261,7 +261,7 @@ void Lotro::importTextFragment(long long file_id, long long fragment_id,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::getTextFragment(long long file_id, long long fragment_id) {
|
|
|
+void LotroMgr::getTextFragment(long long file_id, long long fragment_id) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -324,7 +324,7 @@ void Lotro::getTextFragment(long long file_id, long long fragment_id) {
|
|
|
emit processFinished("importTextFragment", {"Success"});
|
|
|
}
|
|
|
|
|
|
-void Lotro::createCoreStatusFile(QString output_filename) {
|
|
|
+void LotroMgr::createCoreStatusFile(QString output_filename) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -340,7 +340,7 @@ void Lotro::createCoreStatusFile(QString output_filename) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::extractSingleFile(QString output_filename, long long file_id) {
|
|
|
+void LotroMgr::extractSingleFile(QString output_filename, long long file_id) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -356,7 +356,7 @@ void Lotro::extractSingleFile(QString output_filename, long long file_id) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::extractSingleFileToDatabase(QString database_path, long long file_id) {
|
|
|
+void LotroMgr::extractSingleFileToDatabase(QString database_path, long long file_id) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -380,7 +380,7 @@ void Lotro::extractSingleFileToDatabase(QString database_path, long long file_id
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::extractGrouppedFiles(QString output_foldername, LOTRO_DAT::FILE_TYPE type) {
|
|
|
+void LotroMgr::extractGrouppedFiles(QString output_foldername, LOTRO_DAT::FILE_TYPE type) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -396,7 +396,7 @@ void Lotro::extractGrouppedFiles(QString output_foldername, LOTRO_DAT::FILE_TYPE
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::extractGrouppedFilesToDatabase(QString database_path, LOTRO_DAT::FILE_TYPE type) {
|
|
|
+void LotroMgr::extractGrouppedFilesToDatabase(QString database_path, LOTRO_DAT::FILE_TYPE type) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -420,7 +420,7 @@ void Lotro::extractGrouppedFilesToDatabase(QString database_path, LOTRO_DAT::FIL
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void Lotro::getUnactiveCategories() {
|
|
|
+void LotroMgr::getUnactiveCategories() {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -438,7 +438,7 @@ void Lotro::getUnactiveCategories() {
|
|
|
emit processFinished("getUnactiveCategories", {"Success"});
|
|
|
}
|
|
|
|
|
|
-void Lotro::startGame() {
|
|
|
+void LotroMgr::startGame() {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
emit processStarted("startGame", {});
|
|
@@ -477,7 +477,7 @@ void Lotro::startGame() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-void Lotro::getLocaleFileInfo(long long file_id, int locale) {
|
|
|
+void LotroMgr::getLocaleFileInfo(long long file_id, int locale) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -510,7 +510,7 @@ void Lotro::getLocaleFileInfo(long long file_id, int locale) {
|
|
|
emit processFinished("getLocaleFileInfo", {"Success"});
|
|
|
}
|
|
|
|
|
|
-void Lotro::getFileInfo(long long file_id) {
|
|
|
+void LotroMgr::getFileInfo(long long file_id) {
|
|
|
if (!tryToBlockFile())
|
|
|
return;
|
|
|
|
|
@@ -543,20 +543,20 @@ void Lotro::getFileInfo(long long file_id) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-bool Lotro::initialised() {
|
|
|
+bool LotroMgr::initialised() {
|
|
|
return file.Initialized();
|
|
|
}
|
|
|
|
|
|
-int Lotro::currentLocale() {
|
|
|
+int LotroMgr::currentLocale() {
|
|
|
return file.GetLocaleManager().GetCurrentLocale();
|
|
|
}
|
|
|
|
|
|
-bool Lotro::notPatched() {
|
|
|
+bool LotroMgr::notPatched() {
|
|
|
return file.GetStatusModule().CheckIfNotPatched();
|
|
|
}
|
|
|
|
|
|
|
|
|
-bool Lotro::tryToBlockFile()
|
|
|
+bool LotroMgr::tryToBlockFile()
|
|
|
{
|
|
|
if (busy) {
|
|
|
emit caughtError("common", {QString("Ошибка инициализации!"), QString("Уже выполняется другой процесс с ресурсами игры! Невозможно инициализировать во время выполнения другого процесса!")});
|