From dc4cd8ea8d9cf8c1769329faa474ffc1dab146d3 Mon Sep 17 00:00:00 2001 From: hexhexD Date: Wed, 23 Oct 2024 03:36:24 +0900 Subject: [PATCH] Rewrote base level self condition check --- control/config.txt | 3 +-- src/Misc.pm | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/control/config.txt b/control/config.txt index b8d26f6d31..0eba74968d 100644 --- a/control/config.txt +++ b/control/config.txt @@ -898,8 +898,7 @@ buyAuto { batchSize onlyIdentified disabled 0 - maxBase - minBase + baseLvl } sellAuto 0 diff --git a/src/Misc.pm b/src/Misc.pm index 678a32d7b8..8504137d08 100644 --- a/src/Misc.pm +++ b/src/Misc.pm @@ -4950,8 +4950,9 @@ sub checkSelfCondition { return 0 if $char->{party}{joined}; } - return 0 if ($config{$prefix . "_maxBase"} =~ /^\d{1,}$/ && $char->{lv} > $config{$prefix . "_maxBase"}); - return 0 if ($config{$prefix . "_minBase"} =~ /^\d{1,}$/ && $char->{lv} < $config{$prefix . "_minBase"}); + if ($config{$prefix . "_baseLvl"}) { + return 0 if (!inRange($char->{lv}, $config{$prefix . "_baseLvl"})); + } my %hookArgs; $hookArgs{prefix} = $prefix;