diff --git a/EliteSpeedrunTool/CMakeLists.txt b/EliteSpeedrunTool/CMakeLists.txt index 057c1e5..643f37e 100644 --- a/EliteSpeedrunTool/CMakeLists.txt +++ b/EliteSpeedrunTool/CMakeLists.txt @@ -30,90 +30,10 @@ set(PROJECT_SOURCES LogUtil.h LogUtil.cpp LanguageUtil.h LanguageUtil.cpp memoryutil/MemoryUtil.h memoryutil/MemoryUtil.cpp - memoryutil/FakeMemoryUtil.h memoryutil/FakeMemoryUtil.cpp HttpServerUtil.h HttpServerUtil.cpp DisplayInfoSubFunction.h DisplayInfoSubFunction.cpp DiscordUtil.h DiscordUtil.cpp TimeUtil.h TimeUtil.cpp - LottieUtil.h LottieUtil.cpp - dataobserver/AutoTimerUtil.h dataobserver/AutoTimerUtil.cpp - dataobserver/DataObserver.h dataobserver/DataObserver.cpp - #================= - dataobserver/missionstrategy/MissionStrategyUtil.h dataobserver/missionstrategy/MissionStrategyUtil.cpp - dataobserver/missionstrategy/BaseMissionStrategy.h dataobserver/missionstrategy/BaseMissionStrategy.cpp - - dataobserver/missionstrategy/act1/TheDataBreachesStrategy.h dataobserver/missionstrategy/act1/TheDataBreachesStrategy.cpp - dataobserver/missionstrategy/act1/Act1DeadCourierStrategy.h dataobserver/missionstrategy/act1/Act1DeadCourierStrategy.cpp - dataobserver/missionstrategy/act1/Act1SignalInterceptsStrategy.h dataobserver/missionstrategy/act1/Act1SignalInterceptsStrategy.cpp - dataobserver/missionstrategy/act1/Act1ServerFarmStrategy.h dataobserver/missionstrategy/act1/Act1ServerFarmStrategy.cpp - - dataobserver/missionstrategy/act2/TheBogdanProblemStrategy.h dataobserver/missionstrategy/act2/TheBogdanProblemStrategy.cpp - dataobserver/missionstrategy/act2/Act2AvengerStrategy.h dataobserver/missionstrategy/act2/Act2AvengerStrategy.cpp - dataobserver/missionstrategy/act2/Act2RescueUlpStrategy.h dataobserver/missionstrategy/act2/Act2RescueUlpStrategy.cpp - dataobserver/missionstrategy/act2/Act2SalvageHardDrivesStrategy.h dataobserver/missionstrategy/act2/Act2SalvageHardDrivesStrategy.cpp - dataobserver/missionstrategy/act2/Act2SubmarineReconStrategy.h dataobserver/missionstrategy/act2/Act2SubmarineReconStrategy.cpp - - dataobserver/missionstrategy/act3/TheDoomsdayScenarioStrategy.h dataobserver/missionstrategy/act3/TheDoomsdayScenarioStrategy.cpp - dataobserver/missionstrategy/act3/Act3RescueAgent14Strategy.h dataobserver/missionstrategy/act3/Act3RescueAgent14Strategy.cpp - dataobserver/missionstrategy/act3/Act3EscortUlpStrategy.h dataobserver/missionstrategy/act3/Act3EscortUlpStrategy.cpp - dataobserver/missionstrategy/act3/Act3BarrageStrategy.h dataobserver/missionstrategy/act3/Act3BarrageStrategy.cpp - dataobserver/missionstrategy/act3/Act3KhanjaliStrategy.h dataobserver/missionstrategy/act3/Act3KhanjaliStrategy.cpp - dataobserver/missionstrategy/act3/Act3AirDefensesStrategy.h dataobserver/missionstrategy/act3/Act3AirDefensesStrategy.cpp - - dataobserver/missionstrategy/LostMcRipStrategy.h dataobserver/missionstrategy/LostMcRipStrategy.cpp - - dataobserver/missionstrategy/EmptyStrategy.h dataobserver/missionstrategy/EmptyStrategy.cpp - - dataobserver/missionstrategy/fleecajob/TheFleecaJobStrategy.h dataobserver/missionstrategy/fleecajob/TheFleecaJobStrategy.cpp - dataobserver/missionstrategy/fleecajob/FleecaJobScopeOutStrategy.h dataobserver/missionstrategy/fleecajob/FleecaJobScopeOutStrategy.cpp - dataobserver/missionstrategy/fleecajob/FleecaJobKurumaStrategy.h dataobserver/missionstrategy/fleecajob/FleecaJobKurumaStrategy.cpp - - dataobserver/missionstrategy/prisonbreak/PrisonBreakPlaneStrategy.h dataobserver/missionstrategy/prisonbreak/PrisonBreakPlaneStrategy.cpp - dataobserver/missionstrategy/prisonbreak/PrisonBreakBusStrategy.h dataobserver/missionstrategy/prisonbreak/PrisonBreakBusStrategy.cpp - dataobserver/missionstrategy/prisonbreak/PrisonBreakStationStrategy.h dataobserver/missionstrategy/prisonbreak/PrisonBreakStationStrategy.cpp - dataobserver/missionstrategy/prisonbreak/PrisonBreakWetWorkStrategy.h dataobserver/missionstrategy/prisonbreak/PrisonBreakWetWorkStrategy.cpp - dataobserver/missionstrategy/prisonbreak/ThePrisonBreakStrategy.h dataobserver/missionstrategy/prisonbreak/ThePrisonBreakStrategy.cpp - - dataobserver/missionstrategy/seriesa/SeriesACokeStrategy.h dataobserver/missionstrategy/seriesa/SeriesACokeStrategy.cpp - dataobserver/missionstrategy/seriesa/SeriesATrashTruckStrategy.h dataobserver/missionstrategy/seriesa/SeriesATrashTruckStrategy.cpp - dataobserver/missionstrategy/seriesa/SeriesABikersStrategy.h dataobserver/missionstrategy/seriesa/SeriesABikersStrategy.cpp - dataobserver/missionstrategy/seriesa/SeriesAWeedStrategy.h dataobserver/missionstrategy/seriesa/SeriesAWeedStrategy.cpp - dataobserver/missionstrategy/seriesa/SeriesAStealMethStrategy.h dataobserver/missionstrategy/seriesa/SeriesAStealMethStrategy.cpp - dataobserver/missionstrategy/seriesa/SeriesAFundingStrategy.h dataobserver/missionstrategy/seriesa/SeriesAFundingStrategy.cpp - - dataobserver/missionstrategy/humanelabsraid/HumaneRaidKeyCodesStrategy.h dataobserver/missionstrategy/humanelabsraid/HumaneRaidKeyCodesStrategy.cpp - dataobserver/missionstrategy/humanelabsraid/HumaneRaidInsurgentsStrategy.h dataobserver/missionstrategy/humanelabsraid/HumaneRaidInsurgentsStrategy.cpp - dataobserver/missionstrategy/humanelabsraid/HumaneRaidEmpStrategy.h dataobserver/missionstrategy/humanelabsraid/HumaneRaidEmpStrategy.cpp - dataobserver/missionstrategy/humanelabsraid/HumaneRaidValkyrieStrategy.h dataobserver/missionstrategy/humanelabsraid/HumaneRaidValkyrieStrategy.cpp - dataobserver/missionstrategy/humanelabsraid/HumaneRaidDeliverEmpStrategy.h dataobserver/missionstrategy/humanelabsraid/HumaneRaidDeliverEmpStrategy.cpp - dataobserver/missionstrategy/humanelabsraid/TheHumaneLabsRaidStrategy.h dataobserver/missionstrategy/humanelabsraid/TheHumaneLabsRaidStrategy.cpp - - dataobserver/missionstrategy/pacificstandard/PacificStandardVansStrategy.h dataobserver/missionstrategy/pacificstandard/PacificStandardVansStrategy.cpp - dataobserver/missionstrategy/pacificstandard/PacificStandardSignalStrategy.h dataobserver/missionstrategy/pacificstandard/PacificStandardSignalStrategy.cpp - dataobserver/missionstrategy/pacificstandard/PacificStandardHackStrategy.h dataobserver/missionstrategy/pacificstandard/PacificStandardHackStrategy.cpp - dataobserver/missionstrategy/pacificstandard/PacificStandardConvoyStrategy.h dataobserver/missionstrategy/pacificstandard/PacificStandardConvoyStrategy.cpp - dataobserver/missionstrategy/pacificstandard/PacificStandardBikesStrategy.h dataobserver/missionstrategy/pacificstandard/PacificStandardBikesStrategy.cpp - dataobserver/missionstrategy/pacificstandard/ThePacificStandardStrategy.h dataobserver/missionstrategy/pacificstandard/ThePacificStandardStrategy.cpp - - dataobserver/missionstrategy/casinoheist/CasinoHeistTheBigConStrategy.h dataobserver/missionstrategy/casinoheist/CasinoHeistTheBigConStrategy.cpp - dataobserver/missionstrategy/casinoheist/CasinoHeistSilentSneakyStrategy.h dataobserver/missionstrategy/casinoheist/CasinoHeistSilentSneakyStrategy.cpp - dataobserver/missionstrategy/casinoheist/CasinoHeistAggressiveStrategy.h dataobserver/missionstrategy/casinoheist/CasinoHeistAggressiveStrategy.cpp - dataobserver/missionstrategy/casinoheist/CasinoHeistEndStageStrategy.h dataobserver/missionstrategy/casinoheist/CasinoHeistEndStageStrategy.cpp - - dataobserver/missionstrategy/casino/CasinoBadBeatStrategy.h dataobserver/missionstrategy/casino/CasinoBadBeatStrategy.cpp - #================= - dataobserver/datafetcher/BaseDataFetcher.h - dataobserver/datafetcher/DataFetcherUtil.h dataobserver/datafetcher/DataFetcherUtil.cpp - dataobserver/datafetcher/MissionHashFetcher.h dataobserver/datafetcher/MissionHashFetcher.cpp - dataobserver/datafetcher/HeadshotFetcher.h dataobserver/datafetcher/HeadshotFetcher.cpp - dataobserver/datafetcher/KillFetcher.h dataobserver/datafetcher/KillFetcher.cpp - dataobserver/datafetcher/Kill1Fetcher.h dataobserver/datafetcher/Kill1Fetcher.cpp - dataobserver/datafetcher/Kill2Fetcher.h dataobserver/datafetcher/Kill2Fetcher.cpp - dataobserver/datafetcher/Kill3Fetcher.h dataobserver/datafetcher/Kill3Fetcher.cpp - dataobserver/datafetcher/Kill4Fetcher.h dataobserver/datafetcher/Kill4Fetcher.cpp - dataobserver/datafetcher/VehicleDamageFetcher.h dataobserver/datafetcher/VehicleDamageFetcher.cpp - dataobserver/datafetcher/RashkovskyHurtFetcher.h dataobserver/datafetcher/RashkovskyHurtFetcher.cpp - AutoCapture.h AutoCapture.cpp resource.qrc ) @@ -184,7 +104,3 @@ endif() add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../DiscordGameSDK ${CMAKE_CURRENT_BINARY_DIR}/DiscordGameSDK) include_directories(../DiscordGameSDK) target_link_libraries(EliteSpeedrunTool PRIVATE DiscordGameSDK) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../QtLottie ${CMAKE_CURRENT_BINARY_DIR}/QtLottie) -include_directories(../QtLottie) -target_link_libraries(EliteSpeedrunTool PRIVATE QtLottie) diff --git a/EliteSpeedrunTool/DescriptionDialog.ui b/EliteSpeedrunTool/DescriptionDialog.ui index ce8f826..bf8028b 100644 --- a/EliteSpeedrunTool/DescriptionDialog.ui +++ b/EliteSpeedrunTool/DescriptionDialog.ui @@ -246,271 +246,6 @@ - - - 自动计时 - - - - - - 0 - - - - - 0 - 0 - 485 - 221 - - - - 基本原理 - - - - - - 在任务中,游戏只会记录开始时间和结束时间,因此自动计时功能在检测到任务开始后实时显示秒数是工具自行实现的,游戏内并没有实时的时间。 - -为了减小误差,当游戏中暂停计时时,工具会读取游戏的内存,使用游戏内的时间来校正工具自动计时的时间。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - 0 - 98 - 323 - - - - 注意事项 - - - - - - 由于每次大更新后,GTA5 进程的内存布局可能会发生变化,因此在大更新后,此功能可能会失效,请及时更新最新版本。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 164 - - - - - - - - - - 0 - 0 - 98 - 544 - - - - 常见问题 - - - - - - 1. 为什么一定要在任务开始前计时呢? -答:由于游戏是从 R 星服务器获取的当前时间,而经过测试发现,R 星服务器的时间与标准的 UTC+3 时间差了大约一分半,因此工具没有办法获取到带有相同误差的当前时间。此外,由于自动计时实现复杂,实现此功能工作量大,因此只能在任务开始时计时。 - -2. 是否要在每次任务结束后重启自动计时呢? -答:不需要。它会自动识别下一个任务的时间。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 任务数据 - - - - - - - - 0 - 0 - 485 - 221 - - - - 基本原理 - - - - - - GTA5 进程内存储了任务中的部分数据,因此只需读取 GTA5 进程的内存即可得到相关数据。 - -由于不同任务达成精英的条件不同,因此工具可以根据当前的任务来选择显示的数据。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - 0 - 98 - 199 - - - - 注意事项 - - - - - - 由于每次大更新后,GTA5 进程的内存布局可能会发生变化,因此在大更新后,此功能可能会失效,请及时更新最新版本。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - 0 - 98 - 514 - - - - 常见问题 - - - - - - 1. 每次结束任务后是否需要重启数据监视? -答:不需要。数据监视功能每隔一个“刷新间隔”便会去读取内存的数据,当重新开始任务后,会自动显示最新数据。 - -2. 为什么在某些情况下数据会出现奇怪的值? -答:一般这种情况发生在任务还没正式开始前或者是正式结束后,在这时,原来存放数据的那部分内存空间会被存放其他数据,因此,显示的数据没有意义。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 多端显示 @@ -602,132 +337,6 @@ - - - 恶意值 - - - - - - - - 0 - 0 - 485 - 221 - - - - 基本原理 - - - - - - 游戏内有一个存储恶意值的单浮点变量,只需要获取该变量的值,即可得知恶意值。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - 0 - 98 - 199 - - - - 注意事项 - - - - - - 由于每次大更新后,GTA5 进程的内存布局可能会发生变化,因此在大更新后,此功能可能会失效,请及时更新最新版本。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 0 - 0 - 98 - 229 - - - - 常见问题 - - - - - - 1. 为什么恶意值不能实时更新? -答:由于实时更新会浪费计算机性能,并且对于恶意值的需求也不是实时的,因此用户手动刷新恶意值即可。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 结束游戏 diff --git a/EliteSpeedrunTool/DisplayInfoDialog.cpp b/EliteSpeedrunTool/DisplayInfoDialog.cpp index 9121409..faf9521 100644 --- a/EliteSpeedrunTool/DisplayInfoDialog.cpp +++ b/EliteSpeedrunTool/DisplayInfoDialog.cpp @@ -35,7 +35,6 @@ DisplayInfoDialog::DisplayInfoDialog(QWidget* parent) setTextStyle(); setTime(0, 0, 0); - setAutoTime(0, 0, 0); initGlobalDataConnects(); } @@ -55,14 +54,12 @@ void DisplayInfoDialog::setDisplay() { auto displayInfoSubFunctions = globalData->displayInfoSubFunctions(); ui->labTimer->setVisible(displayInfoSubFunctions[DisplayInfoSubFunction::Timer]->display()); - ui->labAutoTimer->setVisible(displayInfoSubFunctions[DisplayInfoSubFunction::AutoTimer]->display()); } void DisplayInfoDialog::setTextAlignment() { auto displayInfoSubFunctions = globalData->displayInfoSubFunctions(); ui->labTimer->setAlignment(displayInfoSubFunctions[DisplayInfoSubFunction::Timer]->textAlignment()); - ui->labAutoTimer->setAlignment(displayInfoSubFunctions[DisplayInfoSubFunction::AutoTimer]->textAlignment()); } void DisplayInfoDialog::setFont() @@ -71,29 +68,19 @@ void DisplayInfoDialog::setFont() ui->labTimer->setFont( QFont(displayInfoSubFunctions[DisplayInfoSubFunction::Timer]->fontFamily(), displayInfoSubFunctions[DisplayInfoSubFunction::Timer]->textSize())); - ui->labAutoTimer->setFont( - QFont(displayInfoSubFunctions[DisplayInfoSubFunction::AutoTimer]->fontFamily(), - displayInfoSubFunctions[DisplayInfoSubFunction::AutoTimer]->textSize())); setTime(0, 0, 0); // 更新字体大小 - setAutoTime(0, 0, 0); // 更新字体大小 } void DisplayInfoDialog::setTextStyle() { auto displayInfoSubFunctions = globalData->displayInfoSubFunctions(); auto timerItem = displayInfoSubFunctions[DisplayInfoSubFunction::Timer]; - auto autoTimerItem = displayInfoSubFunctions[DisplayInfoSubFunction::AutoTimer]; setTimerTextStyle( timerItem->textColor(), timerItem->textShadowColor(), timerItem->textShadowBlurRadius(), timerItem->textShadowOffset()); - setAutoTimerTextStyle( - autoTimerItem->textColor(), - autoTimerItem->textShadowColor(), - autoTimerItem->textShadowBlurRadius(), - autoTimerItem->textShadowOffset()); } void DisplayInfoDialog::setTimerTextStyle( @@ -112,18 +99,6 @@ void DisplayInfoDialog::setTimerTextStyle( ui->labTimer->setGraphicsEffect(timerEffect); } -void DisplayInfoDialog::setAutoTimerTextStyle(const QColor& textColor, const QColor& textShadowColor, qreal textShadowBlurRadius, const QPointF& textShadowOffset) -{ - ui->labAutoTimer->setStyleSheet( - textQssPattern.arg(textColor.name())); - - QGraphicsDropShadowEffect* timerEffect = new QGraphicsDropShadowEffect(this); - timerEffect->setColor(textShadowColor); - timerEffect->setBlurRadius(textShadowBlurRadius); - timerEffect->setOffset(textShadowOffset); - ui->labAutoTimer->setGraphicsEffect(timerEffect); -} - void DisplayInfoDialog::setTouchable(bool touchable) { setAttribute(Qt::WA_TransparentForMouseEvents, !touchable); @@ -133,7 +108,6 @@ void DisplayInfoDialog::setChildrenTransparentForMouseEvents(bool transparent) { ui->widget->setAttribute(Qt::WA_TransparentForMouseEvents, transparent); ui->labTimer->setAttribute(Qt::WA_TransparentForMouseEvents, transparent); - ui->labAutoTimer->setAttribute(Qt::WA_TransparentForMouseEvents, transparent); } void DisplayInfoDialog::addWidget(QWidget* widget) @@ -182,49 +156,25 @@ void DisplayInfoDialog::setTime(unsigned int m, unsigned int s, unsigned int ms) .arg(ms, 2, 10, QLatin1Char('0'))); } -void DisplayInfoDialog::setAutoTime(unsigned int m, unsigned int s, unsigned int ms) -{ - auto textSize = globalData->displayInfoSubFunctions()[DisplayInfoSubFunction::AutoTimer]->textSize(); - ui->labAutoTimer->setText(timePattern - .arg(QString::number(textSize)) - .arg(m, 2, 10, QLatin1Char('0')) - .arg(s, 2, 10, QLatin1Char('0')) - .arg(QString::number(qMax(5, textSize - 10))) - .arg(ms, 2, 10, QLatin1Char('0'))); -} - void DisplayInfoDialog::initGlobalDataConnects() { auto displayInfoSubFunctions = globalData->displayInfoSubFunctions(); auto timerItem = displayInfoSubFunctions[DisplayInfoSubFunction::Timer]; - auto autoTimerItem = displayInfoSubFunctions[DisplayInfoSubFunction::AutoTimer]; connect(timerItem, &DisplayInfoSubFunctionItem::displayChanged, this, [this](bool newDisplay) { ui->labTimer->setVisible(newDisplay); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::displayChanged, this, - [this](bool newDisplay) { - ui->labAutoTimer->setVisible(newDisplay); - }); connect(timerItem, &DisplayInfoSubFunctionItem::textAlignmentChanged, this, [this](const Qt::Alignment& newTextAlignment) { ui->labTimer->setAlignment(newTextAlignment); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::textAlignmentChanged, this, - [this](const Qt::Alignment& newTextAlignment) { - ui->labAutoTimer->setAlignment(newTextAlignment); - }); connect(timerItem, &DisplayInfoSubFunctionItem::textSizeChanged, this, [this, timerItem](int newTextSize) { ui->labTimer->setFont(QFont(timerItem->fontFamily(), newTextSize)); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::textSizeChanged, this, - [this, autoTimerItem](int newTextSize) { - ui->labAutoTimer->setFont(QFont(autoTimerItem->fontFamily(), newTextSize)); - }); connect(timerItem, &DisplayInfoSubFunctionItem::textColorChanged, this, [this, timerItem](const QColor& newTextColor) { @@ -234,14 +184,6 @@ void DisplayInfoDialog::initGlobalDataConnects() timerItem->textShadowBlurRadius(), timerItem->textShadowOffset()); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::textColorChanged, this, - [this, autoTimerItem](const QColor& newTextColor) { - setAutoTimerTextStyle( - newTextColor, - autoTimerItem->textShadowColor(), - autoTimerItem->textShadowBlurRadius(), - autoTimerItem->textShadowOffset()); - }); connect(timerItem, &DisplayInfoSubFunctionItem::textShadowColorChanged, this, [this, timerItem](const QColor& newTextShadowColor) { @@ -251,14 +193,6 @@ void DisplayInfoDialog::initGlobalDataConnects() timerItem->textShadowBlurRadius(), timerItem->textShadowOffset()); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::textShadowColorChanged, this, - [this, autoTimerItem](const QColor& newTextShadowColor) { - setAutoTimerTextStyle( - autoTimerItem->textColor(), - newTextShadowColor, - autoTimerItem->textShadowBlurRadius(), - autoTimerItem->textShadowOffset()); - }); connect(timerItem, &DisplayInfoSubFunctionItem::textShadowBlurRadiusChanged, this, [this, timerItem](int newTextShadowBlurRadius) { @@ -268,14 +202,6 @@ void DisplayInfoDialog::initGlobalDataConnects() newTextShadowBlurRadius, timerItem->textShadowOffset()); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::textShadowBlurRadiusChanged, this, - [this, autoTimerItem](int newTextShadowBlurRadius) { - setTimerTextStyle( - autoTimerItem->textColor(), - autoTimerItem->textShadowColor(), - newTextShadowBlurRadius, - autoTimerItem->textShadowOffset()); - }); connect(timerItem, &DisplayInfoSubFunctionItem::textShadowOffsetChanged, this, [this, timerItem](QPointF newTextShadowOffset) { @@ -285,23 +211,11 @@ void DisplayInfoDialog::initGlobalDataConnects() timerItem->textShadowBlurRadius(), newTextShadowOffset); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::textShadowOffsetChanged, this, - [this, autoTimerItem](QPointF newTextShadowOffset) { - setTimerTextStyle( - autoTimerItem->textColor(), - autoTimerItem->textShadowColor(), - autoTimerItem->textShadowBlurRadius(), - newTextShadowOffset); - }); connect(timerItem, &DisplayInfoSubFunctionItem::fontFamilyChanged, this, [this, timerItem](const QString& newFontFamily) { ui->labTimer->setFont(QFont(newFontFamily, timerItem->textSize())); }); - connect(autoTimerItem, &DisplayInfoSubFunctionItem::fontFamilyChanged, this, - [this, autoTimerItem](const QString& newFontFamily) { - ui->labAutoTimer->setFont(QFont(newFontFamily, autoTimerItem->textSize())); - }); // ========================== connect(globalData, &GlobalData::displayInfoPosChanged, this, [this]() { diff --git a/EliteSpeedrunTool/DisplayInfoDialog.h b/EliteSpeedrunTool/DisplayInfoDialog.h index 05504f5..5ee1de5 100644 --- a/EliteSpeedrunTool/DisplayInfoDialog.h +++ b/EliteSpeedrunTool/DisplayInfoDialog.h @@ -28,14 +28,8 @@ class DisplayInfoDialog : public QDialog { const QColor& textShadowColor, qreal textShadowBlurRadius, const QPointF& textShadowOffset); - void setAutoTimerTextStyle( - const QColor& textColor, - const QColor& textShadowColor, - qreal textShadowBlurRadius, - const QPointF& textShadowOffset); void setTime(unsigned int m, unsigned int s, unsigned int ms); - void setAutoTime(unsigned int m, unsigned int s, unsigned int ms); static const QString timePattern; diff --git a/EliteSpeedrunTool/DisplayInfoDialog.ui b/EliteSpeedrunTool/DisplayInfoDialog.ui index 7ca28a5..8ac709c 100644 --- a/EliteSpeedrunTool/DisplayInfoDialog.ui +++ b/EliteSpeedrunTool/DisplayInfoDialog.ui @@ -7,7 +7,7 @@ 0 0 303 - 256 + 87 @@ -47,22 +47,6 @@ 0 - - - - - 0 - 0 - - - - color: rgb(255, 255, 0); - - - <html><head/><body><p><span style=" font-size:26pt;">00:00</span><span style=" font-size:22pt;">.00</span></p></body></html> - - - diff --git a/EliteSpeedrunTool/DisplayInfoSubFunction.cpp b/EliteSpeedrunTool/DisplayInfoSubFunction.cpp index 2b5aed0..8435a77 100644 --- a/EliteSpeedrunTool/DisplayInfoSubFunction.cpp +++ b/EliteSpeedrunTool/DisplayInfoSubFunction.cpp @@ -12,27 +12,9 @@ QString toDisplayString(DisplayInfoSubFunction f) case Firewall: return QObject::tr("断网"); break; - case Headshot: - return QObject::tr("总爆头"); - break; case Timer: return QObject::tr("计时"); break; - case AutoTimer: - return QObject::tr("自动计时"); - break; - case VehicleDamage: - return QObject::tr("车损"); - break; - case RashkovskyDamage: - return QObject::tr("拉什科夫斯基受伤"); - break; - case Kill: - return QObject::tr("总击杀"); - break; - case PlaneDamage: - return QObject::tr("机损"); - break; default: return ""; } @@ -44,27 +26,9 @@ QString toString(DisplayInfoSubFunction f) case Firewall: return "Firewall"; break; - case Headshot: - return "Headshot"; - break; case Timer: return "Timer"; break; - case AutoTimer: - return "AutoTimer"; - break; - case VehicleDamage: - return "VehicleDamage"; - break; - case RashkovskyDamage: - return "RashkovskyDamage"; - break; - case Kill: - return "Kill"; - break; - case PlaneDamage: - return "PlaneDamage"; - break; default: return ""; } diff --git a/EliteSpeedrunTool/DisplayInfoSubFunction.h b/EliteSpeedrunTool/DisplayInfoSubFunction.h index 7e49f34..cd2b3be 100644 --- a/EliteSpeedrunTool/DisplayInfoSubFunction.h +++ b/EliteSpeedrunTool/DisplayInfoSubFunction.h @@ -7,13 +7,7 @@ enum DisplayInfoSubFunction { Firewall = 1, - Headshot = 2, Timer = 3, - AutoTimer = 4, - VehicleDamage = 5, - RashkovskyDamage = 6, - Kill = 7, - PlaneDamage = 8, }; namespace DisplayInfoSubFunctionUtil { diff --git a/EliteSpeedrunTool/GlobalData.h b/EliteSpeedrunTool/GlobalData.h index 344bdee..4a03a7a 100644 --- a/EliteSpeedrunTool/GlobalData.h +++ b/EliteSpeedrunTool/GlobalData.h @@ -229,13 +229,7 @@ class GlobalData : public QObject { // 信息展示 QList mFuncs = { DisplayInfoSubFunction::Firewall, - DisplayInfoSubFunction::Headshot, DisplayInfoSubFunction::Timer, - DisplayInfoSubFunction::AutoTimer, - DisplayInfoSubFunction::VehicleDamage, - DisplayInfoSubFunction::RashkovskyDamage, - DisplayInfoSubFunction::Kill, - DisplayInfoSubFunction::PlaneDamage, }; QDisplayInfoSubFuncsMap mDisplayInfoSubFunctions; bool mDisplayInfoToolWindow = true; diff --git a/EliteSpeedrunTool/MainWindow.cpp b/EliteSpeedrunTool/MainWindow.cpp index 477bcfc..7d1397d 100644 --- a/EliteSpeedrunTool/MainWindow.cpp +++ b/EliteSpeedrunTool/MainWindow.cpp @@ -6,11 +6,8 @@ #include "GlobalData.h" #include "HttpServerUtil.h" #include "LogUtil.h" -#include "LottieUtil.h" #include "SettingDialog.h" #include "UpdateDialog.h" -#include "dataobserver/AutoTimerUtil.h" -#include "dataobserver/DataObserver.h" #include "memoryutil/MemoryUtil.h" #include #include @@ -37,8 +34,6 @@ MainWindow::MainWindow(QWidget* parent) connect(qApp, &QCoreApplication::aboutToQuit, this, [=]() { HttpServerController::instance()->stop(); - autoTimerUtil->stop(); - dataObserver->destruct(); qInfo("Exiting..."); globalData->destory(); }); @@ -64,20 +59,12 @@ MainWindow::MainWindow(QWidget* parent) labState->setPalette(palette); ui.statusbar->addPermanentWidget(labState); - initTabEnabled(); - initFirewall(); initTimerStateMachine(); initCloseGameImmediately(); - initAutoTimer(); - - initMissionData(); - - initBadSport(); - initGlobalDataConnects(); } @@ -105,17 +92,6 @@ void MainWindow::closeEvent(QCloseEvent* event) } } -void MainWindow::initTabEnabled() -{ - ui.tabAutoTimer->setEnabled(MemoryUtil::enableReadMemory); - ui.tabMissionData->setEnabled(MemoryUtil::enableReadMemory); - ui.tabBadSport->setEnabled(MemoryUtil::enableReadMemory); - ui.tabWidget->setTabEnabled(ui.tabWidget->indexOf(ui.tabAutoTimer), MemoryUtil::enableReadMemory); - ui.tabWidget->setTabEnabled(ui.tabWidget->indexOf(ui.tabMissionData), MemoryUtil::enableReadMemory); - ui.tabWidget->setTabEnabled(ui.tabWidget->indexOf(ui.tabBadSport), MemoryUtil::enableReadMemory); - ui.tabWidget->setStyleSheet("QTabBar::tab::disabled {width: 0; height: 0; margin: 0; padding: 0; border: none;} "); -} - void MainWindow::initGlobalDataConnects() { connect(globalData, &GlobalData::minimizeToTrayChanged, this, [this]() { @@ -305,7 +281,6 @@ void MainWindow::initMenu() globalData->setDisplayInfoShow(checked); if (checked) { displayInfoDialog = new DisplayInfoDialog(); - initDisplayInfoDialogData(); auto closeLambda = [this](int result) { disconnect(this, nullptr, displayInfoDialog, nullptr); displayInfoDialogIsShowing = false; @@ -516,131 +491,6 @@ void MainWindow::initCloseGameImmediately() }); } -void MainWindow::initAutoTimer() -{ - connect(ui.btnStartAutoTimer, &QAbstractButton::toggled, this, [this](bool checked) { - if (checked) { - autoTimerUtil->start(); - } else { - autoTimerUtil->stop(); - } - }); - connect(ui.btnStopAndResetAutoTimer, &QAbstractButton::clicked, this, [this]() { - autoTimerUtil->stopAndReset(true); - }); - connect(autoTimerUtil, &AutoTimerUtil::updateTime, this, [=](unsigned long long data) { - updateAutoTimerString(data); - }); - connect(autoTimerUtil, &AutoTimerUtil::stopped, this, [=]() { - if (ui.btnStartAutoTimer->isChecked()) { - ui.btnStartAutoTimer->setChecked(false); - } - }); - - connect(autoTimerUtil, &AutoTimerUtil::timerStarted, this, [=](unsigned long long data) { - HttpServerController::instance()->startAutoTimer(static_cast(data)); - }); - connect(autoTimerUtil, &AutoTimerUtil::timerPaused, this, [=](unsigned long long data) { - HttpServerController::instance()->pauseAutoTimer(static_cast(data)); - }); -} - -void MainWindow::initMissionData() -{ - connect(ui.btnStartMissionData, &QAbstractButton::toggled, this, [this](bool checked) { - if (checked) { - dataObserver->startObserve(); - } else { - dataObserver->stopObserve(); - } - }); - connect(dataObserver, &DataObserver::onStartObserve, this, [this]() { - if (!ui.btnStartMissionData->isChecked()) { - ui.btnStartMissionData->setChecked(true); - } - }); - connect(dataObserver, &DataObserver::onStopObserve, this, [this]() { - if (ui.btnStartMissionData->isChecked()) { - ui.btnStartMissionData->setChecked(false); - } - }); - connect(dataObserver, &DataObserver::onMissionChanged, this, [this]() { - discordUtil->setCurrentMission(dataObserver->getMissionStrategy()->getDisplayName()); - }); - connect(dataObserver, &DataObserver::onDisplayLabelsAdded, this, [this](QList labels) { - if (!displayInfoDialog) { - return; - } - for (auto label : labels) { - displayInfoDialog->addWidget(label); - } - }); - connect(dataObserver, &DataObserver::onDisplayLabelsRemoved, this, [this](QList labels) { - if (!displayInfoDialog) { - return; - } - for (auto label : labels) { - displayInfoDialog->removeWidget(label); - } - }); - connect(dataObserver, &DataObserver::onLabelsAdded, this, [this](QList labels) { - QBoxLayout* layout = (QBoxLayout*)ui.scrollAreaMissionDataContents->layout(); - for (int i = labels.count() - 1; i >= 0; --i) { - layout->insertWidget(0, labels[i]); - } - if (!ui.scrollAreaMissionDataContents->children().isEmpty()) { - ui.loMissionData->pause(); - ui.loMissionDataContainer->setVisible(false); - ui.scrollAreaMissionData->setVisible(true); - } - }); - connect(dataObserver, &DataObserver::onLabelsRemoved, this, [this](QList labels) { - auto layout = ui.scrollAreaMissionDataContents->layout(); - for (auto label : labels) { - layout->removeWidget(label); - label->setParent(nullptr); - } - if (ui.scrollAreaMissionDataContents->children().isEmpty()) { - ui.loMissionData->resume(); - ui.loMissionDataContainer->setVisible(true); - ui.scrollAreaMissionData->setVisible(false); - } - }); - ui.scrollAreaMissionData->setVisible(false); - ui.loMissionDataContainer->layout()->setAlignment(Qt::AlignCenter); - auto randomLottie = lottieUtil->randomLottie(); - if (!randomLottie.isEmpty()) { - ui.loMissionData->setSource(QUrl(randomLottie)); - } -} - -void MainWindow::initBadSport() -{ - connect(ui.btnRefreshBadSport, &QAbstractButton::clicked, this, [this]() { - auto badSport = memoryUtil->getBadSport(); - ui.labBadSport->setText(QString::number(badSport)); - if (badSport < 30) { - ui.labBadSport->setStyleSheet("color: green"); - } else if (badSport < 50) { - ui.labBadSport->setStyleSheet("color: yellow"); - } else if (badSport >= 50) { - ui.labBadSport->setStyleSheet("color: red"); - } - }); -} - -void MainWindow::initDisplayInfoDialogData() -{ - if (displayInfoDialog) { - for (auto label : dataObserver->getDisplayLabels()) { - if (!displayInfoDialog->containWidget(label)) { - displayInfoDialog->addWidget(label); - // label->setVisible(dataObserver->getMissionStrategy()->labelIsVisible(label)); - } - } - } -} - void MainWindow::showDisplayInfo() { if (!topMostTimer) { @@ -752,16 +602,6 @@ void MainWindow::updateTimerString(qint64 currentDateTime) } } -void MainWindow::updateAutoTimerString(unsigned long long deltaTime) -{ - unsigned int m, s, ms; - QString t = getFormattedTime(deltaTime, &m, &s, &ms); - ui.labAutoTimer->setText(t); - if (displayInfoDialogIsShowing && displayInfoDialog) { - displayInfoDialog->setAutoTime(m, s, ms); - } -} - void MainWindow::initTimerStateMachine() { // 设置 parent 后相当于已经 addState 了 diff --git a/EliteSpeedrunTool/MainWindow.h b/EliteSpeedrunTool/MainWindow.h index e47a083..943f424 100644 --- a/EliteSpeedrunTool/MainWindow.h +++ b/EliteSpeedrunTool/MainWindow.h @@ -24,8 +24,6 @@ class MainWindow : public QMainWindow { protected: void closeEvent(QCloseEvent* event) override; - void initTabEnabled(); - void initGlobalDataConnects(); void checkUpdate(); @@ -42,14 +40,6 @@ class MainWindow : public QMainWindow { void initCloseGameImmediately(); - void initAutoTimer(); - - void initMissionData(); - - void initBadSport(); - - void initDisplayInfoDialogData(); - void showDisplayInfo(); void hideDisplayInfo(); @@ -70,8 +60,6 @@ class MainWindow : public QMainWindow { void updateTimerString(qint64 currentDateTime = QDateTime::currentDateTime().toMSecsSinceEpoch()); - void updateAutoTimerString(unsigned long long deltaTime); - void initTimerStateMachine(); void closeGameImmediately(); @@ -123,7 +111,7 @@ class MainWindow : public QMainWindow { QString license = "

" + QApplication::applicationDisplayName() + " v" + QApplication::applicationVersion() + "

" - + tr("

一个 GTAOL 精英、速通工具,支持快速启动防火墙、自动统计任务数据、计时等。本工具仅读取内存,不会修改任何内存。

") + + tr("

一个 GTAOL 精英、速通工具,支持快速启动防火墙、计时、结束游戏等。

") + "

" + tr("程序开发:SkyD666") + "
" + tr("游戏逆向:Zerkalo2147") diff --git a/EliteSpeedrunTool/MainWindow.ui b/EliteSpeedrunTool/MainWindow.ui index 7b3328e..7d8f05f 100644 --- a/EliteSpeedrunTool/MainWindow.ui +++ b/EliteSpeedrunTool/MainWindow.ui @@ -366,316 +366,6 @@ - - - false - - - 自动计时 - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - <html><head/><body><p><span style=" font-size:26pt;">00:00</span><span style=" font-size:16pt;">.00</span></p></body></html> - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - - 0 - 0 - - - - 注:请在任务开始前开始监控,否则数据不准确 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - - 0 - 0 - - - - 开始监控 - - - true - - - - - - - - 0 - 0 - - - - 停止并重置 - - - - - - - - false - - - 数据 - - - - - - QFrame::NoFrame - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - 0 - 0 - 392 - 99 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - - - - - 30 - - - 30 - - - 30 - - - 30 - - - - - - 0 - 0 - - - - - 256 - 16777215 - - - - - - - - - 12 - - - - 未开始监控 - - - Qt::AlignCenter - - - true - - - - - - - - - - 开始监控 - - - true - - - - - - - - false - - - 恶意值 - - - - - - - 26 - - - - 未查询 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 10 - - - - 注意:当恶意值达到 50,你会成为恶意玩家! - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - - 0 - 0 - - - - 此功能由 Zerkalo2147 提供 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - 刷新恶意值 - - - - :/image/ic_dunce_hat.ico:/image/ic_dunce_hat.ico - - - - 32 - 32 - - - - - - 结束游戏 @@ -936,14 +626,6 @@ - - - QtLottieWidget - QWidget -

qtlottiewidget.h
- 1 - - diff --git a/EliteSpeedrunTool/SettingDialog.cpp b/EliteSpeedrunTool/SettingDialog.cpp index 45b116f..8e375c0 100644 --- a/EliteSpeedrunTool/SettingDialog.cpp +++ b/EliteSpeedrunTool/SettingDialog.cpp @@ -1,7 +1,6 @@ #include "SettingDialog.h" #include "GlobalData.h" #include "LanguageUtil.h" -#include "dataobserver/missionstrategy/MissionStrategyUtil.h" #include #include #include @@ -11,7 +10,6 @@ #include #include #include -#include #include SettingDialog::SettingDialog(QWidget* parent) @@ -31,10 +29,8 @@ SettingDialog::SettingDialog(QWidget* parent) } connect(ui.lwPage, &QListWidget::currentRowChanged, ui.stackedWidget, &QStackedWidget::setCurrentIndex); - initTabEnabled(); initGeneralSettings(); initFirewallSettings(); - initMissionDataSettings(); initTimerSettings(); initCloseGameImmediatelySettings(); initSocialSettings(); @@ -74,12 +70,6 @@ void SettingDialog::initGeneralSettings() }); } -void SettingDialog::initTabEnabled() -{ - ui.tabMissionData->setEnabled(MemoryUtil::enableReadMemory); - ui.groupBoxAutoTimer->setEnabled(MemoryUtil::enableReadMemory); -} - QString SettingDialog::getSoundFile(QString dir) { return QFileDialog::getOpenFileName(this, tr("选择文件"), dir, tr("WAV 文件 (*.wav)")); @@ -208,107 +198,6 @@ void SettingDialog::initFirewallSettings() } } -// 任务信息设置 -void SettingDialog::initMissionDataSettings() -{ - // 刷新间隔 - ui.sbMissionDataUpdateInterval->setValue(globalData->missionDataUpdateInterval()); - connect(ui.sbMissionDataUpdateInterval, &QSpinBox::valueChanged, this, [=](int value) { - globalData->setMissionDataUpdateInterval(value); - }); - - // 数据名称显示方式 =========================================== - { - int i = 0; - int currentMissionDataNameIndex = 0; - for (auto s : globalData->missionDataNames()) { - ui.cbMissionDataName->addItem(MissionDataNameUtil::toDisplayString(s), s); - if (s == globalData->missionDataName()) { - currentMissionDataNameIndex = i; - } - i++; - } - connect(ui.cbMissionDataName, QOverload::of(&QComboBox::currentIndexChanged), - this, [=](int index) { - globalData->setMissionDataName( - ui.cbMissionDataName->itemData(index).value()); - }); - ui.cbMissionDataName->setCurrentIndex(currentMissionDataNameIndex); - } - - // 数据组合 =========================================== - connect(ui.cbMissionDataCombine, QOverload::of(&QComboBox::currentIndexChanged), - this, [=](int index) { - const auto includedDataFetchers = missionStrategyUtil->missionToDataFetchers() - [ui.cbMissionDataCombine->itemData(index).value()]; - setMissionDataCombineListWidgetData(includedDataFetchers); - }); - - for (auto mission : missionStrategyUtil->missionStrategies) { - ui.cbMissionDataCombine->addItem(mission->getUniqueDisplayName(), mission->id()); - } - - // 有选中时按钮才可用 - ui.tbMissionDataCombineAdd->setEnabled(false); - connect(ui.lwMissionDataCombineExcluded, &QListWidget::currentRowChanged, this, [=](int currentRow) { - ui.tbMissionDataCombineAdd->setEnabled(currentRow >= 0); - }); - ui.tbMissionDataCombineRemove->setEnabled(false); - connect(ui.lwMissionDataCombineIncluded, &QListWidget::currentRowChanged, this, [=](int currentRow) { - ui.tbMissionDataCombineRemove->setEnabled(currentRow >= 0); - }); - - connect(ui.tbMissionDataCombineAdd, &QAbstractButton::clicked, this, [=]() { - auto currentExcludedDataFetcher = ui.lwMissionDataCombineExcluded - ->takeItem(ui.lwMissionDataCombineExcluded->currentRow()); - ui.lwMissionDataCombineIncluded->addItem(currentExcludedDataFetcher); - QString currentMissionId = ui.cbMissionDataCombine->currentData().value(); - QString currentExcludedId = currentExcludedDataFetcher->data(Qt::UserRole).value(); - missionStrategyUtil->insertToMissionToDataFetchers(currentMissionId, currentExcludedId); - }); - connect(ui.tbMissionDataCombineRemove, &QAbstractButton::clicked, this, [=]() { - auto currentIncludedDataFetcher = ui.lwMissionDataCombineIncluded - ->takeItem(ui.lwMissionDataCombineIncluded->currentRow()); - ui.lwMissionDataCombineExcluded->addItem(currentIncludedDataFetcher); - QString currentMissionId = ui.cbMissionDataCombine->currentData().value(); - QString currentIncludedId = currentIncludedDataFetcher->data(Qt::UserRole).value(); - missionStrategyUtil->removeFromMissionToDataFetchers(currentMissionId, currentIncludedId); - }); - connect(ui.pbMissionDataCombineReset, &QAbstractButton::clicked, this, [=]() { - QString currentMissionId = ui.cbMissionDataCombine->currentData().value(); - missionStrategyUtil->updateMissionToDataFetchers(currentMissionId, - missionStrategyUtil->missionIdToObject[currentMissionId]->defaultDataFetchers()); - - setMissionDataCombineListWidgetData(missionStrategyUtil->missionToDataFetchers()[currentMissionId]); - }); -} - -void SettingDialog::setMissionDataCombineListWidgetData(QSet includedDataFetchers) -{ - // Included - ui.lwMissionDataCombineIncluded->clear(); - for (const QString& dataFetcherId : includedDataFetchers) { - BaseDataFetcher* currentDataFetcher = dataFetcherUtil->dataFetcherMap[dataFetcherId]; - QListWidgetItem* newItem = new QListWidgetItem(currentDataFetcher->getDisplayName(), ui.lwMissionDataCombineIncluded); - newItem->setData(Qt::UserRole, dataFetcherId); - ui.lwMissionDataCombineIncluded->addItem(newItem); - } - // Excluded - ui.lwMissionDataCombineExcluded->clear(); - QList excludedDataFetchers = {}; - for (auto fetcher : dataFetcherUtil->dataFetchers) { - if (!includedDataFetchers.contains(fetcher->id())) { - excludedDataFetchers.append(fetcher->id()); - } - } - for (QString& dataFetcherId : excludedDataFetchers) { - BaseDataFetcher* currentDataFetcher = dataFetcherUtil->dataFetcherMap[dataFetcherId]; - QListWidgetItem* newItem = new QListWidgetItem(currentDataFetcher->getDisplayName(), ui.lwMissionDataCombineExcluded); - newItem->setData(Qt::UserRole, dataFetcherId); - ui.lwMissionDataCombineExcluded->addItem(newItem); - } -} - // 计时器设置 void SettingDialog::initTimerSettings() { @@ -368,11 +257,6 @@ void SettingDialog::initTimerSettings() connect(ui.sbTimerUpdateInterval, &QSpinBox::valueChanged, this, [=](int value) { globalData->setTimerUpdateInterval(value); }); - // 自动计时刷新间隔 - ui.sbAutoTimerUpdateInterval->setValue(globalData->autoTimerUpdateInterval()); - connect(ui.sbAutoTimerUpdateInterval, &QSpinBox::valueChanged, this, [=](int value) { - globalData->setAutoTimerUpdateInterval(value); - }); // 停止计时器策略 { diff --git a/EliteSpeedrunTool/SettingDialog.h b/EliteSpeedrunTool/SettingDialog.h index e6f3528..ceb384c 100644 --- a/EliteSpeedrunTool/SettingDialog.h +++ b/EliteSpeedrunTool/SettingDialog.h @@ -11,22 +11,20 @@ class SettingDialog : public QDialog { explicit SettingDialog(QWidget* parent = nullptr); ~SettingDialog(); - QString pageName[9] = { + QString pageName[8] = { tr("常规"), tr("信息展示"), tr("断网"), - tr("任务信息"), tr("计时器"), tr("结束游戏"), tr("社交"), tr("语言"), tr("开发者选项"), }; - QString pageIcon[9] = { + QString pageIcon[8] = { "://image/ic_setting.ico", "://image/ic_lighton.ico", "://image/ic_network.ico", - "://image/ic_spy.ico", "://image/ic_clock.ico", "://image/ic_plug.ico", "://image/ic_users.ico", @@ -37,19 +35,13 @@ class SettingDialog : public QDialog { protected: void initGeneralSettings(); - void initTabEnabled(); - QString getSoundFile(QString dir = QString()); int currentSubFunctionIndex = 0; - DisplayInfoSubFunction currentSubFunction = DisplayInfoSubFunction::Headshot; + DisplayInfoSubFunction currentSubFunction = DisplayInfoSubFunction::Timer; void initFirewallSettings(); - void initMissionDataSettings(); - - void setMissionDataCombineListWidgetData(QSet includedDataFetchers); - void initTimerSettings(); void initDisplayInfoSettings(); diff --git a/EliteSpeedrunTool/SettingDialog.ui b/EliteSpeedrunTool/SettingDialog.ui index 562a896..966b0ae 100644 --- a/EliteSpeedrunTool/SettingDialog.ui +++ b/EliteSpeedrunTool/SettingDialog.ui @@ -46,7 +46,7 @@ QFrame::Sunken
- 3 + 2 @@ -971,418 +971,6 @@ C:\Program Files (x86)\nn\nn.exe
- - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - - 常规 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - true - - - - - 0 - 0 - 443 - 459 - - - - - - - 刷新间隔 - - - - - - - - 5 - - - 1000 - - - - - - - - 0 - 0 - - - - ms - - - - - - - - - 建议设置为 50-200 之间,配置低的用户请适当增大数值 - - - true - - - - - - - - - - 数据名称 - - - - - - - - - 在下次更新任务数据时生效 - - - - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - - - - - 数据组合 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - true - - - - - 0 - 0 - 443 - 459 - - - - - - - - - - 0 - 0 - - - - - 12 - - - - 任务 - - - - - - - - 12 - - - - - - - - - - 9 - - - - - - 0 - 0 - - - - - 12 - - - - - - - - - 12 - - - - 已包含 - - - Qt::AlignCenter - - - - - - - - 12 - - - - 未包含 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 12 - - - - - - - - - 12 - - - - 操作 - - - Qt::AlignCenter - - - - - - - QLayout::SetMaximumSize - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - 12 - - - - >> - - - - - - - - 0 - 0 - - - - - 12 - - - - << - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - 恢复默认 - - - - - - - - - 注:某些数据(例如“载具受损”)仅针对部分任务有效。若您在某些任务中发现所选的数据数值不正确,不用担心,这是很正常的事情。 - - - true - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - - - - - - @@ -1407,66 +995,11 @@ C:\Program Files (x86)\nn\nn.exe 0 0 - 433 - 565 + 447 + 488 - - - - 自动计时 - - - - - - 刷新间隔 - - - - - - - - 5 - - - 100 - - - - - - - - 0 - 0 - - - - ms - - - - - - - - - 建议设置为 10-50 之间,配置低的用户请适当增大数值 - - - true - - - - - - - - - diff --git a/EliteSpeedrunTool/en.ts b/EliteSpeedrunTool/en.ts index 71cd3f7..e5a31aa 100644 --- a/EliteSpeedrunTool/en.ts +++ b/EliteSpeedrunTool/en.ts @@ -5,11 +5,13 @@ AcknowledgementDialog + 致谢 Acknowledgement + 注:按名称字典序排序,不分先后。若您没有在致谢名单上发现您的名字,请联系作者,联系方式见“关于”页面。 Note: Listed in alphabetical order by name, with no particular ranking. If you don't see your name in the acknowledgements, please contact the authors. Contact information can be found on the "About" page. @@ -40,191 +42,49 @@ And to our unnamed/anonymous friends! - - Act1DeadCourierStrategy - - - 准备任务:亡命速递 - 亡命速递 - Dead Courier - - - - Act1ServerFarmStrategy - - - 准备任务:服务器群组 - 服务器群组 - Server Farm - - - - Act1SignalInterceptsStrategy - - - 准备任务:拦截信号 - 拦截信号 - Signal Intercepts - - - - Act2AvengerStrategy - - - 准备任务:复仇者 - Avenger - - - - Act2RescueUlpStrategy - - - 准备任务:营救 ULP - Rescue ULP - - - - Act2SalvageHardDrivesStrategy - - - 准备任务:抢救硬盘 - Salvage Hard Drives - - - - Act2SubmarineReconStrategy - - - 准备任务:潜水艇侦察 - Submarine Recon - - - - Act3AirDefensesStrategy - - - 准备任务:空中防御 - 空中防御 - Air Defenses - - - - Act3BarrageStrategy - - - 准备任务:巴拉杰 - 巴拉杰 - Barrage - - - - Act3EscortUlpStrategy - - - 准备任务:护送 ULP - 护送 ULP - Escort ULP - - - - Act3KhanjaliStrategy - - - 准备任务:可汗贾利 - 可汗贾利 - Khanjali - - - - Act3RescueAgent14Strategy - - - 准备任务:营救 14 号探员 - 营救 14 号探员 - Rescue Agent 14 - - - - CasinoBadBeatStrategy - - - 赌场 - 出奇制胜 - 出奇制胜 - Casino - Bad Beat - - - - CasinoHeistAggressiveStrategy - - - 名钻赌场豪劫:气势汹汹 - Casino Heist - Aggressive - - - - CasinoHeistEndStageStrategy - - - 名钻赌场豪劫(结算前) - 名钻赌场豪劫 - Casino Heist (Final stage) - - - - CasinoHeistSilentSneakyStrategy - - - 名钻赌场豪劫:隐迹潜踪 - Casino Heist - Silent & Sneaky - - - - CasinoHeistTheBigConStrategy - - - 名钻赌场豪劫:兵不厌诈 - Casino Heist - The Big Con - - DescriptionDialog + 工具说明 FAQ + 断网 Firewall - - - + - + + + 基本原理 Principle - + + 通过 Windows 防火墙阻止进程联网。 Block process from accessing the internet using Windows Firewall. - - - + + + 常见问题 FAQ - + + 1. 启动/停止热键能否相同? 答:可以相同。 @@ -243,47 +103,44 @@ Answer: Please refer to the instructions at the bottom of the "Settings - F Answer: Manually open the Windows Firewall page and delete all rules with the name "AutoFirewall". - - - - + + 注意事项 Important note - - - - 由于每次大更新后,GTA5 进程的内存布局可能会发生变化,因此在大更新后,此功能可能会失效,请及时更新最新版本。 - Due to potential changes in the memory structure of the GTA 5 process after major updates, this feature might become ineffective. It is advised to update to the latest version promptly after each major update. - - - + + 计时 Manual timing + 计时基本原理 Timing principle + 启动时记录当前时间,每隔一个“刷新间隔”便会计算当前时间与开始时间的差值,差值即为计时时间。 When the timer is started, the current time is recorded. Every "Refresh data interval", the difference between the current time and the start time is calculated, and this difference becomes the elapsed time. + 停止归零策略基本原理 Stop and reset strategy principle + 使用状态机实现,状态机维护了当前计时器的状态。指定不同的停止归零策略代表连通/断开状态机的部分有向边。 Implemented using a state machine, which maintains the current state of the timer. Specifying different stop and reset strategies involves establishing or disconnecting partial directed edges on the state machine. + 1. 启动/停止计时的热键能否相同? 答:可以。 @@ -294,63 +151,10 @@ Answer: Yes, they can be the same. 2. Why is it possible to use the same hotkeys for starting/stopping the timer, while the hotkeys for pausing/resuming cannot be the same as the previous ones? Answer: If they are the same, they wouldn't distinguish the intended actions to be taken. - - - - 自动计时 - Auto-timing - - - - 在任务中,游戏只会记录开始时间和结束时间,因此自动计时功能在检测到任务开始后实时显示秒数是工具自行实现的,游戏内并没有实时的时间。 - -为了减小误差,当游戏中暂停计时时,工具会读取游戏的内存,使用游戏内的时间来校正工具自动计时的时间。 - In the mission, the game only records the start and end times. Therefore, the tool independently implements the real-time display of seconds after detecting the mission's start, as the game itself does not provide real-time in-game time. - -To reduce errors, when the timer is paused within the game, the tool reads the game's memory and utilizes the in-game time to correct the automatic timer maintained by the tool. - - - - 1. 为什么一定要在任务开始前计时呢? -答:由于游戏是从 R 星服务器获取的当前时间,而经过测试发现,R 星服务器的时间与标准的 UTC+3 时间差了大约一分半,因此工具没有办法获取到带有相同误差的当前时间。此外,由于自动计时实现复杂,实现此功能工作量大,因此只能在任务开始时计时。 - -2. 是否要在每次任务结束后重启自动计时呢? -答:不需要。它会自动识别下一个任务的时间。 - 1. Why is it necessary to start the timer before the mission begins? -Answer: This is because the game retrieves the current time from the Rockstar server, and testing has revealed that the time on the Rockstar server is approximately one and a half minutes ahead of standard UTC+3 time. As a result, the tool cannot obtain the current time with the same margin of error. Additionally, due to the complexity of implementing automatic timing, it requires significant effort, so timing can only occur at the start of the task. - -2. Should the automatic timer be restarted after each mission? -Answer: No, it is not necessary. It will automatically recognize the time for the next mission. - - - - 任务数据 - Mission data - - - - GTA5 进程内存储了任务中的部分数据,因此只需读取 GTA5 进程的内存即可得到相关数据。 - -由于不同任务达成精英的条件不同,因此工具可以根据当前的任务来选择显示的数据。 - GTA5 stores certain data related to missions in its process memory, allowing the tool to retrieve relevant information by reading the GTA5 process memory. - -Since the criteria for achieving elite challenge vary for different missions, the tool can dynamically select and display data based on the current mission in progress. - - - - 1. 每次结束任务后是否需要重启数据监视? -答:不需要。数据监视功能每隔一个“刷新间隔”便会去读取内存的数据,当重新开始任务后,会自动显示最新数据。 - -2. 为什么在某些情况下数据会出现奇怪的值? -答:一般这种情况发生在任务还没正式开始前或者是正式结束后,在这时,原来存放数据的那部分内存空间会被存放其他数据,因此,显示的数据没有意义。 - 1. Is it necessary to restart data monitoring after completing each mission? -Answer: No, it is not necessary. The data monitoring function reads the memory data at regular intervals, and when a new mission begins, it automatically displays the latest data. - -2. Why do strange values appear in the data under certain circumstances? -Answer: This typically happens before a mission has fully started or after it has completely ended. During these times, the portion of memory where the data is stored may be overwritten with other data, rendering the displayed information meaningless. + 在本机启动了一个 HTTP 服务器,通过 WebSocket 实时向其他终端传输最新数据。您可以通过浏览器或其他方式来显示数据。 A local HTTP server has been established, utilizing WebSocket to transmit real-time updates to other clients. Data visualization can be achieved through a web browser or other methods. @@ -369,163 +173,47 @@ Answer: Yes, you can. You can develop your own WebSocket client to receive real- - 恶意值 - Badsport - - - - 游戏内有一个存储恶意值的单浮点变量,只需要获取该变量的值,即可得知恶意值。 - In the game, there is a single floating-point variable that stores the badsport value. It is only necessary to retrieve the value of this variable. - - - - 1. 为什么恶意值不能实时更新? -答:由于实时更新会浪费计算机性能,并且对于恶意值的需求也不是实时的,因此用户手动刷新恶意值即可。 - Why can't badsport value be updated in real-time? -Answer: Real-time updates would consume computer resources unnecessarily, and the demand for real-time updates on badsport value is not critical. Therefore, users can manually refresh badsport value as needed to avoid wasting computing power. - - - + 结束游戏 Terminate game + 调用系统 API TerminateProcess 或 taskkill 命令来结束 GTA5 进程。 Call the system API TerminateProcess or execute the taskkill command to terminate the GTA5 process. + 请在使用该功能前先测试一下是否能成功结束游戏。 Please test whether the game can be successfully terminated before using it. - + + 多端显示 Multi-platform display + + + 1. 队友能否不开启本软件,通过网络直接访问本机(本工具)数据? +答:理论上可以,但不推荐。若您的计算机处于内网环境,您可以在路由器上配置端口映射,让队友使用公网 IP 和设定的端口访���本机。但不建议这样做,因为网络传输有一定的延迟,本地最新的数据传输到队友端可能需要一段时间,队友体验不佳。此外,这样做还可能会带来安全风险。 + +2. 不喜欢默认的网页显示布局,能否自行编写浏览器前端页面/客户端来显示数据? +答:可以。您可以开启自己的 WebSocket 客户端,用来接收实时数据,然后通过自己喜欢的方式显示数据。 + + DisplayInfoDialog + 信息展示 Display Info - - EmptyStrategy - - - 未收录的任务 - 不在支持的任务中... - Unknown mission - - - - FleecaJobKurumaStrategy - - - 全福银行差事:骷髅马 - Fleeca Job - Kuruma - - - - FleecaJobScopeOutStrategy - - - 全福银行差事:探查 - Fleeca Job - Scope Out - - - - HeadshotFetcher - - - 总爆头 - Total headshots - - - - HumaneRaidDeliverEmpStrategy - - - 突袭人道研究实验室:运送电磁脉冲装置 - Humane Raid - Deliver EMP - - - - HumaneRaidEmpStrategy - - - 突袭人道研究实验室:电磁脉冲装置 - Humane Raid - EMP - - - - HumaneRaidInsurgentsStrategy - - - 突袭人道研究实验室:叛乱分子 - Humane Raid - Insurgents - - - - HumaneRaidKeyCodesStrategy - - - 突袭人道研究实验室:关键密码 - Humane Raid - Key Codes - - - - HumaneRaidValkyrieStrategy - - - 突袭人道研究实验室:女武神 - Humane Raid - Valkyrie - - - - Kill1Fetcher - - - 击杀(小队 1) - Kills (Team 1) - - - - Kill2Fetcher - - - 击杀(小队 2) - Kills (Team 2) - - - - Kill3Fetcher - - - 击杀(小队 3) - Kills (Team 3) - - - - Kill4Fetcher - - - 击杀(小队 4) - Kills (Team 4) - - - - KillFetcher - - - 总击杀 - Total kills - - LanguageUtil @@ -534,28 +222,23 @@ Answer: Real-time updates would consume computer resources unnecessarily, and th Follow System - - LostMcRipStrategy - - - 安息吧!失落摩托帮 - Lost MC RIP - - MainWindow + 断网 Firewall + 播放提示音 Play sound + 代言人:Adstargod 星神断网,好用没烦恼 😋 @@ -565,13 +248,15 @@ AdstarGod Firewall, easy to use + Windows 防火墙未启用,无法使用断网功能! Windows Firewall is not enabled, and the network disconnection feature cannot be used! - + + 点击启动 Start counting @@ -580,264 +265,247 @@ AdstarGod Firewall, easy to use + 点击暂停 Click to pause - + + 立即结束游戏 Terminate the game + 帮助(&H) &Help + 工具(&T) &Tool + 视图(&V) &View + 信息展示 Display info + 多端显示 Multi-platform display + 爱发电... Ai Fa Dian... + Buy Me A Coffee... + 支付宝... Alipay... - + + 代言人 Spokesperson + 防火墙状态 Firewall status + Domain + 专用 Private + 公用 Public + 注意:公用网络防火墙未开启,请先测试断网是否有效 注意:公共网络防火墙未开启,请先测试断网是否有效 Note: The public type firewall is not turned on, please test whether the disconnection is effective + 计时 Manual timing - - 自动计时 - Auto-timing - - - - 注:请在任务开始前开始监控,否则数据不准确 - Note: Please start monitoring before the mission begins, otherwise the data may be inaccurate - - - - - 开始监控 - Start monitoring - - - - 停止并重置 - Stop and reset - - - - 数据 - Data - - - - 未开始监控 - 未在监控 - Monitor has not started - - - - 恶意值 - Badsport - - - - 未查询 - No query - - - - 注意:当恶意值达到 50,你会成为恶意玩家! - Note: When badsport reaches 50, you will become a bad player! - - - - 此功能由 Zerkalo2147 提供 - This feature is provided by Zerkalo2147 - - - - 刷新恶意值 - Refresh Badsport - - - + + 结束游戏 Terminate game + 赞助(&S) &Sponsor + 检查更新... Check for update... + 工具说明... 说明... FAQ... + 致谢... 鸣谢... Acknowledgment... + 关于 Qt... About Qt... - + + 警告 Warning + 打开系统设置... 打开系统设置 Open system settings... + 刷新 Refresh - + + 关于本软件... About... + 访问 GitHub 仓库... GitHub... + 设置(&S)... &Setting... + Ctrl+P + 查看日志... Open log file... + 打开日志文件夹... Open log dir... - + + 复制地址 Copy link + 运行 Run + 在浏览器中打开... Open in browser... + 退出(&X) E&xit + 显示(&D)... 显示(&S)... &Display... + 显示... Show... + 可拖动 Moveable + 帮助我们进行翻译... Help us translate... @@ -869,7 +537,7 @@ AdstarGod Firewall, easy to use Server address has been copied! - + 点击归零 Click to Zero @@ -884,7 +552,7 @@ AdstarGod Firewall, easy to use Click to continue - + 注册启用防火墙热键失败! 注册防火墙启动热键失败! Failed to register enable firewall hotkeys! @@ -925,12 +593,12 @@ AdstarGod Firewall, easy to use Failed to register the termination game hotkey! - + 支付宝收款二维码 谢谢喵! Alipay payment QR code. Thank you! - + 加入 Telegram 群组一起划水~ Join Telegram group~ @@ -941,9 +609,9 @@ AdstarGod Firewall, easy to use - <p>一个 GTAOL 精英、速通工具,支持快速启动防火墙、自动统计任务数据、计时等。本工具仅读取内存,不会修改任何内存。</p> - 特别感谢 <b>ACT3 帮会</b>对本工具的宣传和支持。特别感谢 <b>CZ9946 和 Adstargod</b> 两位大佬,他们对本工具的研发提供了大量的帮助! - <p>A GTA Online elite and speedrun tool that supports quick firewall activation, automatic mission data tracking, timing, etc. This tool only reads memory and does not modify any memory.</p> + <p>一个 GTAOL 精英、速通工具,支持快速启动防火墙、计时、结束游戏等。</p> + <p>一个 GTAOL 精英、速通工具,支持快速启动防火墙、自动统计任务数据、计时等。本工具仅读取内存,不会修改任何内存。</p> + <p>A GTA Online elite and speedrun tool that supports quick firewall activation, timing, terminate game, etc.</p> @@ -961,86 +629,6 @@ AdstarGod Firewall, easy to use Join QQ Group: 431228020 - - MissionHashFetcher - - - 任务 ID - Mission ID - - - - PacificStandardBikesStrategy - - - 太平洋标准银行差事:摩托车 - Pacific Standard - Bikes - - - - PacificStandardConvoyStrategy - - - 太平洋标准银行差事:车队 - Pacific Standard - Convoy - - - - PacificStandardHackStrategy - - - 太平洋标准银行差事:破解 - Pacific Standard - Hack - - - - PacificStandardSignalStrategy - - - 太平洋标准银行差事:信号 - Pacific Standard - Signal - - - - PacificStandardVansStrategy - - - 太平洋标准银行差事:厢型车 - Pacific Standard - Vans - - - - PrisonBreakBusStrategy - - - 越狱:巴士 - Prison Break - Bus - - - - PrisonBreakPlaneStrategy - - - 越狱:飞机 - Prison Break - Plane - - - - PrisonBreakStationStrategy - - - 越狱:警察局 - Prison Break - Station - - - - PrisonBreakWetWorkStrategy - - - 越狱:行刺 - Prison Break - Wet Work - - QObject @@ -1059,43 +647,12 @@ AdstarGod Firewall, easy to use 断网 Firewall - - - 总爆头 - 爆头 - Total headshots - 计时 计时器 Manual timing - - - 自动计时 - Auto-timing - - - - 车损 - Vehicle damage - - - - 拉什科夫斯基受伤 - Rashkovsky hurt - - - - 总击杀 - Total kills - - - - 机损 - Airplane damage - 停止后时间不归零 @@ -1128,167 +685,124 @@ AdstarGod Firewall, easy to use Don't show data name - - RashkovskyHurtFetcher - - - 拉什科夫斯基受伤 - Rashkovsky hurt - - - - SeriesABikersStrategy - - - 首轮募资:摩托车手 - Series A - Bikers - - - - SeriesACokeStrategy - - - 首轮募资:可卡因 - Series A - Coke - - - - SeriesAFundingStrategy - - - 首轮募资 - Series A Funding - - - - SeriesAStealMethStrategy - - - 首轮募资:窃取冰毒 - Series A - Steal Meth - - - - SeriesATrashTruckStrategy - - - 首轮募资:垃圾车 - Series A - Trash Truck - - - - SeriesAWeedStrategy - - - 首轮募资:大麻 - Series A - Weed - - SettingDialog + 设置 Settings + windowsvista 样式不支持深色模式,其他样式支持深色模式跟随系统 windowsvista style does not support dark mode, while other styles support dark mode following the system - + + + 启动 Enable - - + + + + 停止 Disable - + + 音效 Sound + 默认值为出站,设置将在下次启动防火墙时生效。 The default value is outbound. The settings will take effect the next time the firewall is started. + 断网范围 Firewall scope + 说明 Tips + 填写要断网程序的路径,留空表示断全部。设置将在下次启动防火墙时生效。 填写要断网程序的路径,留空表示断全部。设置将在下次启动防火墙后生效。 Enter the path of the program you want to disconnect, leave it blank to disconnect all. The settings will take effect after the next firewall startup. + 加速器 (UU 用户必看) Game network agent + 防火墙规则方向 Firewall rule direction - - 建议设置为 50-200 之间,配置低的用户请适当增大数值 - 建议设置为50-200之间,配置低的用户请适当增大数值 - Suggested setting is between 50 to 200. Users with lower computer performance should consider increasing the value accordingly - - - + + 计时器热键 Timer hotkeys + 暂停/恢复 Pause/resume - - - + + 刷新间隔 Refresh data interval - + + 窗口 Window + X 坐标 X + Y 坐标 Y + 宽度 Width + 高度 Height @@ -1296,128 +810,155 @@ AdstarGod Firewall, easy to use + + + 颜色 Color + 透明度 Alpha + 内容 Content + 最小化到托盘 Minimize to the system tray + 启动时自动检查更新 Automatically check for update on application startup + 外观样式 样式 Style + 选择要设置的功能 Select function + 注:该页设置仅针对所选的功能 <html><head/><body><p>注:该页设置仅针对所选的功能</p></body></html> NOTE: The settings on this page are only for the selected function + 在屏幕上显示 Display on screen + 字体 Font + 字号 Size + 文字阴影 Text shadow + 文字对齐 Text alignment + 断网热键 Firewall hotkey + 模糊半径 Blur radius + 偏移 Offset + 水平 Horizontal + 垂直 Vertical + 工具窗口(WS_EX_TOOLWINDOW) Tool window (WS_EX_TOOLWINDOW) + 启动音效 Start + 停止音效 Stop + 操作失败音效 Operation failed + 若您不了解断网原理,请留空! If you don't understand the principle, please leave it empty! + 若您想断整个系统的网络,则留空(建议);若您只想断 GTA 的网络,请选择 GTA5.exe 文件;若您想断加速器的网络,请选择加速器的应用程序文件。 If you want to disconnect the entire system's network, leave it empty (recommended); if you only want to disconnect GTA's network, choose the GTA5.exe file; if you want to disconnect the network agent's network, choose the network agent's application file. + 使用 UU 加速器的用户请填写 GTA5.exe 的完整路径,然后在 UU 内使用“路由模式”进行加速。 GTA5.exe 的完整路径例如: F:\Epic Games\GTAV\GTA5.exe @@ -1441,116 +982,76 @@ The path to the game network agent executable EXE file is for example: C:\Program Files (x86)\nn\nn.exe - - 数据名称 - Data name - - - - 在下次更新任务数据时生效 - It will take effect during the next update of mission data - - - - 数据组合 - Data combinations - - - - 任务 - Mission - - - - 已包含 - Included - - - - 未包含 - Not included - - - - 操作 - Ops - - - - 恢复默认 - Reset - - - - 注:某些数据(例如“载具受损”)仅针对部分任务有效。若您在某些任务中发现所选的数据数值不正确,不用担心,这是很正常的事情。 - 注:某些数据(例如“载具受损”)仅针对部分任务有效,当您在某些任务中发现所选的数据数值不正确,是很正常的事情。 - Note: Certain data (e.g. “Vehicle damage”) are only valid for some missions. Don't worry if you find that the selected data values are incorrect in some missions, this is normal. - - - - 自动计时 - Auto-timing - - - - + + 建议设置为 10-50 之间,配置低的用户请适当增大数值 建议设置为30-70之间,配置低的用户请适当增大数值 Suggested setting is between 10 to 50. Users with lower computer performance should consider increasing the value accordingly + 手动计时 Manual timing + 停止策略 Stop strategy + 建议在停止(归零)计时后再更改此项,以便首页按钮上的提示信息含义准确 It is recommended to change this item after stopping (zeroing) the timer so that the message on the home button is more accurate + 注:无论选择何种策略,从“暂停”状态到“停止”状态后计时器都会归零 注:无论选择何种策略,从”暂停“状态到”停止“状态后计时器都会归零 Note: The timer will be reset to zero after going from "Pause" to "Stop" no matter which strategy is selected + 结束游戏热键 Terminate game hotkey + 执行 Execute + Discord Discord + 注:Discord 会优先显示最先启动的游戏,因此请先启用该项设置再启动 GTA5 Note: Discord will prioritize displaying the game that was launched first. Therefore, please enable this setting before launching GTA 5 + 展示 Rich Presence Show Rich Presence + 切换语言后需重启才可生效 Application needs to be restarted after switching languages + 调试模式 Debug mode @@ -1561,12 +1062,12 @@ C:\Program Files (x86)\nn\nn.exe Display info - + 语言 Language - + 选择文件 Choice a sound @@ -1596,23 +1097,22 @@ C:\Program Files (x86)\nn\nn.exe Outbound - + 断网 Firewall - + 计时器 Timer - - + 常规 General - + 社交 Social @@ -1622,17 +1122,12 @@ C:\Program Files (x86)\nn\nn.exe Terminate game - - 任务信息 - Mission data - - - + 开发者选项 Developer options - + 左对齐 Left alignment @@ -1658,76 +1153,23 @@ C:\Program Files (x86)\nn\nn.exe Bottom alignment - - TheBogdanProblemStrategy - - - 波格丹危机 - The Bogdan Problem - - - - TheDataBreachesStrategy - - - 数据泄露 - The Data Breaches - - - - TheDoomsdayScenarioStrategy - - - 末日将至 - The Doomsday Scenario - - - - TheFleecaJobStrategy - - - 全福银行差事 - The Fleeca Job - - - - TheHumaneLabsRaidStrategy - - - 突袭人道研究实验室 - The Humane Labs Raid - - - - ThePacificStandardStrategy - - - 太平洋标准银行差事 - The Pacific Standard Job - - - - ThePrisonBreakStrategy - - - 越狱 - The Prison Break - - UpdateDialog + 检查更新 Check for update + 下载... Download... + 忽略此版本 Ignore this version @@ -1771,12 +1213,4 @@ Error message: %2 You are already using the latest version! - - VehicleDamageFetcher - - - 载具受损 - Vehicle damage - - diff --git a/EliteSpeedrunTool/html/DisplayInfo.css b/EliteSpeedrunTool/html/DisplayInfo.css index 1985d6c..a03a42f 100644 --- a/EliteSpeedrunTool/html/DisplayInfo.css +++ b/EliteSpeedrunTool/html/DisplayInfo.css @@ -1,8 +1,8 @@ -#missionData, #timerMinute, #timerSecond, #timerSpliter1, #autoTimerMinute, #autoTimerSecond, #autoTimerSpliter1 { +#timerMinute, #timerSecond, #timerSpliter1 { font-size:4rem; } -#timerMs, #timerSpliter2, #autoTimerMs, #autoTimerSpliter2 { +#timerMs, #timerSpliter2 { font-size:3rem; } @@ -13,10 +13,4 @@ div { p { margin:1rem; -} - -#missionData { - display: inline-block; - text-align: center; - width: 100%; } \ No newline at end of file diff --git a/EliteSpeedrunTool/html/DisplayInfo.html b/EliteSpeedrunTool/html/DisplayInfo.html index d349240..b46eae2 100644 --- a/EliteSpeedrunTool/html/DisplayInfo.html +++ b/EliteSpeedrunTool/html/DisplayInfo.html @@ -10,13 +10,6 @@

-

- 00 - : - 00 - . - 00 -
00 : @@ -24,9 +17,6 @@ . 00
-
- -

diff --git a/EliteSpeedrunTool/html/DisplayInfo.js b/EliteSpeedrunTool/html/DisplayInfo.js index d2b7f67..d402f34 100644 --- a/EliteSpeedrunTool/html/DisplayInfo.js +++ b/EliteSpeedrunTool/html/DisplayInfo.js @@ -4,10 +4,6 @@ var timerStartTime = null; var timer = null; var serverBrowserTimeDelta = 0; -var autoTimerStartTime = null; -var autoTimer = null; -var serverBrowserAutoTimeDelta = 0; - // 判断浏览器是否支持 WebSocket if ('WebSocket' in window) { websocket = new ReconnectingWebSocket("ws://" + document.domain + ":9976/", null, {maxReconnectAttempts: 10}); @@ -22,9 +18,6 @@ if ('WebSocket' in window) { } websocket.onmessage=function(msg){ var j = JSON.parse(msg.data); - if (j.hasOwnProperty('missionData')) { - document.getElementById("missionData").innerHTML = j.missionData; - } if (j.hasOwnProperty('timerState')) { if (j.timerState == 0x03) { // 归零然后开始 updateStarttedAndServerTimestamp(j); @@ -55,26 +48,6 @@ if ('WebSocket' in window) { document.getElementById("timerMs").innerHTML = "00"; } } - if (j.hasOwnProperty('autoTimerState')) { - if (j.autoTimerState == 0x02) { // 继续计时 - updateAutoStarttedAndServerTimestamp(j); - clearAutoTimerAndSetNull(); // 清空自动计时器 autoTimer - autoTimer = setInterval(function() { autoTimerFunc(autoTimerStartTime) }, 50); - } else if (j.autoTimerState == 0x03) { // 暂停计时 - updateAutoStarttedAndServerTimestamp(j); - clearAutoTimerAndSetNull(); // 清空自动计时器 autoTimer - if (j.hasOwnProperty('pausedAutoTimestamp')) { - updateAutoStarttedAndServerTimestamp(j); - autoTimerFunc(autoTimerStartTime, j.pausedAutoTimestamp, 0); // 更新暂停时间 - } - } else if (j.autoTimerState == 0x01) { // 归零 - clearAutoTimerAndSetNull(); // 清空自动计时器 autoTimer - autoTimerStartTime = null; - document.getElementById("autoTimerMinute").innerHTML = "00"; - document.getElementById("autoTimerSecond").innerHTML = "00"; - document.getElementById("autoTimerMs").innerHTML = "00"; - } - } } // 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。 window.onbeforeunload = function () { @@ -97,16 +70,6 @@ function timerFunc(timerStartTime, now = new Date(), sbTimeDelta = serverBrowser document.getElementById("timerMs").innerHTML = ms.toString().padStart(2, '0'); } -function autoTimerFunc(autoTimerStartTime, now = new Date(), sbAutoTimeDelta = serverBrowserAutoTimeDelta) { - var deltaTime = now - autoTimerStartTime + sbAutoTimeDelta; - var m = parseInt(deltaTime / 1000 / 60); - var s = parseInt(deltaTime / 1000) % 60; - var ms = parseInt((deltaTime % 1000) / 10); - document.getElementById("autoTimerMinute").innerHTML = m.toString().padStart(2, '0'); - document.getElementById("autoTimerSecond").innerHTML = s.toString().padStart(2, '0'); - document.getElementById("autoTimerMs").innerHTML = ms.toString().padStart(2, '0'); -} - // 清空计时器 timer function clearTimerAndSetNull() { if (timer != null) { @@ -115,14 +78,6 @@ function clearTimerAndSetNull() { } } -// 清空自动计时器 autoTimer -function clearAutoTimerAndSetNull() { - if (autoTimer != null) { - clearInterval(autoTimer); - autoTimer = null; - } -} - // 更新开始计时时间和服务器时间(与服务器的时间差) function updateStarttedAndServerTimestamp(json) { if (json.hasOwnProperty('starttedTimestamp')) { @@ -132,15 +87,4 @@ function updateStarttedAndServerTimestamp(json) { } timerStartTime = new Date(json.starttedTimestamp); // 与服务端矫正时间 } -} - -// 更新自动计时开始计时时间和服务器时间(与服务器的时间差) -function updateAutoStarttedAndServerTimestamp(json) { - if (json.hasOwnProperty('starttedAutoTimestamp')) { - if (json.hasOwnProperty('serverAutoTimestamp')) { - // 服务器与浏览器的时差 - serverBrowserAutoTimeDelta = json.serverAutoTimestamp - new Date(); - } - autoTimerStartTime = new Date(json.starttedAutoTimestamp); // 与服务端矫正时间 - } } \ No newline at end of file diff --git a/EliteSpeedrunTool/memoryutil/MemoryUtil.cpp b/EliteSpeedrunTool/memoryutil/MemoryUtil.cpp index 0331289..2278584 100644 --- a/EliteSpeedrunTool/memoryutil/MemoryUtil.cpp +++ b/EliteSpeedrunTool/memoryutil/MemoryUtil.cpp @@ -1,5 +1,4 @@ #include "MemoryUtil.h" -#include "FakeMemoryUtil.h" #include #include #include @@ -7,7 +6,6 @@ #include MemoryUtil* MemoryUtil::utilInstance = nullptr; -bool MemoryUtil::enableReadMemory = false; MemoryUtil::MemoryUtil() { @@ -18,38 +16,13 @@ MemoryUtil* MemoryUtil::instance() if (utilInstance != nullptr) { return utilInstance; } - if (enableReadMemory) { - utilInstance = new MemoryUtil(); - } else { - utilInstance = new FakeMemoryUtil(); - } + utilInstance = new MemoryUtil(); utilInstance->refresh(); return utilInstance; } void MemoryUtil::refresh() { - if (!enableReadMemory) { - return; - } - - // 不断刷新GTA进程的信息,防止先启动工具后启动游戏导致地址不正确 - initGlobalPtr(); - initMissionPtr(); - connect(gtaProcessTimer, &QTimer::timeout, this, [=]() { - initGlobalPtr(); - initMissionPtr(); - }); - gtaProcessTimer->start(15000); -} - -WINBOOL MemoryUtil::read(unsigned long long address, LPVOID buffer, SIZE_T size) -{ - DWORD pid; - HANDLE processHandle = getProcessHandle(&pid); - WINBOOL result = ReadProcessMemory(processHandle, (HMODULE)address, buffer, size, 0); - CloseHandle(processHandle); - return result; } HWND MemoryUtil::getWindowHwnd() @@ -63,215 +36,3 @@ HANDLE MemoryUtil::getProcessHandle(DWORD* pid, DWORD dwDesiredAccess) GetWindowThreadProcessId(hWindow, pid); // 获取进程id return OpenProcess(dwDesiredAccess, FALSE, *pid); // 打开进程 } - -HMODULE MemoryUtil::getProcessModuleHandle(DWORD pid, const TCHAR* moduleName) -{ - MODULEENTRY32 moduleEntry; - HANDLE handle = NULL; - handle = ::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid); // 获取进程快照中包含在th32ProcessID中指定的进程的所有的模块。 - if (!handle) { - CloseHandle(handle); - return NULL; - } - ZeroMemory(&moduleEntry, sizeof(MODULEENTRY32)); - moduleEntry.dwSize = sizeof(MODULEENTRY32); - if (!Module32First(handle, &moduleEntry)) { - CloseHandle(handle); - return NULL; - } - do { - if (_tcscmp(moduleEntry.szModule, moduleName) == 0) { - CloseHandle(handle); - return moduleEntry.hModule; - } - } while (Module32Next(handle, &moduleEntry)); - CloseHandle(handle); - return 0; -} - -unsigned long long MemoryUtil::findPattern(QString pattern) -{ - unsigned long long failedAddress = -1; - - auto tempArray = QList(); - for (auto&& each : pattern.split(' ')) { - if (each == "??") { - tempArray.append(0); - } else { - tempArray.append(each.toUInt(nullptr, 16)); - } - } - - auto patternByteArray = tempArray; - - DWORD pid; - HANDLE processHandle = getProcessHandle(&pid); - HMODULE mainModuleHandle = getProcessModuleHandle(pid, L"GTA5.exe"); - MODULEINFO moduleInfo; - if (!GetModuleInformation( - processHandle, - mainModuleHandle, - &moduleInfo, - sizeof(moduleInfo))) { - CloseHandle(processHandle); - return failedAddress; - } - DWORD moduleSize = moduleInfo.SizeOfImage; - if (moduleSize == 0) { - CloseHandle(processHandle); - return failedAddress; - } - - auto localModulebytes = new byte[moduleSize]; - ReadProcessMemory(processHandle, mainModuleHandle, localModulebytes, moduleSize, 0); - - for (unsigned long indexAfterBase = 0; indexAfterBase < moduleSize; indexAfterBase++) { - bool noMatch = false; - - if (localModulebytes[indexAfterBase] != patternByteArray.at(0)) - continue; - - for (int matchedIndex = 0; - matchedIndex < patternByteArray.count() && indexAfterBase + matchedIndex < moduleSize; - matchedIndex++) { - if (patternByteArray.at(matchedIndex) == 0x0) - continue; - if (patternByteArray.at(matchedIndex) != localModulebytes[indexAfterBase + matchedIndex]) { - noMatch = true; - break; - } - } - - if (!noMatch) { - CloseHandle(processHandle); - delete[] localModulebytes; - return (DWORD64)mainModuleHandle + indexAfterBase; - } - } - - CloseHandle(processHandle); - delete[] localModulebytes; - return failedAddress; -} - -unsigned long long MemoryUtil::rip37(unsigned long long address) -{ - int buffer; - read(address + 0x03, &buffer, 4); - return address + buffer + 0x07; -} - -bool MemoryUtil::initGlobalPtr() -{ - globalPtr = rip37(findPattern("4C 8D 05 ?? ?? ?? ?? 4D 8B 08 4D 85 C9 74 11")); - return globalPtr >= 0x10000 && globalPtr < 0x000F000000000000; -} - -void MemoryUtil::initMissionPtr() -{ - DWORD64 newMissionPtr = 0; - read(globalPtr - 0x120, &newMissionPtr, 8); - read(newMissionPtr + 0x1180, &newMissionPtr, 8); - if (newMissionPtr != missionPtr && newMissionPtr) { - missionPtr = newMissionPtr; - emit onMissionPtrChanged(); - } -} - -int MemoryUtil::getGlobalInt(int index) -{ - long long buffer; - read(globalPtr + (0x8 * (index >> 0x12 & 0x3F)), &buffer, 8); - int data; - read(buffer + (8 * (index & 0x3FFFF)), &data, 4); - return data; -} - -int MemoryUtil::getGlobalUInt(int index) -{ - long long buffer; - read(globalPtr + (0x8 * (index >> 0x12 & 0x3F)), &buffer, 8); - unsigned int data; - read(buffer + (8 * (index & 0x3FFFF)), &data, 4); - return data; -} - -long long MemoryUtil::getGlobalLongLong(int index) -{ - long long buffer; - read(globalPtr + (8 * (index >> 0x12 & 0x3F)), &buffer, 8); - long long data; - read(buffer + (8 * (index & 0x3FFFF)), &data, 8); - return data; -} - -unsigned long long MemoryUtil::getGlobalULongLong(int index) -{ - long long buffer; - read(globalPtr + (8 * (index >> 0x12 & 0x3F)), &buffer, 8); - unsigned long long data; - read(buffer + (8 * (index & 0x3FFFF)), &data, 8); - return data; -} - -float MemoryUtil::getGlobalFloat(int index) -{ - DWORD64 buffer; - read(globalPtr + (0x8 * (index >> 0x12 & 0x3F)), &buffer, 8); - float data; - read(buffer + (8 * (index & 0x3FFFF)), &data, 4); - return data; -} - -int MemoryUtil::getLocalInt(int index) -{ - int buffer; - read(missionPtr + (0x8 * index), &buffer, 4); - return buffer; -} - -unsigned int MemoryUtil::getLocalUInt(int index) -{ - unsigned int buffer; - read(missionPtr + (0x8 * index), &buffer, 4); - return buffer; -} - -long long MemoryUtil::getLocalLongLong(int index) -{ - long long buffer; - read(missionPtr + (0x8 * index), &buffer, 8); - return buffer; -} - -unsigned long long MemoryUtil::getLocalULongLong(int index) -{ - unsigned long long buffer; - read(missionPtr + (0x8 * index), &buffer, 8); - return buffer; -} - -float MemoryUtil::getLocalFloat(int index) -{ - DWORD64 buffer; - read(missionPtr + (0x8 * index), &buffer, 4); - return (float)buffer; -} - -bool MemoryUtil::getLocalBool(int index) -{ - DWORD64 buffer; - read(missionPtr + (0x8 * index), &buffer, 1); - return (bool)buffer; -} - -int MemoryUtil::getBadSport() -{ - DWORD64 buffer; - read(globalPtr - 0x120, &buffer, 8); - read(buffer + 0xDD8, &buffer, 8); - float badSport = 0; - read(buffer + 323 * 8, &badSport, 4); - qInfo() << "BadSport is" << badSport; - return badSport; -} diff --git a/EliteSpeedrunTool/memoryutil/MemoryUtil.h b/EliteSpeedrunTool/memoryutil/MemoryUtil.h index 6f63f91..823fff7 100644 --- a/EliteSpeedrunTool/memoryutil/MemoryUtil.h +++ b/EliteSpeedrunTool/memoryutil/MemoryUtil.h @@ -13,147 +13,14 @@ class MemoryUtil : public QObject { static MemoryUtil* instance(); - static bool enableReadMemory; - DWORD64 globalPtr = 0; DWORD64 missionPtr = 0; - const static int globalMissionHash = 4718592 + 127178; // 任务HASH - const static int globalSummaryTime = 2685444 + 6489; // 之前所有阶段耗费的时间总和 - const static int globalPrisonBreakSummaryTime = 2685444 + 6500; // 之前所有阶段耗费的时间总和 - // 变量的签名 - const static int localInMissionCanControl = 31694; // 是不是在任务中并且能够操控 - const static int localTime = 19746 + 987; // 任务每一段的时间 - const static int localPrisonBreakTime = 19746 + 990; // 越狱的逃离时间 - const static int localHeadshot = 19746 + 1740 + 1; // 总的爆头数 - const static int localKill1 = 19746 + 1725 + 1; // 房主击杀数/首轮北边击杀总和/M1击杀总和 - const static int localKill2 = 19746 + 1725 + 2; // 队友1击杀数/首轮南边击杀总和 - const static int localKill3 = 19746 + 1725 + 3; - const static int localKill4 = 19746 + 1725 + 4; - const static int localVehicleDamage = 24580 + 1231; // 车辆受损程度 - const static int localRashkovskyDamage = 24580 + 1230; // 拉什科夫斯基受伤程度 - const static int localHeadshotHost = 31621 + 1 + (0 * 292) + 85; // 房主爆头数 - const static int localHeadshotClient1 = 31621 + 1 + (1 * 292) + 85; // 队友1爆头数 - - // 结算页面的数据 - const static int globalTime = 2685444 + 3498 + 95; // 时间 - const static int globalPrisonBreakTime = 2685444 + 3498 + 107; // 越狱的逃离时间 - const static int globalHeadshot = 2685444 + 3498 + 115; // 总的爆头数 - const static int globalKill = 2685444 + 3498 + 111; // 总的击杀数 - const static int globalVehicleDamage = 2685444 + 3498 + 99; // 车辆受损程度 - const static int globalRashkovskyDamage = 2685444 + 3498 + 103; // 拉什科夫斯基受伤程度 - - const static int localInitTimestamp = 19746 + 985; // 开始计时时的时间戳 - const static int localInitPrisonBreakTimestamp = 19746 + 988; // 开始计时时的时间戳 - const static int localFlagInitTimer = 19746 + 985 + 1; // 是否开始计时,1开始,0暂停 - const static int localFlagInitPrisonBreakTimer = 19746 + 988 + 1; // 越狱逃离是否开始计时,1开始,0暂停 - - // 任务HASH - // ACT1 - inline const static unsigned long long hashTheDataBreaches = 1175383697; // 末日1分红 - inline const static unsigned long long hashAct1DeadCourier = 2310376779; // 准备任务:亡命速递 - inline const static unsigned long long hashAct1SignalIntercepts = 2988089418; // 准备任务:拦截信号 - inline const static unsigned long long hashAct1ServerFarm = 83978007; // 准备任务:服务器群组 - // ACT2 - inline const static unsigned long long hashTheBogdanProblem = 3883215059; // 末日2分红 - inline const static unsigned long long hashAct2Avenger = 1673641696; // 准备任务:复仇者 - inline const static unsigned long long hashAct2RescueUlp = 1549726198; // 准备任务:营救 ULP - inline const static unsigned long long hashAct2SalvageHardDrives = 1146411126; // 准备任务:抢救硬盘 - inline const static unsigned long long hashAct2SubmarineRecon = 1981951486; // 准备任务:潜水艇侦察 - // ACT3 - inline const static unsigned long long hashTheDoomsdayScenarioP1 = 3118746651; // 末日3分红前一段 - inline const static unsigned long long hashTheDoomsdayScenarioP2 = 4263845131; // 末日3分红后一段 - inline const static unsigned long long hashAct3RescueAgent14 = 1865386823; // 准备任务:营救 14 号探员 - inline const static unsigned long long hashAct3EscortUlp = 1374735669; // 准备任务:护送 ULP - inline const static unsigned long long hashAct3Barrage = 2643765252; // 准备任务:巴拉杰 - inline const static unsigned long long hashAct3Khanjali = 1579954143; // 准备任务:可汗贾利 - inline const static unsigned long long hashAct3AirDefenses = 4184233611; // 准备任务:空中防御 - // 全福 - inline const static unsigned long long hashFleecaJobScopeOut = 1771792820; // 全福探查 - inline const static unsigned long long hashFleecaJobKuruma = 3458614835; // 全福骷髅马 - inline const static unsigned long long hashTheFleecaJob = 3222096535; // 全福分红 - // 越狱 - inline const static unsigned long long hashPrisonBreakPlane = 793579785; // 越狱:飞机 - inline const static unsigned long long hashPrisonBreakBus = 2652883801; // 越狱:巴士 - inline const static unsigned long long hashPrisonBreakStation = 2569787839; // 越狱:警察局 - inline const static unsigned long long hashPrisonBreakWetWork = 842031918; // 越狱:行刺 - inline const static unsigned long long hashThePrisonBreak = 979654579; // 越狱分红 - // 人道 - inline const static unsigned long long hashHumaneRaidKeyCodes1 = 466825080; // 突袭人道研究实验室:关键密码1 - inline const static unsigned long long hashHumaneRaidKeyCodes2 = 3348094115; // 突袭人道研究实验室:关键密码2 - inline const static unsigned long long hashHumaneRaidInsurgents = 2039847454; // 突袭人道研究实验室:叛乱分子 - inline const static unsigned long long hashHumaneRaidEmp = 2136235844; // 突袭人道研究实验室:电磁脉冲装置 - inline const static unsigned long long hashHumaneRaidValkyrie = 1324253820; // 突袭人道研究实验室:女武神 - inline const static unsigned long long hashHumaneRaidDeliverEmp = 496643418; // 突袭人道研究实验室:运送电磁脉冲装置 - inline const static unsigned long long hashTheHumaneLabsRaid = 3197980642; // 突袭人道研究实验室 分红 - // 首轮 - inline const static unsigned long long hashSeriesACoke = 3704629663; // 首轮募资:可卡因 - inline const static unsigned long long hashSeriesATrashTruck = 1571421055; // 首轮募资:垃圾车 - inline const static unsigned long long hashSeriesABikers = 3664952125; // 首轮募资:摩托车手 - inline const static unsigned long long hashSeriesAWeed = 4280918227; // 首轮募资:大麻 - inline const static unsigned long long hashSeriesAStealMeth = 1585746186; // 首轮募资:窃取冰毒 - inline const static unsigned long long hashSeriesAFunding = 164435858; // 募资 分红 - // 太平洋 - inline const static unsigned long long hashThePacificStandardP1 = 4062993727; // 太平洋分红前一段 - inline const static unsigned long long hashThePacificStandardP2 = 1309288309; // 太平洋分红后一段 - inline const static unsigned long long hashPacificStandardVans = 3141270655; // 太平洋:厢型车 - inline const static unsigned long long hashPacificStandardSignal = 124038394; // 太平洋:信号 - inline const static unsigned long long hashPacificStandardHack = 2698675922; // 太平洋:破解 - inline const static unsigned long long hashPacificStandardConvoy = 1756125549; // 太平洋:车队 - inline const static unsigned long long hashPacificStandardBikes = 911181645; // 太平洋:摩托车 - // 赌场 - inline const static unsigned long long hashCasinoHeistAggressive1 = 14334224; // 赌场:气势汹汹 - inline const static unsigned long long hashCasinoHeistAggressive2 = 1142061386; // 赌场:气势汹汹 - inline const static unsigned long long hashCasinoHeistAggressive3 = 2648873158; // 赌场:气势汹汹 - inline const static unsigned long long hashCasinoHeistAggressive4 = 3081071674; // 赌场:气势汹汹 - inline const static unsigned long long hashCasinoHeistAggressive5 = 3554048209; // 赌场:气势汹汹 - inline const static unsigned long long hashCasinoHeistSilentSneaky1 = 2971240475; // 赌场:隐迹潜踪 - inline const static unsigned long long hashCasinoHeistSilentSneaky2 = 784080617; // 赌场:隐迹潜踪 - inline const static unsigned long long hashCasinoHeistSilentSneaky3 = 2305332202; // 赌场:隐迹潜踪 - inline const static unsigned long long hashCasinoHeistSilentSneaky4 = 2429084324; // 赌场:隐迹潜踪 - inline const static unsigned long long hashCasinoHeistTheBigCon1 = 3189252359; // 赌场:兵不厌诈 - inline const static unsigned long long hashCasinoHeistTheBigCon2 = 2453212730; // 赌场:兵不厌诈 - inline const static unsigned long long hashCasinoHeistTheBigCon3 = 3077120672; // 赌场:兵不厌诈 - inline const static unsigned long long hashCasinoHeistTheBigCon4 = 3528605896; // 赌场:兵不厌诈 - inline const static unsigned long long hashCasinoHeistEndStage = 2981742808; // 赌场。三个方式的最后阶段 - - inline const static unsigned long long hashLostMcRip = 2389264995; // 安息吧!失落摩托帮 - inline const static unsigned long long hashCasinoBadBeat = 2805392149; // 贝克女士:出奇制胜 - virtual HWND getWindowHwnd(); virtual HANDLE getProcessHandle(DWORD* pid, DWORD dwDesiredAccess = PROCESS_ALL_ACCESS); - virtual HMODULE getProcessModuleHandle(DWORD pid, CONST TCHAR* moduleName); - - virtual WINBOOL read(unsigned long long address, LPVOID buffer, SIZE_T size); - virtual unsigned long long findPattern(QString pattern); - virtual unsigned long long rip37(unsigned long long address); - - virtual bool initGlobalPtr(); - virtual void initMissionPtr(); - - virtual int getGlobalInt(int index); - virtual int getGlobalUInt(int index); - virtual long long getGlobalLongLong(int index); - virtual unsigned long long getGlobalULongLong(int index); - virtual float getGlobalFloat(int index); - - virtual int getLocalInt(int index); - virtual unsigned int getLocalUInt(int index); - virtual float getLocalFloat(int index); - virtual long long getLocalLongLong(int index); - virtual unsigned long long getLocalULongLong(int index); - virtual bool getLocalBool(int index); - - // 恶意值 - virtual int getBadSport(); virtual void refresh(); private: static MemoryUtil* utilInstance; - - QTimer* gtaProcessTimer = new QTimer(this); - -signals: - void onMissionPtrChanged(); };