diff --git a/GolemHelper/Automation/AutomationLogic.cpp b/GolemHelper/Automation/AutomationLogic.cpp
index 547fb53..147d74f 100644
--- a/GolemHelper/Automation/AutomationLogic.cpp
+++ b/GolemHelper/Automation/AutomationLogic.cpp
@@ -25,11 +25,15 @@ bool AutomationLogic::ShouldSkipGolemStep(int stepIndex) {
return false;
}
- if (g_state.skipSlow && stepIndex == 17) {
+ if (g_state.skipBurning && stepIndex == 7) {
return true;
}
- if (g_state.skipBurning && stepIndex == 7) {
+ if (g_state.skipConfusion && stepIndex == 8) {
+ return true;
+ }
+
+ if (g_state.skipSlow && stepIndex == 17) {
return true;
}
@@ -79,8 +83,6 @@ void AutomationLogic::ApplyHealerBoons() {
}
}
- g_api->Log(ELogLevel_INFO, "GolemHelper", "Applying Environment Damage final click");
-
int finalY;
switch (g_state.envDamageLevel) {
case ENV_MILD: finalY = 352; break;
@@ -153,12 +155,10 @@ void AutomationLogic::ApplyAllBoons() {
CoordinateUtils::ClickAtScaled(g_coords.boonStepX[i], g_coords.boonStepY[i], g_state.stepDelay);
if (g_state.showBoonAdvanced && g_state.addResistance) {
- g_api->Log(ELogLevel_INFO, "GolemHelper", "Adding Resistance");
CoordinateUtils::ClickAtScaled(g_coords.resistanceX, g_coords.resistanceY, g_state.stepDelay);
}
if (g_state.showBoonAdvanced && g_state.addStability) {
- g_api->Log(ELogLevel_INFO, "GolemHelper", "Adding Stability");
CoordinateUtils::ClickAtScaled(g_coords.stabilityX, g_coords.stabilityY, g_state.stepDelay);
}
@@ -192,23 +192,27 @@ void AutomationLogic::ApplyGolemSettings() {
g_state.hitboxType == HITBOX_MEDIUM ? "Medium Hitbox" : "Large Hitbox";
std::string modifiers = "Normal";
- if (g_state.showAdvanced && (g_state.skipSlow || g_state.skipBurning || g_state.fiveBleedingStacks)) {
+ if (g_state.showAdvanced && (g_state.skipBurning || g_state.skipConfusion || g_state.skipSlow ||
+ g_state.addImmobilize || g_state.addBlind || g_state.fiveBleedingStacks)) {
modifiers = "";
- if (g_state.skipSlow) modifiers += "Skip Slow ";
if (g_state.skipBurning) modifiers += "Skip Burning ";
+ if (g_state.skipConfusion) modifiers += "Skip Confusion ";
+ if (g_state.skipSlow) modifiers += "Skip Slow ";
+ if (g_state.addImmobilize) modifiers += "Add Immobilize ";
+ if (g_state.addBlind) modifiers += "Add Blind ";
if (g_state.fiveBleedingStacks) modifiers += "5 Bleeding ";
if (!modifiers.empty()) modifiers.pop_back();
}
char startBuffer[400];
- sprintf_s(startBuffer, "Starting golem settings sequence (25 steps) - Modifiers: %s, Hitbox: %s", modifiers.c_str(), hitbox);
+ sprintf_s(startBuffer, "Starting golem settings sequence (24 steps) - Modifiers: %s, Hitbox: %s", modifiers.c_str(), hitbox);
g_api->Log(ELogLevel_INFO, "GolemHelper", startBuffer);
try {
g_api->GameBinds.InvokeAsync(EGameBinds_MiscInteract, 50);
Sleep(g_state.initialDelay);
- for (int i = 0; i < 25; i++) {
+ for (int i = 0; i < 24; i++) {
if (g_coords.golemStepX[i] == 0 && g_coords.golemStepY[i] == 0) {
continue;
}
@@ -234,13 +238,31 @@ void AutomationLogic::ApplyGolemSettings() {
}
}
- int delay = (i == 24) ? 50 : g_state.stepDelay;
+ int delay = (i == 23) ? 50 : g_state.stepDelay;
+
+ if (i == 14) {
+ CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
+
+ if (g_state.showAdvanced && g_state.addImmobilize) {
+ CoordinateUtils::ClickAtScaled(g_coords.immobilizeX, g_coords.immobilizeY, g_state.stepDelay);
+ }
+
+ continue;
+ }
+
+ if (i == 16) {
+ CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
+
+ if (g_state.showAdvanced && g_state.addBlind) {
+ CoordinateUtils::ClickAtScaled(g_coords.blindX, g_coords.blindY, g_state.stepDelay);
+ }
+
+ continue;
+ }
CoordinateUtils::ClickAtScaled(currentX, currentY, delay);
if (g_state.showAdvanced && g_state.fiveBleedingStacks && i == 6) {
- g_api->Log(ELogLevel_INFO, "GolemHelper", "5 Bleeding Stacks - repeating 7th step 4 more times");
-
for (int repeat = 0; repeat < 4; repeat++) {
CoordinateUtils::ClickAtScaled(currentX, currentY, g_state.stepDelay);
}
@@ -255,5 +277,5 @@ void AutomationLogic::ApplyGolemSettings() {
g_state.showUI = true;
}
- g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem settings sequence completed (25 steps)!");
+ g_api->Log(ELogLevel_INFO, "GolemHelper", "Golem settings sequence completed (24 steps)!");
}
\ No newline at end of file
diff --git a/GolemHelper/Automation/CoordinateUtils.cpp b/GolemHelper/Automation/CoordinateUtils.cpp
index a6b066d..c468ec4 100644
--- a/GolemHelper/Automation/CoordinateUtils.cpp
+++ b/GolemHelper/Automation/CoordinateUtils.cpp
@@ -6,8 +6,6 @@
void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, int* scaledY) {
if (!g_api) return;
- g_api->Log(ELogLevel_INFO, "GolemHelper", "GetScaledCoordinates CALLED");
-
if (g_nexusLink && g_nexusLink->Width > 0 && g_nexusLink->Height > 0) {
float uiScale = g_nexusLink->Scaling;
float dpiScaleX, dpiScaleY;
@@ -68,11 +66,6 @@ void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, i
g_api->Log(ELogLevel_INFO, "GolemHelper", normalBuffer);
}
- char valuesBuffer[250];
- sprintf_s(valuesBuffer, "GetScaled INPUT: uiScale=%.3f, scaleX=%.3f, scaleY=%.3f, base=%d,%d",
- uiScale, dpiScaleX, dpiScaleY, baseX, baseY);
- g_api->Log(ELogLevel_INFO, "GolemHelper", valuesBuffer);
-
int scaledForResolutionX = (int)(baseX * dpiScaleX);
int scaledForResolutionY = (int)(baseY * dpiScaleY);
@@ -94,22 +87,11 @@ void CoordinateUtils::GetScaledCoordinates(int baseX, int baseY, int* scaledX, i
else if (uiScale >= 1.21f && uiScale <= 1.25f) {
finalX = scaledForResolutionX - (int)(scaledForResolutionX * 0.097f);
finalY = scaledForResolutionY + (int)(scaledForResolutionY * 0.206f);
- g_api->Log(ELogLevel_INFO, "GolemHelper", "APPLIED LARGER UI OFFSET");
- }
- else {
- char buffer[100];
- sprintf_s(buffer, "NO UI OFFSET - uiScale %.3f", uiScale);
- g_api->Log(ELogLevel_INFO, "GolemHelper", buffer);
}
}
*scaledX = finalX;
*scaledY = finalY;
-
- char resultBuffer[250];
- sprintf_s(resultBuffer, "GetScaled RESULT: base=%d,%d -> scaled=%d,%d -> final=%d,%d",
- baseX, baseY, scaledForResolutionX, scaledForResolutionY, finalX, finalY);
- g_api->Log(ELogLevel_INFO, "GolemHelper", resultBuffer);
}
else {
g_api->Log(ELogLevel_WARNING, "GolemHelper", "GetScaledCoordinates - Nexus data not available");
@@ -150,6 +132,13 @@ void CoordinateUtils::DebugMousePosition() {
}
void CoordinateUtils::ClickAtScaled(int baseX, int baseY, int delay) {
+ if (g_mumbleData && !g_mumbleData->Context.IsGameFocused) {
+ if (g_api) {
+ g_api->Log(ELogLevel_WARNING, "GolemHelper", "Sequence stopped - Game lost focus");
+ }
+ return;
+ }
+
HWND gameWindow = GetForegroundWindow();
if (!gameWindow) return;
diff --git a/GolemHelper/Common/Types.h b/GolemHelper/Common/Types.h
index 0e1ec63..7791a27 100644
--- a/GolemHelper/Common/Types.h
+++ b/GolemHelper/Common/Types.h
@@ -21,8 +21,11 @@ struct GolemTemplate {
bool isAlacDps;
bool environmentDamage;
EnvironmentDamageLevel envDamageLevel;
- bool skipSlow;
bool skipBurning;
+ bool skipConfusion;
+ bool skipSlow;
+ bool addImmobilize;
+ bool addBlind;
bool fiveBleedingStacks;
HitboxType hitboxType;
bool isDefaultTemplate;
@@ -36,8 +39,11 @@ struct GolemTemplate {
isAlacDps(false),
environmentDamage(false),
envDamageLevel(ENV_MILD),
- skipSlow(false),
skipBurning(false),
+ skipConfusion(false),
+ skipSlow(false),
+ addImmobilize(false),
+ addBlind(false),
fiveBleedingStacks(false),
hitboxType(HITBOX_SMALL),
isDefaultTemplate(false),
@@ -53,8 +59,11 @@ struct GolemHelperState {
bool isAlacDps = false;
bool environmentDamage = false;
EnvironmentDamageLevel envDamageLevel = ENV_MILD;
- bool skipSlow = false;
bool skipBurning = false;
+ bool skipConfusion = false;
+ bool skipSlow = false;
+ bool addImmobilize = false;
+ bool addBlind = false;
bool fiveBleedingStacks = false;
HitboxType hitboxType = HITBOX_SMALL;
bool debugMode = false;
@@ -81,16 +90,16 @@ struct GolemHelperState {
};
struct MenuCoordinates {
- int golemStepX[25] = {
+ int golemStepX[24] = {
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
830, 830, 830, 830, 830, 830, 830, 830, 830, 830,
- 830, 830, 830, 830, 830
+ 830, 830, 830, 830
};
- int golemStepY[25] = {
+ int golemStepY[24] = {
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
+ 454, 454, 454, 548
};
int boonStepX[20] = {
@@ -111,6 +120,11 @@ struct MenuCoordinates {
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;
diff --git a/GolemHelper/Config/TemplateManager.cpp b/GolemHelper/Config/TemplateManager.cpp
index a8042f0..c48b8f5 100644
--- a/GolemHelper/Config/TemplateManager.cpp
+++ b/GolemHelper/Config/TemplateManager.cpp
@@ -61,11 +61,20 @@ void TemplateManager::LoadTemplates() {
else if (key == "envDamageLevel") {
currentTemplate.envDamageLevel = (EnvironmentDamageLevel)std::stoi(value);
}
+ else if (key == "skipBurning") {
+ currentTemplate.skipBurning = (value == "1");
+ }
+ else if (key == "skipConfusion") {
+ currentTemplate.skipConfusion = (value == "1");
+ }
else if (key == "skipSlow") {
currentTemplate.skipSlow = (value == "1");
}
- else if (key == "skipBurning") {
- currentTemplate.skipBurning = (value == "1");
+ else if (key == "addImmobilize") {
+ currentTemplate.addImmobilize = (value == "1");
+ }
+ else if (key == "addBlind") {
+ currentTemplate.addBlind = (value == "1");
}
else if (key == "fiveBleedingStacks") {
currentTemplate.fiveBleedingStacks = (value == "1");
@@ -128,8 +137,11 @@ void TemplateManager::SaveTemplates() {
file << "isAlacDps=" << (temp.isAlacDps ? "1" : "0") << "\n";
file << "environmentDamage=" << (temp.environmentDamage ? "1" : "0") << "\n";
file << "envDamageLevel=" << temp.envDamageLevel << "\n";
- file << "skipSlow=" << (temp.skipSlow ? "1" : "0") << "\n";
file << "skipBurning=" << (temp.skipBurning ? "1" : "0") << "\n";
+ file << "skipConfusion=" << (temp.skipConfusion ? "1" : "0") << "\n";
+ file << "skipSlow=" << (temp.skipSlow ? "1" : "0") << "\n";
+ file << "addImmobilize=" << (temp.addImmobilize ? "1" : "0") << "\n";
+ file << "addBlind=" << (temp.addBlind ? "1" : "0") << "\n";
file << "fiveBleedingStacks=" << (temp.fiveBleedingStacks ? "1" : "0") << "\n";
file << "hitboxType=" << temp.hitboxType << "\n";
file << "addResistance=" << (temp.addResistance ? "1" : "0") << "\n";
@@ -224,8 +236,11 @@ GolemTemplate TemplateManager::CreateTemplateFromCurrentSettings() {
temp.isAlacDps = g_state.isAlacDps;
temp.environmentDamage = g_state.environmentDamage;
temp.envDamageLevel = g_state.envDamageLevel;
- temp.skipSlow = g_state.skipSlow;
temp.skipBurning = g_state.skipBurning;
+ temp.skipConfusion = g_state.skipConfusion;
+ temp.skipSlow = g_state.skipSlow;
+ temp.addImmobilize = g_state.addImmobilize;
+ temp.addBlind = g_state.addBlind;
temp.fiveBleedingStacks = g_state.fiveBleedingStacks;
temp.hitboxType = g_state.hitboxType;
temp.addResistance = g_state.addResistance;
@@ -240,8 +255,11 @@ void TemplateManager::ApplyTemplateToSettings(const GolemTemplate& temp) {
g_state.isAlacDps = temp.isAlacDps;
g_state.environmentDamage = temp.environmentDamage;
g_state.envDamageLevel = temp.envDamageLevel;
- g_state.skipSlow = temp.skipSlow;
g_state.skipBurning = temp.skipBurning;
+ g_state.skipConfusion = temp.skipConfusion;
+ g_state.skipSlow = temp.skipSlow;
+ g_state.addImmobilize = temp.addImmobilize;
+ g_state.addBlind = temp.addBlind;
g_state.fiveBleedingStacks = temp.fiveBleedingStacks;
g_state.hitboxType = temp.hitboxType;
g_state.addResistance = temp.addResistance;
@@ -253,7 +271,8 @@ void TemplateManager::ApplyTemplateToSettings(const GolemTemplate& temp) {
g_state.showBoonAdvanced = false;
}
else {
- if (temp.skipSlow || temp.skipBurning || temp.fiveBleedingStacks) {
+ if (temp.skipBurning || temp.skipConfusion || temp.skipSlow ||
+ temp.addImmobilize || temp.addBlind || temp.fiveBleedingStacks) {
g_state.showAdvanced = true;
}
if (temp.addResistance || temp.addStability || temp.skipAegis) {
diff --git a/GolemHelper/GolemHelper.cpp b/GolemHelper/GolemHelper.cpp
index ec07790..4ade1ed 100644
--- a/GolemHelper/GolemHelper.cpp
+++ b/GolemHelper/GolemHelper.cpp
@@ -35,7 +35,7 @@ void Load(AddonAPI* aApi) {
MapUtils::UpdateQuickAccessVisibility();
- g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.4.1.0 Loaded ===");
+ g_api->Log(ELogLevel_INFO, "GolemHelper", "=== GolemHelper v1.5.0.0 Loaded ===");
g_api->Log(ELogLevel_INFO, "GolemHelper", "GolemHelper addon loaded successfully!");
}
@@ -62,7 +62,7 @@ extern "C" __declspec(dllexport) AddonDefinition* GetAddonDef() {
def.Signature = -424248;
def.APIVersion = NEXUS_API_VERSION;
def.Name = "GolemHelper";
- def.Version = { 1, 4, 1, 0 };
+ def.Version = { 1, 5, 0, 0 };
def.Author = "Azrub";
def.Description = "Automates the process of setting optimal boon and golem configurations in the training area";
def.Load = Load;
diff --git a/GolemHelper/UI/UIManager.cpp b/GolemHelper/UI/UIManager.cpp
index 035fa49..98f33ae 100644
--- a/GolemHelper/UI/UIManager.cpp
+++ b/GolemHelper/UI/UIManager.cpp
@@ -17,7 +17,7 @@ void UIManager::RenderUI() {
if (ImGui::Begin("GolemHelper", &g_state.showUI, ImGuiWindowFlags_AlwaysAutoResize)) {
- ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.4.1.0");
+ ImGui::TextColored(ImVec4(0.2f, 0.8f, 1.0f, 1.0f), "GolemHelper v1.5.0.0");
ImGui::Separator();
if (ImGui::BeginTabBar("GolemHelperTabs", ImGuiTabBarFlags_None)) {
@@ -29,7 +29,7 @@ void UIManager::RenderUI() {
if (ImGui::BeginTabItem("Templates")) {
ImGui::SameLine();
- ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 160);
+ ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 130);
std::string currentTemplateName = "None";
bool foundMatchingTemplate = false;
@@ -39,8 +39,11 @@ void UIManager::RenderUI() {
temp.isAlacDps == g_state.isAlacDps &&
temp.environmentDamage == g_state.environmentDamage &&
temp.envDamageLevel == g_state.envDamageLevel &&
- temp.skipSlow == g_state.skipSlow &&
temp.skipBurning == g_state.skipBurning &&
+ temp.skipConfusion == g_state.skipConfusion &&
+ temp.skipSlow == g_state.skipSlow &&
+ temp.addImmobilize == g_state.addImmobilize &&
+ temp.addBlind == g_state.addBlind &&
temp.fiveBleedingStacks == g_state.fiveBleedingStacks &&
temp.hitboxType == g_state.hitboxType &&
temp.addResistance == g_state.addResistance &&
@@ -55,10 +58,11 @@ void UIManager::RenderUI() {
ImGui::Text("Current: ");
ImGui::SameLine();
if (foundMatchingTemplate) {
- if (currentTemplateName.length() > 12) {
- currentTemplateName = currentTemplateName.substr(0, 9) + "...";
+ std::string truncatedName = currentTemplateName;
+ if (truncatedName.length() > 8) {
+ truncatedName = truncatedName.substr(0, 6) + "..";
}
- ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "%s", currentTemplateName.c_str());
+ ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), "%s", truncatedName.c_str());
}
else {
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "None");
@@ -79,7 +83,7 @@ void UIManager::RenderSettingsTab() {
ImGui::Text("Boon Configuration");
if (ImGui::Button("Apply Boons", ImVec2(150, 0))) {
- if (g_state.enabled) {
+ if (g_state.enabled && MapUtils::IsInTrainingArea()) {
g_api->InputBinds.Invoke("GolemHelper.ApplyBoons", false);
}
}
@@ -158,8 +162,8 @@ void UIManager::RenderSettingsTab() {
ImGui::Text("Golem Configuration");
- if (ImGui::Button("Apply Golem Settings", ImVec2(150, 0))) {
- if (g_state.enabled) {
+ if (ImGui::Button("Spawn Golem", ImVec2(150, 0))) {
+ if (g_state.enabled && MapUtils::IsInTrainingArea()) {
g_api->InputBinds.Invoke("GolemHelper.ApplyGolem", false);
}
}
@@ -184,8 +188,11 @@ void UIManager::RenderSettingsTab() {
ImGui::Checkbox("Condition Settings", &g_state.showAdvanced);
if (g_state.showAdvanced) {
- ImGui::Checkbox("Skip Slow", &g_state.skipSlow);
ImGui::Checkbox("Skip Burning", &g_state.skipBurning);
+ ImGui::Checkbox("Skip Confusion", &g_state.skipConfusion);
+ ImGui::Checkbox("Skip Slow", &g_state.skipSlow);
+ ImGui::Checkbox("Add Immobilize", &g_state.addImmobilize);
+ ImGui::Checkbox("Add Blind", &g_state.addBlind);
ImGui::Checkbox("5 Bleeding Stacks", &g_state.fiveBleedingStacks);
}
@@ -252,15 +259,31 @@ void UIManager::RenderSettingsTab() {
}
void UIManager::RenderTemplatesTab() {
+ if (ImGui::Button("Apply Boons", ImVec2(120, 30))) {
+ if (g_state.enabled && MapUtils::IsInTrainingArea()) {
+ g_api->InputBinds.Invoke("GolemHelper.ApplyBoons", false);
+ }
+ }
+ ImGui::SameLine();
+
+ if (ImGui::Button("Spawn Golem", ImVec2(120, 30))) {
+ if (g_state.enabled && MapUtils::IsInTrainingArea()) {
+ g_api->InputBinds.Invoke("GolemHelper.ApplyGolem", false);
+ }
+ }
+
+ ImGui::Spacing();
+ ImGui::Separator();
+
ImGui::Text("Template Management");
ImGui::Separator();
ImGui::Text("Save Current Settings:");
- ImGui::SetNextItemWidth(200);
+ ImGui::SetNextItemWidth(170);
ImGui::InputText("##templateName", g_state.newTemplateName, sizeof(g_state.newTemplateName));
ImGui::SameLine();
- if (ImGui::Button("Save Template")) {
+ if (ImGui::Button("Save", ImVec2(50, 0))) {
if (strlen(g_state.newTemplateName) > 0) {
TemplateManager::SaveCurrentAsTemplate(std::string(g_state.newTemplateName));
memset(g_state.newTemplateName, 0, sizeof(g_state.newTemplateName));
@@ -296,21 +319,21 @@ void UIManager::RenderTemplatesTab() {
}
}
- ImGui::SetNextItemWidth(200);
+ ImGui::SetNextItemWidth(170);
if (ImGui::Combo("##templateList", ¤tUserIndex, userTemplateNames.data(), userTemplateNames.size())) {
g_state.selectedTemplateIndex = userTemplateIndices[currentUserIndex];
g_state.lastUserTemplateIndex = userTemplateIndices[currentUserIndex];
}
ImGui::SameLine();
- if (ImGui::Button("Load")) {
+ if (ImGui::Button("Load", ImVec2(50, 0))) {
if (currentUserIndex >= 0 && currentUserIndex < userTemplateIndices.size()) {
TemplateManager::LoadTemplate(userTemplateIndices[currentUserIndex]);
}
}
ImGui::SameLine();
- if (ImGui::Button("Delete")) {
+ if (ImGui::Button("Del", ImVec2(50, 0))) {
if (currentUserIndex >= 0 && currentUserIndex < userTemplateIndices.size()) {
TemplateManager::DeleteTemplate(userTemplateIndices[currentUserIndex]);
g_state.selectedTemplateIndex = -1;
@@ -324,7 +347,12 @@ void UIManager::RenderTemplatesTab() {
ImGui::Spacing();
ImGui::Separator();
- ImGui::Text("%s", selectedTemplate.name.c_str());
+
+ std::string displayName = selectedTemplate.name;
+ if (displayName.length() > 20) {
+ displayName = displayName.substr(0, 17) + "...";
+ }
+ ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f), "%s", displayName.c_str());
std::string modeText = "Normal";
if (selectedTemplate.isQuickDps) modeText = "Quick DPS";
@@ -345,28 +373,55 @@ void UIManager::RenderTemplatesTab() {
selectedTemplate.hitboxType == HITBOX_MEDIUM ? "Medium" : "Large";
ImGui::Text("Hitbox: %s", hitboxName);
- if (selectedTemplate.skipSlow || selectedTemplate.skipBurning || selectedTemplate.fiveBleedingStacks) {
- std::string conditions;
- if (selectedTemplate.skipSlow) conditions += "Skip Slow, ";
- if (selectedTemplate.skipBurning) conditions += "Skip Burning, ";
- if (selectedTemplate.fiveBleedingStacks) conditions += "5 Bleeding, ";
- if (!conditions.empty()) {
- conditions.pop_back();
- conditions.pop_back();
+ if (selectedTemplate.skipBurning || selectedTemplate.skipConfusion || selectedTemplate.skipSlow ||
+ selectedTemplate.addImmobilize || selectedTemplate.addBlind || selectedTemplate.fiveBleedingStacks) {
+
+ ImGui::Text("Conditions:");
+ ImGui::Indent(15.0f);
+
+ std::vector conditions;
+ if (selectedTemplate.skipBurning) conditions.push_back("Skip Burning");
+ if (selectedTemplate.skipConfusion) conditions.push_back("Skip Confusion");
+ if (selectedTemplate.skipSlow) conditions.push_back("Skip Slow");
+ if (selectedTemplate.addImmobilize) conditions.push_back("Add Immobilize");
+ if (selectedTemplate.addBlind) conditions.push_back("Add Blind");
+ if (selectedTemplate.fiveBleedingStacks) conditions.push_back("5 Bleeding");
+
+ std::string conditionsText = "";
+ for (int i = 0; i < conditions.size(); i++) {
+ if (i > 0 && i % 2 != 0) conditionsText += ", ";
+ conditionsText += conditions[i];
+
+ if ((i + 1) % 2 == 0 || i == conditions.size() - 1) {
+ ImGui::TextUnformatted(conditionsText.c_str());
+ conditionsText = "";
+ }
}
- ImGui::Text("Conditions: %s", conditions.c_str());
+
+ ImGui::Unindent(15.0f);
}
if (selectedTemplate.addResistance || selectedTemplate.addStability || selectedTemplate.skipAegis) {
- std::string boonSettings;
- if (selectedTemplate.addResistance) boonSettings += "Resistance, ";
- if (selectedTemplate.addStability) boonSettings += "Stability, ";
- if (selectedTemplate.skipAegis) boonSettings += "Skip Aegis, ";
- if (!boonSettings.empty()) {
- boonSettings.pop_back();
- boonSettings.pop_back();
+ ImGui::Text("Boon Settings:");
+ ImGui::Indent(15.0f);
+
+ std::vector boonSettings;
+ if (selectedTemplate.addResistance) boonSettings.push_back("Add Resistance");
+ if (selectedTemplate.addStability) boonSettings.push_back("Add Stability");
+ if (selectedTemplate.skipAegis) boonSettings.push_back("Skip Aegis");
+
+ std::string boonText = "";
+ for (int i = 0; i < boonSettings.size(); i++) {
+ if (i > 0 && i % 2 != 0) boonText += ", ";
+ boonText += boonSettings[i];
+
+ if ((i + 1) % 2 == 0 || i == boonSettings.size() - 1) {
+ ImGui::TextUnformatted(boonText.c_str());
+ boonText = "";
+ }
}
- ImGui::Text("Boon Settings: %s", boonSettings.c_str());
+
+ ImGui::Unindent(15.0f);
}
}
}
@@ -378,11 +433,12 @@ void UIManager::RenderTemplatesTab() {
std::vector defaultNames = { "DPS", "Quick DPS", "Alac DPS", "qHeal", "aHeal" };
- for (const std::string& name : defaultNames) {
+ for (int i = 0; i < 3; i++) {
+ const std::string& name = defaultNames[i];
int templateIndex = -1;
- for (int i = 0; i < g_state.templates.size(); i++) {
- if (g_state.templates[i].name == name && g_state.templates[i].isDefaultTemplate) {
- templateIndex = i;
+ for (int j = 0; j < g_state.templates.size(); j++) {
+ if (g_state.templates[j].name == name && g_state.templates[j].isDefaultTemplate) {
+ templateIndex = j;
break;
}
}
@@ -392,11 +448,27 @@ void UIManager::RenderTemplatesTab() {
TemplateManager::LoadTemplate(templateIndex);
g_state.selectedTemplateIndex = -1;
}
+ if (i < 2) ImGui::SameLine();
+ }
+ }
- if (name != "Alac DPS" && name != "aHeal") {
- ImGui::SameLine();
+ for (int i = 3; i < 5; i++) {
+ const std::string& name = defaultNames[i];
+ int templateIndex = -1;
+ for (int j = 0; j < g_state.templates.size(); j++) {
+ if (g_state.templates[j].name == name && g_state.templates[j].isDefaultTemplate) {
+ templateIndex = j;
+ break;
}
}
+
+ if (templateIndex >= 0) {
+ if (ImGui::Button(name.c_str(), ImVec2(80, 0))) {
+ TemplateManager::LoadTemplate(templateIndex);
+ g_state.selectedTemplateIndex = -1;
+ }
+ if (i == 3) ImGui::SameLine();
+ }
}
}
@@ -419,8 +491,11 @@ void UIManager::RenderOptions() {
g_state.isAlacDps = false;
g_state.environmentDamage = false;
g_state.envDamageLevel = ENV_MILD;
- g_state.skipSlow = false;
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;
@@ -460,10 +535,14 @@ void UIManager::RenderOptions() {
ImGui::Text("- Boons: %s", boonMode.c_str());
std::string golemMods = "Normal";
- if (g_state.showAdvanced && (g_state.skipSlow || g_state.skipBurning || g_state.fiveBleedingStacks)) {
+ 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.skipSlow) golemMods += "Skip Slow ";
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();
}