Core/SAI: Improve SMART_ACTION_ATTACK_START to exclude non-unit targets from selection pool (#30653)

This commit is contained in:
sanctum32
2025-01-30 21:02:44 +02:00
committed by GitHub
parent ace6342aea
commit 444a98111a

View File

@@ -1242,6 +1242,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!me)
break;
std::erase_if(targets, [](WorldObject const* target)
{
return !target->IsUnit();
});
if (targets.empty())
break;