Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add attackAuto_notWhile for slaves #3789

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions control/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ mercenary_attackAuto 2
mercenary_attackAuto_party 1
mercenary_attackAuto_notInTown 1
mercenary_attackAuto_inLockOnly 1
mercenary_attackAuto_notWhile_storageAuto 1
mercenary_attackAuto_notWhile_buyAuto 1
mercenary_attackAuto_notWhile_sellAuto 1
mercenary_attackAuto_considerDamagedAggressive 0
mercenary_attackBeyondMaxDistance_waitForAgressive 1
mercenary_attackAuto_onlyWhenSafe 0
Expand Down Expand Up @@ -442,6 +445,9 @@ homunculus_attackAuto 2
homunculus_attackAuto_party 1
homunculus_attackAuto_notInTown 1
homunculus_attackAuto_inLockOnly 1
homunculus_attackAuto_notWhile_storageAuto 1
homunculus_attackAuto_notWhile_buyAuto 1
homunculus_attackAuto_notWhile_sellAuto 1
homunculus_attackAuto_considerDamagedAggressive 0
homunculus_attackBeyondMaxDistance_waitForAgressive 1
homunculus_attackAuto_onlyWhenSafe 0
Expand Down
3 changes: 3 additions & 0 deletions src/AI/Slave.pm
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ sub processAutoAttack {
&& ((AI::action ne "move" && AI::action ne "route") || blockDistance($char->{pos_to}, $slave->{pos_to}) <= $config{$slave->{configPrefix}.'followDistanceMax'})
&& (!$config{$slave->{configPrefix}.'attackAuto_notInTown'} || !$field->isCity)
&& ($config{$slave->{configPrefix}.'attackAuto_inLockOnly'} <= 1 || $field->baseName eq $config{'lockMap'})
&& (!$config{$slave->{configPrefix}.'attackAuto_notWhile_storageAuto'} || !AI::inQueue("storageAuto"))
&& (!$config{$slave->{configPrefix}.'attackAuto_notWhile_buyAuto'} || !AI::inQueue("buyAuto"))
&& (!$config{$slave->{configPrefix}.'attackAuto_notWhile_sellAuto'} || !AI::inQueue("sellAuto"))
) {

# If we're in tanking mode, only attack something if the person we're tanking for is on screen.
Expand Down
Loading