fix(Core/SAI): Don't set Combat Movement for creatures without its associated flag (#24523)

This commit is contained in:
Gultask
2026-01-29 14:20:16 -03:00
committed by GitHub
parent e216838d54
commit 2c81a4ee12

View File

@@ -714,7 +714,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me->IsRooted()) // Rooted inhabit type, never move/reposition
continue;
CAST_AI(SmartAI, me->AI())->SetCurrentRangeMode(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
if (e.action.cast.castFlags & SMARTCAST_COMBAT_MOVE)
CAST_AI(SmartAI, me->AI())->SetCurrentRangeMode(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
continue;
}
else if (distanceToTarget < spellMinRange || !(isWithinLOSInMap || isSpellIgnoreLOS))