Release v1.5.1.0
New Features: - Auto Show/Hide UI: New setting that automatically shows/hides the UI when entering/exiting Training Area Technical Changes: Architecture refactor; replaced coordinate arrays and magic numbers with enum-based system: - NEW: MenuSequences.h - Centralized sequence definitions with clean logic - REFACTORED: Types.h - Semantic enum structure mapping GW2 interface 1:1 (BOON_ALACRITY vs stepIndex == 13) - REFACTORED: AutomationLogic.cpp - Eliminated all magic numbers, unified healer logic - Improved maintainability - Enhanced readability: Self-documenting code with meaningful names like GOLEM_SLOW instead of array indices
This commit is contained in:
parent
54233f6ac1
commit
98c51aa098
11 changed files with 375 additions and 180 deletions
|
|
@ -2,18 +2,21 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "AutomationLogic.h"
|
#include "AutomationLogic.h"
|
||||||
#include "../Common/Globals.h"
|
#include "../Common/Globals.h"
|
||||||
|
#include "../Common/MenuSequences.h"
|
||||||
#include "CoordinateUtils.h"
|
#include "CoordinateUtils.h"
|
||||||
|
|
||||||
bool AutomationLogic::ShouldSkipBoonStep(int stepIndex) {
|
bool AutomationLogic::ShouldSkipBoonStep(int stepIndex) {
|
||||||
if (g_state.isQuickDps && stepIndex == 14) {
|
MenuOption step = MenuSequences::BOON_SEQUENCE[stepIndex];
|
||||||
|
|
||||||
|
if (g_state.isQuickDps && step == BOON_QUICKNESS) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.isAlacDps && (stepIndex == 13 || stepIndex == 18)) {
|
if (g_state.isAlacDps && step == BOON_ALACRITY) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.showBoonAdvanced && g_state.skipAegis && stepIndex == 10) {
|
if (g_state.showBoonAdvanced && g_state.skipAegis && step == BOON_AEGIS) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -25,15 +28,17 @@ bool AutomationLogic::ShouldSkipGolemStep(int stepIndex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.skipBurning && stepIndex == 7) {
|
MenuOption step = MenuSequences::GOLEM_SEQUENCE[stepIndex];
|
||||||
|
|
||||||
|
if (g_state.skipBurning && step == GOLEM_BURNING) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.skipConfusion && stepIndex == 8) {
|
if (g_state.skipConfusion && step == GOLEM_CONFUSION) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.skipSlow && stepIndex == 17) {
|
if (g_state.skipSlow && step == GOLEM_SLOW) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,10 +55,10 @@ void AutomationLogic::ApplyHealerBoons() {
|
||||||
|
|
||||||
std::string mode = "Healer Bench - ";
|
std::string mode = "Healer Bench - ";
|
||||||
if (g_state.isQuickDps) {
|
if (g_state.isQuickDps) {
|
||||||
mode += "Quick DPS (Healer provides Alacrity)";
|
mode += "Quick DPS";
|
||||||
}
|
}
|
||||||
else if (g_state.isAlacDps) {
|
else if (g_state.isAlacDps) {
|
||||||
mode += "Alac DPS (Healer provides Quickness)";
|
mode += "Alac DPS";
|
||||||
}
|
}
|
||||||
|
|
||||||
mode += " + Environment ";
|
mode += " + Environment ";
|
||||||
|
|
@ -71,27 +76,47 @@ void AutomationLogic::ApplyHealerBoons() {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
Sleep(g_state.initialDelay);
|
Sleep(g_state.initialDelay);
|
||||||
|
|
||||||
if (g_state.isQuickDps) {
|
bool alacrityCounted = false;
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < MenuSequences::HEALER_QUICK_LENGTH; i++) {
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.healerStepX[i], g_coords.healerStepY[i], g_state.stepDelay);
|
MenuOption step = MenuSequences::HEALER_QUICK_SEQUENCE[i];
|
||||||
|
|
||||||
|
if (g_state.isAlacDps && step == BOON_ALACRITY) {
|
||||||
|
if (!alacrityCounted) {
|
||||||
|
auto quicknessCoord = g_coords.coords.find(BOON_QUICKNESS);
|
||||||
|
if (quicknessCoord != g_coords.coords.end()) {
|
||||||
|
CoordinateUtils::ClickAtScaled(
|
||||||
|
quicknessCoord->second.first,
|
||||||
|
quicknessCoord->second.second,
|
||||||
|
g_state.stepDelay
|
||||||
|
);
|
||||||
|
}
|
||||||
|
alacrityCounted = true;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (g_state.isAlacDps) {
|
auto coordIt = g_coords.coords.find(step);
|
||||||
int alacStepY[9] = { 262, 352, 352, 305, 500, 450, 450, 305, 262 };
|
if (coordIt != g_coords.coords.end()) {
|
||||||
for (int i = 0; i < 9; i++) {
|
CoordinateUtils::ClickAtScaled(
|
||||||
CoordinateUtils::ClickAtScaled(830, alacStepY[i], g_state.stepDelay);
|
coordIt->second.first,
|
||||||
|
coordIt->second.second,
|
||||||
|
g_state.stepDelay
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int finalY;
|
MenuOption envDamageOption;
|
||||||
switch (g_state.envDamageLevel) {
|
switch (g_state.envDamageLevel) {
|
||||||
case ENV_MILD: finalY = 352; break;
|
case ENV_MILD: envDamageOption = BOON_ENV_MILD; break;
|
||||||
case ENV_MODERATE: finalY = 305; break;
|
case ENV_MODERATE: envDamageOption = BOON_ENV_MODERATE; break;
|
||||||
case ENV_EXTREME: finalY = 262; break;
|
case ENV_EXTREME: envDamageOption = BOON_ENV_EXTREME; break;
|
||||||
default: finalY = 352; break;
|
default: envDamageOption = BOON_ENV_MILD; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoordinateUtils::ClickAtScaled(830, finalY, 50);
|
auto envCoord = g_coords.coords.find(envDamageOption);
|
||||||
|
if (envCoord != g_coords.coords.end()) {
|
||||||
|
CoordinateUtils::ClickAtScaled(envCoord->second.first, envCoord->second.second, 50);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during healer boon sequence");
|
g_api->Log(ELogLevel_WARNING, "GolemHelper", "Exception during healer boon sequence");
|
||||||
|
|
@ -104,7 +129,7 @@ void AutomationLogic::ApplyHealerBoons() {
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Healer boon sequence completed!");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Healer boon sequence completed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutomationLogic::ApplyAllBoons() {
|
void AutomationLogic::ApplyBoons() {
|
||||||
if (!g_api || !g_state.enabled) return;
|
if (!g_api || !g_state.enabled) return;
|
||||||
|
|
||||||
if (g_state.environmentDamage) {
|
if (g_state.environmentDamage) {
|
||||||
|
|
@ -142,31 +167,54 @@ void AutomationLogic::ApplyAllBoons() {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
Sleep(g_state.initialDelay);
|
Sleep(g_state.initialDelay);
|
||||||
|
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < MenuSequences::BOON_LENGTH; i++) {
|
||||||
if (g_coords.boonStepX[i] == 0 && g_coords.boonStepY[i] == 0) {
|
int stepIndex = i;
|
||||||
|
MenuOption step = MenuSequences::BOON_SEQUENCE[i];
|
||||||
|
auto coordIt = g_coords.coords.find(step);
|
||||||
|
|
||||||
|
if (coordIt == g_coords.coords.end() ||
|
||||||
|
(coordIt->second.first == 0 && coordIt->second.second == 0)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShouldSkipBoonStep(i)) {
|
if (ShouldSkipBoonStep(stepIndex)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 9) {
|
if (step == BOON_RESOLUTION) {
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.boonStepX[i], g_coords.boonStepY[i], g_state.stepDelay);
|
CoordinateUtils::ClickAtScaled(
|
||||||
|
coordIt->second.first,
|
||||||
|
coordIt->second.second,
|
||||||
|
g_state.stepDelay
|
||||||
|
);
|
||||||
|
|
||||||
if (g_state.showBoonAdvanced && g_state.addResistance) {
|
if (g_state.showBoonAdvanced && g_state.addResistance) {
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.resistanceX, g_coords.resistanceY, g_state.stepDelay);
|
auto resistanceCoord = g_coords.coords.find(BOON_RESISTANCE);
|
||||||
|
if (resistanceCoord != g_coords.coords.end()) {
|
||||||
|
CoordinateUtils::ClickAtScaled(
|
||||||
|
resistanceCoord->second.first,
|
||||||
|
resistanceCoord->second.second,
|
||||||
|
g_state.stepDelay
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_state.showBoonAdvanced && g_state.addStability) {
|
if (g_state.showBoonAdvanced && g_state.addStability) {
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.stabilityX, g_coords.stabilityY, g_state.stepDelay);
|
auto stabilityCoord = g_coords.coords.find(BOON_STABILITY);
|
||||||
|
if (stabilityCoord != g_coords.coords.end()) {
|
||||||
|
CoordinateUtils::ClickAtScaled(
|
||||||
|
stabilityCoord->second.first,
|
||||||
|
stabilityCoord->second.second,
|
||||||
|
g_state.stepDelay
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int delay = (i == 19) ? 50 : g_state.stepDelay;
|
int delay = (i == MenuSequences::BOON_LENGTH - 1) ? 50 : g_state.stepDelay;
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.boonStepX[i], g_coords.boonStepY[i], delay);
|
CoordinateUtils::ClickAtScaled(coordIt->second.first, coordIt->second.second, delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
|
|
@ -180,7 +228,7 @@ void AutomationLogic::ApplyAllBoons() {
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "Boon sequence completed!");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "Boon sequence completed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutomationLogic::ApplyGolemSettings() {
|
void AutomationLogic::SpawnGolem() {
|
||||||
if (!g_api || !g_state.enabled) return;
|
if (!g_api || !g_state.enabled) return;
|
||||||
|
|
||||||
bool uiWasVisible = g_state.showUI;
|
bool uiWasVisible = g_state.showUI;
|
||||||
|
|
@ -212,49 +260,70 @@ void AutomationLogic::ApplyGolemSettings() {
|
||||||
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
|
||||||
Sleep(g_state.initialDelay);
|
Sleep(g_state.initialDelay);
|
||||||
|
|
||||||
for (int i = 0; i < 25; i++) {
|
for (int i = 0; i < MenuSequences::GOLEM_LENGTH; i++) {
|
||||||
if (g_coords.golemStepX[i] == 0 && g_coords.golemStepY[i] == 0) {
|
int stepIndex = i;
|
||||||
|
MenuOption step = MenuSequences::GOLEM_SEQUENCE[i];
|
||||||
|
auto coordIt = g_coords.coords.find(step);
|
||||||
|
|
||||||
|
if (coordIt == g_coords.coords.end() ||
|
||||||
|
(coordIt->second.first == 0 && coordIt->second.second == 0)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShouldSkipGolemStep(i)) {
|
if (ShouldSkipGolemStep(stepIndex)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int currentX = g_coords.golemStepX[i];
|
int currentX = coordIt->second.first;
|
||||||
int currentY = g_coords.golemStepY[i];
|
int currentY = coordIt->second.second;
|
||||||
|
|
||||||
if (i == 1) {
|
if (step == GOLEM_HITBOX_SMALL) {
|
||||||
|
MenuOption hitboxOption;
|
||||||
switch (g_state.hitboxType) {
|
switch (g_state.hitboxType) {
|
||||||
case HITBOX_SMALL:
|
case HITBOX_SMALL: hitboxOption = GOLEM_HITBOX_SMALL; break;
|
||||||
currentY = 260;
|
case HITBOX_MEDIUM: hitboxOption = GOLEM_HITBOX_MEDIUM; break;
|
||||||
break;
|
case HITBOX_LARGE: hitboxOption = GOLEM_HITBOX_LARGE; break;
|
||||||
case HITBOX_MEDIUM:
|
default: hitboxOption = GOLEM_HITBOX_SMALL; break;
|
||||||
currentY = 305;
|
}
|
||||||
break;
|
|
||||||
case HITBOX_LARGE:
|
auto hitboxCoord = g_coords.coords.find(hitboxOption);
|
||||||
currentY = 352;
|
if (hitboxCoord != g_coords.coords.end()) {
|
||||||
break;
|
currentX = hitboxCoord->second.first;
|
||||||
|
currentY = hitboxCoord->second.second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int delay = (i == 24) ? 50 : g_state.stepDelay;
|
int delay = (i == MenuSequences::GOLEM_LENGTH - 1) ? 50 : g_state.stepDelay;
|
||||||
|
|
||||||
if (i == 14) {
|
if (step == GOLEM_CRIPPLE) {
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
||||||
|
|
||||||
if (g_state.showAdvanced && g_state.addImmobilize) {
|
if (g_state.showAdvanced && g_state.addImmobilize) {
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.immobilizeX, g_coords.immobilizeY, g_state.stepDelay);
|
auto immobilizeCoord = g_coords.coords.find(GOLEM_IMMOBILIZE);
|
||||||
|
if (immobilizeCoord != g_coords.coords.end()) {
|
||||||
|
CoordinateUtils::ClickAtScaled(
|
||||||
|
immobilizeCoord->second.first,
|
||||||
|
immobilizeCoord->second.second,
|
||||||
|
g_state.stepDelay
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 16) {
|
if (step == GOLEM_COMBATAFFECTINGCONDITIONS) {
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
||||||
|
|
||||||
if (g_state.showAdvanced && g_state.addBlind) {
|
if (g_state.showAdvanced && g_state.addBlind) {
|
||||||
CoordinateUtils::ClickAtScaled(g_coords.blindX, g_coords.blindY, g_state.stepDelay);
|
auto blindCoord = g_coords.coords.find(GOLEM_BLIND);
|
||||||
|
if (blindCoord != g_coords.coords.end()) {
|
||||||
|
CoordinateUtils::ClickAtScaled(
|
||||||
|
blindCoord->second.first,
|
||||||
|
blindCoord->second.second,
|
||||||
|
g_state.stepDelay
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -262,7 +331,7 @@ void AutomationLogic::ApplyGolemSettings() {
|
||||||
|
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
|
||||||
|
|
||||||
if (g_state.showAdvanced && g_state.fiveBleedingStacks && i == 6) {
|
if (g_state.showAdvanced && g_state.fiveBleedingStacks && step == GOLEM_BLEEDING) {
|
||||||
for (int repeat = 0; repeat < 4; repeat++) {
|
for (int repeat = 0; repeat < 4; repeat++) {
|
||||||
CoordinateUtils::ClickAtScaled(currentX, currentY, g_state.stepDelay);
|
CoordinateUtils::ClickAtScaled(currentX, currentY, g_state.stepDelay);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ class AutomationLogic {
|
||||||
public:
|
public:
|
||||||
static bool ShouldSkipBoonStep(int stepIndex);
|
static bool ShouldSkipBoonStep(int stepIndex);
|
||||||
static bool ShouldSkipGolemStep(int stepIndex);
|
static bool ShouldSkipGolemStep(int stepIndex);
|
||||||
static void ApplyAllBoons();
|
static void ApplyBoons();
|
||||||
static void ApplyHealerBoons();
|
static void ApplyHealerBoons();
|
||||||
static void ApplyGolemSettings();
|
static void SpawnGolem();
|
||||||
};
|
};
|
||||||
73
GolemHelper/Common/MenuSequences.h
Normal file
73
GolemHelper/Common/MenuSequences.h
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
#pragma once
|
||||||
|
#include "Types.h"
|
||||||
|
|
||||||
|
class MenuSequences {
|
||||||
|
public:
|
||||||
|
static constexpr MenuOption BOON_SEQUENCE[20] = {
|
||||||
|
BOON_ADJUSTSELF,
|
||||||
|
BOON_ADDBOONS,
|
||||||
|
BOON_OFFENSIVE,
|
||||||
|
BOON_MIGHT,
|
||||||
|
BOON_25MIGHT,
|
||||||
|
BOON_FURY,
|
||||||
|
BOON_RETURN1,
|
||||||
|
BOON_DEFENSIVE,
|
||||||
|
BOON_PROTECTION,
|
||||||
|
BOON_RESOLUTION,
|
||||||
|
BOON_AEGIS,
|
||||||
|
BOON_RETURN2,
|
||||||
|
BOON_UTILITY,
|
||||||
|
BOON_ALACRITY,
|
||||||
|
BOON_QUICKNESS,
|
||||||
|
BOON_REGENERATION,
|
||||||
|
BOON_SWIFTNESS,
|
||||||
|
BOON_VIGOR,
|
||||||
|
BOON_ALACRITY,
|
||||||
|
BOON_EXIT
|
||||||
|
};
|
||||||
|
|
||||||
|
static constexpr MenuOption HEALER_QUICK_SEQUENCE[10] = {
|
||||||
|
BOON_ADJUSTSELF,
|
||||||
|
BOON_ADDBOONS,
|
||||||
|
BOON_UTILITY,
|
||||||
|
BOON_ALACRITY,
|
||||||
|
BOON_ALACRITY,
|
||||||
|
BOON_RETURN3,
|
||||||
|
BOON_RETURN4,
|
||||||
|
BOON_GOBACK,
|
||||||
|
BOON_ADJUSTENVIRONMENT,
|
||||||
|
BOON_TOGGLEPULSINGARENADAMAGEON
|
||||||
|
};
|
||||||
|
|
||||||
|
static constexpr MenuOption GOLEM_SEQUENCE[25] = {
|
||||||
|
GOLEM_SPAWNAGOLEM,
|
||||||
|
GOLEM_HITBOX_SMALL,
|
||||||
|
GOLEM_AVERAGEENEMY,
|
||||||
|
GOLEM_ADDITIONALOPTIONS,
|
||||||
|
GOLEM_ADDCONDITIONS,
|
||||||
|
GOLEM_DAMAGEOVERTIMECONDITIONS,
|
||||||
|
GOLEM_BLEEDING,
|
||||||
|
GOLEM_BURNING,
|
||||||
|
GOLEM_CONFUSION,
|
||||||
|
GOLEM_POISON,
|
||||||
|
GOLEM_TORMENT,
|
||||||
|
GOLEM_GOBACK1,
|
||||||
|
GOLEM_MOBILITYAFFECTINGCONDITIONS,
|
||||||
|
GOLEM_CHILL,
|
||||||
|
GOLEM_CRIPPLE,
|
||||||
|
GOLEM_GOBACK2,
|
||||||
|
GOLEM_COMBATAFFECTINGCONDITIONS,
|
||||||
|
GOLEM_SLOW,
|
||||||
|
GOLEM_VULNERABILITY,
|
||||||
|
GOLEM_25VULNERABILITY,
|
||||||
|
GOLEM_GOBACK3,
|
||||||
|
GOLEM_WEAKNESS,
|
||||||
|
GOLEM_GOBACK4,
|
||||||
|
GOLEM_GOBACK5,
|
||||||
|
GOLEM_PLEASESPAWNMYGOLEM
|
||||||
|
};
|
||||||
|
|
||||||
|
static constexpr int BOON_LENGTH = 20;
|
||||||
|
static constexpr int HEALER_QUICK_LENGTH = 10;
|
||||||
|
static constexpr int GOLEM_LENGTH = 25;
|
||||||
|
};
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "../Dependencies/mumble/mumble.h"
|
#include "../Dependencies/mumble/mumble.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
enum HitboxType {
|
enum HitboxType {
|
||||||
HITBOX_SMALL = 0,
|
HITBOX_SMALL = 0,
|
||||||
|
|
@ -15,6 +16,72 @@ enum EnvironmentDamageLevel {
|
||||||
ENV_EXTREME = 2
|
ENV_EXTREME = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum MenuOption {
|
||||||
|
// === BOON MENU ===
|
||||||
|
BOON_ADJUSTSELF,
|
||||||
|
BOON_ADDBOONS,
|
||||||
|
BOON_OFFENSIVE,
|
||||||
|
BOON_MIGHT,
|
||||||
|
BOON_25MIGHT,
|
||||||
|
BOON_FURY,
|
||||||
|
BOON_RETURN1,
|
||||||
|
BOON_DEFENSIVE,
|
||||||
|
BOON_PROTECTION,
|
||||||
|
BOON_RESOLUTION,
|
||||||
|
BOON_RESISTANCE,
|
||||||
|
BOON_STABILITY,
|
||||||
|
BOON_AEGIS,
|
||||||
|
BOON_RETURN2,
|
||||||
|
BOON_UTILITY,
|
||||||
|
BOON_ALACRITY,
|
||||||
|
BOON_QUICKNESS,
|
||||||
|
BOON_REGENERATION,
|
||||||
|
BOON_SWIFTNESS,
|
||||||
|
BOON_VIGOR,
|
||||||
|
BOON_EXIT,
|
||||||
|
|
||||||
|
// === HEALER EXTENSIONS ===
|
||||||
|
BOON_RETURN3,
|
||||||
|
BOON_RETURN4,
|
||||||
|
BOON_GOBACK,
|
||||||
|
BOON_ADJUSTENVIRONMENT,
|
||||||
|
BOON_TOGGLEPULSINGARENADAMAGEON,
|
||||||
|
BOON_ENV_MILD,
|
||||||
|
BOON_ENV_MODERATE,
|
||||||
|
BOON_ENV_EXTREME,
|
||||||
|
|
||||||
|
// === GOLEM MENU ===
|
||||||
|
GOLEM_SPAWNAGOLEM,
|
||||||
|
GOLEM_HITBOX_SMALL,
|
||||||
|
GOLEM_HITBOX_MEDIUM,
|
||||||
|
GOLEM_HITBOX_LARGE,
|
||||||
|
GOLEM_AVERAGEENEMY,
|
||||||
|
GOLEM_ADDITIONALOPTIONS,
|
||||||
|
GOLEM_ADDCONDITIONS,
|
||||||
|
GOLEM_DAMAGEOVERTIMECONDITIONS,
|
||||||
|
GOLEM_BLEEDING,
|
||||||
|
GOLEM_BURNING,
|
||||||
|
GOLEM_CONFUSION,
|
||||||
|
GOLEM_POISON,
|
||||||
|
GOLEM_TORMENT,
|
||||||
|
GOLEM_GOBACK1,
|
||||||
|
GOLEM_MOBILITYAFFECTINGCONDITIONS,
|
||||||
|
GOLEM_CHILL,
|
||||||
|
GOLEM_CRIPPLE,
|
||||||
|
GOLEM_IMMOBILIZE,
|
||||||
|
GOLEM_GOBACK2,
|
||||||
|
GOLEM_COMBATAFFECTINGCONDITIONS,
|
||||||
|
GOLEM_BLIND,
|
||||||
|
GOLEM_SLOW,
|
||||||
|
GOLEM_VULNERABILITY,
|
||||||
|
GOLEM_25VULNERABILITY,
|
||||||
|
GOLEM_GOBACK3,
|
||||||
|
GOLEM_WEAKNESS,
|
||||||
|
GOLEM_GOBACK4,
|
||||||
|
GOLEM_GOBACK5,
|
||||||
|
GOLEM_PLEASESPAWNMYGOLEM
|
||||||
|
};
|
||||||
|
|
||||||
struct GolemTemplate {
|
struct GolemTemplate {
|
||||||
std::string name;
|
std::string name;
|
||||||
bool isQuickDps;
|
bool isQuickDps;
|
||||||
|
|
@ -75,6 +142,7 @@ struct GolemHelperState {
|
||||||
bool addStability = false;
|
bool addStability = false;
|
||||||
bool skipAegis = false;
|
bool skipAegis = false;
|
||||||
bool alwaysHideIcon = false;
|
bool alwaysHideIcon = false;
|
||||||
|
bool autoShowHideUI = false;
|
||||||
int debugCounter = 0;
|
int debugCounter = 0;
|
||||||
|
|
||||||
int initialDelay = 390;
|
int initialDelay = 390;
|
||||||
|
|
@ -90,43 +158,69 @@ struct GolemHelperState {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MenuCoordinates {
|
struct MenuCoordinates {
|
||||||
int golemStepX[25] = {
|
std::map<MenuOption, std::pair<int, int>> coords = {
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
// === BOON MENU ===
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
{BOON_ADJUSTSELF, {830, 262}},
|
||||||
830, 830, 830, 830, 830
|
{BOON_ADDBOONS, {830, 354}},
|
||||||
|
{BOON_OFFENSIVE, {830, 262}},
|
||||||
|
{BOON_MIGHT, {830, 262}},
|
||||||
|
{BOON_25MIGHT, {830, 400}},
|
||||||
|
{BOON_FURY, {830, 305}},
|
||||||
|
{BOON_RETURN1, {830, 354}},
|
||||||
|
{BOON_DEFENSIVE, {830, 305}},
|
||||||
|
{BOON_PROTECTION, {830, 262}},
|
||||||
|
{BOON_RESOLUTION, {830, 305}},
|
||||||
|
{BOON_RESISTANCE, {830, 354}},
|
||||||
|
{BOON_STABILITY, {830, 400}},
|
||||||
|
{BOON_AEGIS, {830, 450}},
|
||||||
|
{BOON_RETURN2, {830, 500}},
|
||||||
|
{BOON_UTILITY, {830, 354}},
|
||||||
|
{BOON_ALACRITY, {830, 262}},
|
||||||
|
{BOON_QUICKNESS, {830, 305}},
|
||||||
|
{BOON_REGENERATION, {830, 354}},
|
||||||
|
{BOON_SWIFTNESS, {830, 400}},
|
||||||
|
{BOON_VIGOR, {830, 450}},
|
||||||
|
{BOON_EXIT, {830, 550}},
|
||||||
|
|
||||||
|
// === HEALER EXTENSIONS ===
|
||||||
|
{BOON_RETURN3, {830, 500}},
|
||||||
|
{BOON_RETURN4, {830, 450}},
|
||||||
|
{BOON_GOBACK, {830, 450}},
|
||||||
|
{BOON_ADJUSTENVIRONMENT, {830, 305}},
|
||||||
|
{BOON_TOGGLEPULSINGARENADAMAGEON, {830, 262}},
|
||||||
|
{BOON_ENV_MILD, {830, 352}},
|
||||||
|
{BOON_ENV_MODERATE, {830, 305}},
|
||||||
|
{BOON_ENV_EXTREME, {830, 262}},
|
||||||
|
|
||||||
|
// === GOLEM MENU ===
|
||||||
|
{GOLEM_SPAWNAGOLEM, {830, 260}},
|
||||||
|
{GOLEM_HITBOX_SMALL, {830, 260}},
|
||||||
|
{GOLEM_HITBOX_MEDIUM, {830, 305}},
|
||||||
|
{GOLEM_HITBOX_LARGE, {830, 352}},
|
||||||
|
{GOLEM_AVERAGEENEMY, {830, 306}},
|
||||||
|
{GOLEM_ADDITIONALOPTIONS, {830, 257}},
|
||||||
|
{GOLEM_ADDCONDITIONS, {830, 257}},
|
||||||
|
{GOLEM_DAMAGEOVERTIMECONDITIONS, {830, 306}},
|
||||||
|
{GOLEM_BLEEDING, {830, 257}},
|
||||||
|
{GOLEM_BURNING, {830, 306}},
|
||||||
|
{GOLEM_CONFUSION, {830, 352}},
|
||||||
|
{GOLEM_POISON, {830, 400}},
|
||||||
|
{GOLEM_TORMENT, {830, 454}},
|
||||||
|
{GOLEM_GOBACK1, {830, 508}},
|
||||||
|
{GOLEM_MOBILITYAFFECTINGCONDITIONS, {830, 352}},
|
||||||
|
{GOLEM_CHILL, {830, 257}},
|
||||||
|
{GOLEM_CRIPPLE, {830, 306}},
|
||||||
|
{GOLEM_IMMOBILIZE, {830, 400}},
|
||||||
|
{GOLEM_GOBACK2, {830, 454}},
|
||||||
|
{GOLEM_COMBATAFFECTINGCONDITIONS, {830, 400}},
|
||||||
|
{GOLEM_BLIND, {830, 260}},
|
||||||
|
{GOLEM_SLOW, {830, 306}},
|
||||||
|
{GOLEM_VULNERABILITY, {830, 352}},
|
||||||
|
{GOLEM_25VULNERABILITY, {830, 400}},
|
||||||
|
{GOLEM_GOBACK3, {830, 454}},
|
||||||
|
{GOLEM_WEAKNESS, {830, 400}},
|
||||||
|
{GOLEM_GOBACK4, {830, 454}},
|
||||||
|
{GOLEM_GOBACK5, {830, 454}},
|
||||||
|
{GOLEM_PLEASESPAWNMYGOLEM, {830, 548}}
|
||||||
};
|
};
|
||||||
|
|
||||||
int golemStepY[25] = {
|
|
||||||
260, 260, 306, 257, 257, 306, 257, 306, 352, 400,
|
|
||||||
454, 508, 352, 257, 306, 454, 400, 306, 352, 400,
|
|
||||||
454, 400, 454, 454, 548
|
|
||||||
};
|
|
||||||
|
|
||||||
int boonStepX[20] = {
|
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
|
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830
|
|
||||||
};
|
|
||||||
|
|
||||||
int boonStepY[20] = {
|
|
||||||
262, 354, 262, 262, 400, 305, 354, 305, 262, 305,
|
|
||||||
450, 500, 354, 262, 305, 354, 400, 450, 262, 550
|
|
||||||
};
|
|
||||||
|
|
||||||
int healerStepX[10] = {
|
|
||||||
830, 830, 830, 830, 830, 830, 830, 830, 830, 830
|
|
||||||
};
|
|
||||||
|
|
||||||
int healerStepY[10] = {
|
|
||||||
262, 352, 352, 262, 262, 500, 450, 450, 305, 262
|
|
||||||
};
|
|
||||||
|
|
||||||
int immobilizeX = 830;
|
|
||||||
int immobilizeY = 400;
|
|
||||||
int blindX = 830;
|
|
||||||
int blindY = 260;
|
|
||||||
|
|
||||||
int resistanceX = 830;
|
|
||||||
int resistanceY = 354;
|
|
||||||
int stabilityX = 830;
|
|
||||||
int stabilityY = 400;
|
|
||||||
};
|
};
|
||||||
|
|
@ -22,12 +22,15 @@ void ConfigManager::SaveCustomDelaySettings() {
|
||||||
configFile << "initialDelay=" << g_state.initialDelay << std::endl;
|
configFile << "initialDelay=" << g_state.initialDelay << std::endl;
|
||||||
configFile << "stepDelay=" << g_state.stepDelay << std::endl;
|
configFile << "stepDelay=" << g_state.stepDelay << std::endl;
|
||||||
configFile << "alwaysHideIcon=" << (g_state.alwaysHideIcon ? "1" : "0") << std::endl;
|
configFile << "alwaysHideIcon=" << (g_state.alwaysHideIcon ? "1" : "0") << std::endl;
|
||||||
|
configFile << "autoShowHideUI=" << (g_state.autoShowHideUI ? "1" : "0") << std::endl;
|
||||||
|
|
||||||
configFile.close();
|
configFile.close();
|
||||||
|
|
||||||
char logBuffer[300];
|
char logBuffer[350];
|
||||||
sprintf_s(logBuffer, "Settings saved: initialDelay=%dms, stepDelay=%dms, alwaysHideIcon=%s",
|
sprintf_s(logBuffer, "Settings saved: initialDelay=%dms, stepDelay=%dms, alwaysHideIcon=%s, autoShowHideUI=%s",
|
||||||
g_state.initialDelay, g_state.stepDelay, g_state.alwaysHideIcon ? "true" : "false");
|
g_state.initialDelay, g_state.stepDelay,
|
||||||
|
g_state.alwaysHideIcon ? "true" : "false",
|
||||||
|
g_state.autoShowHideUI ? "true" : "false");
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -73,13 +76,18 @@ void ConfigManager::LoadCustomDelaySettings() {
|
||||||
else if (key == "alwaysHideIcon") {
|
else if (key == "alwaysHideIcon") {
|
||||||
g_state.alwaysHideIcon = (value == "1");
|
g_state.alwaysHideIcon = (value == "1");
|
||||||
}
|
}
|
||||||
|
else if (key == "autoShowHideUI") {
|
||||||
|
g_state.autoShowHideUI = (value == "1");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configFile.close();
|
configFile.close();
|
||||||
|
|
||||||
char logBuffer[300];
|
char logBuffer[350];
|
||||||
sprintf_s(logBuffer, "Settings loaded: initialDelay=%dms, stepDelay=%dms, alwaysHideIcon=%s",
|
sprintf_s(logBuffer, "Settings loaded: initialDelay=%dms, stepDelay=%dms, alwaysHideIcon=%s, autoShowHideUI=%s",
|
||||||
g_state.initialDelay, g_state.stepDelay, g_state.alwaysHideIcon ? "true" : "false");
|
g_state.initialDelay, g_state.stepDelay,
|
||||||
|
g_state.alwaysHideIcon ? "true" : "false",
|
||||||
|
g_state.autoShowHideUI ? "true" : "false");
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
g_api->Log(ELogLevel_INFO, "GolemHelper", logBuffer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ void Load(AddonAPI* aApi) {
|
||||||
|
|
||||||
MapUtils::UpdateQuickAccessVisibility();
|
MapUtils::UpdateQuickAccessVisibility();
|
||||||
|
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.5.0.0 Loaded ===");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.5.1.0 Loaded ===");
|
||||||
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#00ff00>GolemHelper addon</c> loaded successfully!");
|
g_api->Log(ELogLevel_INFO, "GolemHelper", "<c=#00ff00>GolemHelper addon</c> loaded successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
|
||||||
def.Signature = -424248;
|
def.Signature = -424248;
|
||||||
def.APIVersion = NEXUS_API_VERSION;
|
def.APIVersion = NEXUS_API_VERSION;
|
||||||
def.Name = "GolemHelper";
|
def.Name = "GolemHelper";
|
||||||
def.Version = { 1, 5, 0, 0 };
|
def.Version = { 1, 5, 1, 0 };
|
||||||
def.Author = "Azrub";
|
def.Author = "Azrub";
|
||||||
def.Description = "Automates the process of setting optimal boon and golem configurations in the training area";
|
def.Description = "Automates the process of setting optimal boon and golem configurations in the training area";
|
||||||
def.Load = Load;
|
def.Load = Load;
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@
|
||||||
<ClInclude Include="Automation\AutomationLogic.h" />
|
<ClInclude Include="Automation\AutomationLogic.h" />
|
||||||
<ClInclude Include="Automation\CoordinateUtils.h" />
|
<ClInclude Include="Automation\CoordinateUtils.h" />
|
||||||
<ClInclude Include="Common\Globals.h" />
|
<ClInclude Include="Common\Globals.h" />
|
||||||
|
<ClInclude Include="Common\MenuSequences.h" />
|
||||||
<ClInclude Include="Common\Types.h" />
|
<ClInclude Include="Common\Types.h" />
|
||||||
<ClInclude Include="Config\ConfigManager.h" />
|
<ClInclude Include="Config\ConfigManager.h" />
|
||||||
<ClInclude Include="Config\TemplateManager.h" />
|
<ClInclude Include="Config\TemplateManager.h" />
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,9 @@
|
||||||
<ClInclude Include="Config\TemplateManager.h">
|
<ClInclude Include="Config\TemplateManager.h">
|
||||||
<Filter>Config</Filter>
|
<Filter>Config</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Common\MenuSequences.h">
|
||||||
|
<Filter>Common</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ void KeybindManager::RegisterKeybinds() {
|
||||||
|
|
||||||
Keybind kb_empty = { 0, false, false, false };
|
Keybind kb_empty = { 0, false, false, false };
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyBoons", HandleBoonKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyBoons", HandleBoonKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.ApplyGolem", HandleGolemKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.SpawnGolem", HandleGolemKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.QuickDPS", HandleQuickDpsKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.QuickDPS", HandleQuickDpsKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.AlacDPS", HandleAlacDpsKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.AlacDPS", HandleAlacDpsKeybind, kb_empty);
|
||||||
g_api->InputBinds.RegisterWithStruct("GolemHelper.Toggle", HandleToggleKeybind, kb_empty);
|
g_api->InputBinds.RegisterWithStruct("GolemHelper.Toggle", HandleToggleKeybind, kb_empty);
|
||||||
|
|
@ -22,7 +22,7 @@ void KeybindManager::UnregisterKeybinds() {
|
||||||
if (!g_api) return;
|
if (!g_api) return;
|
||||||
|
|
||||||
g_api->InputBinds.Deregister("GolemHelper.ApplyBoons");
|
g_api->InputBinds.Deregister("GolemHelper.ApplyBoons");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.ApplyGolem");
|
g_api->InputBinds.Deregister("GolemHelper.SpawnGolem");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.QuickDPS");
|
g_api->InputBinds.Deregister("GolemHelper.QuickDPS");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.AlacDPS");
|
g_api->InputBinds.Deregister("GolemHelper.AlacDPS");
|
||||||
g_api->InputBinds.Deregister("GolemHelper.Toggle");
|
g_api->InputBinds.Deregister("GolemHelper.Toggle");
|
||||||
|
|
@ -32,13 +32,13 @@ void KeybindManager::UnregisterKeybinds() {
|
||||||
|
|
||||||
void KeybindManager::HandleBoonKeybind(const char* id, bool release) {
|
void KeybindManager::HandleBoonKeybind(const char* id, bool release) {
|
||||||
if (!release && g_state.enabled) {
|
if (!release && g_state.enabled) {
|
||||||
AutomationLogic::ApplyAllBoons();
|
AutomationLogic::ApplyBoons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeybindManager::HandleGolemKeybind(const char* id, bool release) {
|
void KeybindManager::HandleGolemKeybind(const char* id, bool release) {
|
||||||
if (!release && g_state.enabled) {
|
if (!release && g_state.enabled) {
|
||||||
AutomationLogic::ApplyGolemSettings();
|
AutomationLogic::SpawnGolem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ void UIManager::RenderUI() {
|
||||||
|
|
||||||
if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
|
if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||||
|
|
||||||
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.5.0.0");
|
ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.5.1.0");
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
if (ImGui::BeginTabBar("GolemHelperTabs", ImGuiTabBarFlags_None)) {
|
if (ImGui::BeginTabBar("GolemHelperTabs", ImGuiTabBarFlags_None)) {
|
||||||
|
|
@ -164,7 +164,7 @@ void UIManager::RenderSettingsTab() {
|
||||||
|
|
||||||
if (ImGui::Button("Spawn Golem", ImVec2(150, 0))) {
|
if (ImGui::Button("Spawn Golem", ImVec2(150, 0))) {
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
||||||
g_api->InputBinds.Invoke("GolemHelper.ApplyGolem", false);
|
g_api->InputBinds.Invoke("GolemHelper.SpawnGolem", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@ void UIManager::RenderTemplatesTab() {
|
||||||
|
|
||||||
if (ImGui::Button("Spawn Golem", ImVec2(120, 30))) {
|
if (ImGui::Button("Spawn Golem", ImVec2(120, 30))) {
|
||||||
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
if (g_state.enabled && MapUtils::IsInTrainingArea()) {
|
||||||
g_api->InputBinds.Invoke("GolemHelper.ApplyGolem", false);
|
g_api->InputBinds.Invoke("GolemHelper.SpawnGolem", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -484,79 +484,12 @@ void UIManager::RenderOptions() {
|
||||||
MapUtils::UpdateQuickAccessVisibility();
|
MapUtils::UpdateQuickAccessVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Checkbox("Enable debug mode", &g_state.debugMode);
|
bool oldAutoShowHideUI = g_state.autoShowHideUI;
|
||||||
|
ImGui::Checkbox("Auto Show/Hide UI", &g_state.autoShowHideUI);
|
||||||
if (ImGui::Button("Reset all settings")) {
|
|
||||||
g_state.isQuickDps = false;
|
|
||||||
g_state.isAlacDps = false;
|
|
||||||
g_state.environmentDamage = false;
|
|
||||||
g_state.envDamageLevel = ENV_MILD;
|
|
||||||
g_state.skipBurning = false;
|
|
||||||
g_state.skipConfusion = false;
|
|
||||||
g_state.skipSlow = false;
|
|
||||||
g_state.addImmobilize = false;
|
|
||||||
g_state.addBlind = false;
|
|
||||||
g_state.fiveBleedingStacks = false;
|
|
||||||
g_state.hitboxType = HITBOX_SMALL;
|
|
||||||
g_state.showAdvanced = false;
|
|
||||||
g_state.showTimingSettings = false;
|
|
||||||
g_state.showBoonAdvanced = false;
|
|
||||||
g_state.addResistance = false;
|
|
||||||
g_state.addStability = false;
|
|
||||||
g_state.skipAegis = false;
|
|
||||||
g_state.stepDelay = 290;
|
|
||||||
g_state.initialDelay = 390;
|
|
||||||
g_state.alwaysHideIcon = false;
|
|
||||||
|
|
||||||
|
if (oldAutoShowHideUI != g_state.autoShowHideUI) {
|
||||||
ConfigManager::SaveCustomDelaySettings();
|
ConfigManager::SaveCustomDelaySettings();
|
||||||
MapUtils::UpdateQuickAccessVisibility();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Spacing();
|
ImGui::Checkbox("Enable debug mode", &g_state.debugMode);
|
||||||
ImGui::Text("Current Modes:");
|
|
||||||
|
|
||||||
std::string boonMode = "Normal";
|
|
||||||
if (g_state.isQuickDps) {
|
|
||||||
boonMode = "Quick DPS";
|
|
||||||
}
|
|
||||||
else if (g_state.isAlacDps) {
|
|
||||||
boonMode = "Alac DPS";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_state.environmentDamage) {
|
|
||||||
boonMode += " + Env ";
|
|
||||||
switch (g_state.envDamageLevel) {
|
|
||||||
case ENV_MILD: boonMode += "Mild"; break;
|
|
||||||
case ENV_MODERATE: boonMode += "Moderate"; break;
|
|
||||||
case ENV_EXTREME: boonMode += "Extreme"; break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Text("- Boons: %s", boonMode.c_str());
|
|
||||||
|
|
||||||
std::string golemMods = "Normal";
|
|
||||||
if (g_state.showAdvanced && (g_state.skipBurning || g_state.skipConfusion || g_state.skipSlow ||
|
|
||||||
g_state.addImmobilize || g_state.addBlind || g_state.fiveBleedingStacks)) {
|
|
||||||
golemMods = "";
|
|
||||||
if (g_state.skipBurning) golemMods += "Skip Burning ";
|
|
||||||
if (g_state.skipConfusion) golemMods += "Skip Confusion ";
|
|
||||||
if (g_state.skipSlow) golemMods += "Skip Slow ";
|
|
||||||
if (g_state.addImmobilize) golemMods += "Add Immobilize ";
|
|
||||||
if (g_state.addBlind) golemMods += "Add Blind ";
|
|
||||||
if (g_state.fiveBleedingStacks) golemMods += "5 Bleeding ";
|
|
||||||
if (!golemMods.empty()) golemMods.pop_back();
|
|
||||||
}
|
|
||||||
ImGui::Text("- Golem: %s", golemMods.c_str());
|
|
||||||
|
|
||||||
const char* hitboxName = g_state.hitboxType == HITBOX_SMALL ? "Small" :
|
|
||||||
g_state.hitboxType == HITBOX_MEDIUM ? "Medium" : "Large";
|
|
||||||
ImGui::Text("- Hitbox: %s", hitboxName);
|
|
||||||
|
|
||||||
ImGui::Text("- Step Delay: %d ms", g_state.stepDelay);
|
|
||||||
ImGui::Text("- Initial Delay: %d ms", g_state.initialDelay);
|
|
||||||
|
|
||||||
ImGui::Text("- Templates: %zu loaded", g_state.templates.size());
|
|
||||||
if (g_state.selectedTemplateIndex >= 0 && g_state.selectedTemplateIndex < g_state.templates.size()) {
|
|
||||||
ImGui::Text("- Active Template: %s", g_state.templates[g_state.selectedTemplateIndex].name.c_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -51,4 +51,18 @@ void MapUtils::UpdateQuickAccessVisibility() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_state.autoShowHideUI) {
|
||||||
|
bool inTrainingArea = IsInTrainingArea();
|
||||||
|
static bool wasInTrainingArea = false;
|
||||||
|
|
||||||
|
if (inTrainingArea && !wasInTrainingArea) {
|
||||||
|
g_state.showUI = true;
|
||||||
|
}
|
||||||
|
else if (!inTrainingArea && wasInTrainingArea) {
|
||||||
|
g_state.showUI = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
wasInTrainingArea = inTrainingArea;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue