Skip to content

Commit 2c81a4e

Browse files
authored
fix(Core/SAI): Don't set Combat Movement for creatures without its associated flag (azerothcore#24523)
1 parent e216838 commit 2c81a4e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/server/game/AI/SmartScripts/SmartScript.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
714714
if (me->IsRooted()) // Rooted inhabit type, never move/reposition
715715
continue;
716716

717-
CAST_AI(SmartAI, me->AI())->SetCurrentRangeMode(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
717+
if (e.action.cast.castFlags & SMARTCAST_COMBAT_MOVE)
718+
CAST_AI(SmartAI, me->AI())->SetCurrentRangeMode(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
719+
718720
continue;
719721
}
720722
else if (distanceToTarget < spellMinRange || !(isWithinLOSInMap || isSpellIgnoreLOS))

0 commit comments

Comments
 (0)