Core/SAI: implement SMART_ACTION_ATTACK_STOP
Unlike SMART_ACTION_AUTO_ATTACK, this action is actually stopping the entire attack procedure, rather than just hack-disabling auto-attacks. Keep in mind that this action requires a passive react state to prevent a immediate AttackStart ai reaction
This commit is contained in:
1 parent
d71bc0c0a8
commit
3f6455d9bb
3 files changed
+9
No files matched your search
@@ -1198,6 +1198,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_ATTACK_STOP:
|
||||
{
|
||||
for (WorldObject* target : targets)
|
||||
if (Unit* unitTarget = target->ToUnit())
|
||||
unitTarget->AttackStop();
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_MOVE_OFFSET:
|
||||
{
|
||||
for (WorldObject* target : targets)
|
||||
|
||||
Reference in new issue
Block a user