feat(Core/SmartScripts): SMART_ACTION_ATTACK_STOP #10053

This commit is contained in:
IntelligentQuantum
2022-01-07 10:49:32 +03:30
committed by GitHub
parent 3085f64e50
commit 2e6213d526
3 changed files with 20 additions and 1 deletions

View File

@@ -1475,6 +1475,23 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
delete targets;
break;
}
case SMART_ACTION_ATTACK_STOP:
{
ObjectList* targets = GetTargets(e, unit);
if (!targets)
{
break;
}
for (auto const& target : *targets)
{
if (Unit* unitTarget = target->ToUnit())
{
unitTarget->AttackStop();
}
}
break;
}
case SMART_ACTION_SUMMON_CREATURE:
{
ObjectList* targets = GetTargets(e, unit);