mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/SAI: Improve SMART_ACTION_ATTACK_START to exclude non-unit targets from selection pool (#30653)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user