From 311bf32da57481d38d17bc9229421622ecb6b43f Mon Sep 17 00:00:00 2001 From: crow Date: Wed, 10 Sep 2025 01:05:56 -0500 Subject: [PATCH] Update Shadow Nova action Fix error with isUseful check that caused bots not to run away from Shadow Nova when no Infernals were spawned + some tightening of code to avoid Shadow Nova --- src/strategy/raids/karazhan/RaidKarazhanActions.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/strategy/raids/karazhan/RaidKarazhanActions.cpp b/src/strategy/raids/karazhan/RaidKarazhanActions.cpp index 41ecc0bf..799e7476 100644 --- a/src/strategy/raids/karazhan/RaidKarazhanActions.cpp +++ b/src/strategy/raids/karazhan/RaidKarazhanActions.cpp @@ -974,8 +974,8 @@ bool KarazhanPrinceMalchezaarRunAwayFromShadowNovaAction::Execute(Event event) float currentBossDistance = bot->GetDistance2d(boss); if (currentBossDistance < safeBossDistance) { - const float stepSize = 2.0f; - const int numAngles = 16; + const float stepSize = 0.5f; + const int numAngles = 64; for (int i = 0; i < numAngles; ++i) { float angle = (2 * M_PI * i) / numAngles; @@ -1007,7 +1007,7 @@ bool KarazhanPrinceMalchezaarRunAwayFromShadowNovaAction::Execute(Event event) bot->AttackStop(); bot->InterruptNonMeleeSpells(false); if (karazhanHelper.IsSafePosition(destX, destY, destZ, infernals, 20.0f)) - return MoveTo(bot->GetMapId(), destX, destY, destZ, false, false, false, true, MovementPriority::MOVEMENT_COMBAT); + return MoveTo(bot->GetMapId(), destX, destY, destZ, false, false, false, true, MovementPriority::MOVEMENT_FORCED); } } } @@ -1017,10 +1017,6 @@ bool KarazhanPrinceMalchezaarRunAwayFromShadowNovaAction::Execute(Event event) bool KarazhanPrinceMalchezaarRunAwayFromShadowNovaAction::isUseful() { Unit* boss = AI_VALUE2(Unit*, "find target", "prince malchezaar"); - RaidKarazhanHelpers karazhanHelper(botAI); - std::vector infernals = karazhanHelper.GetSpawnedInfernals(); - if (infernals.empty()) - return false; return boss && bot->HasAura(SPELL_ENFEEBLE); }