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

fix: correct calcposition call at party logic #3923

Merged
merged 2 commits into from
Dec 28, 2024
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/AI/CoreLogic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2889,7 +2889,7 @@ sub processAutoSkillUse {
##### PARTY-SKILL USE #####
sub processPartySkillUse {
if (AI::isIdle || AI::is(qw(route mapRoute follow sitAuto take items_gather items_take attack move))){
my $realMyPos = calcPosition($field, $char);
my $realMyPos = calcPosition($char);
my %party_skill;
PARTYSKILL:
for (my $i = 0; exists $config{"partySkill_$i"}; $i++) {
Expand Down Expand Up @@ -2923,7 +2923,7 @@ sub processPartySkillUse {
);
my $party_skill_dist = $config{"partySkill_$i"."_dist"} || $config{partySkillDistance} || "0..8";
if (defined($config{"partySkill_$i"."_dist"}) && defined($config{"partySkill_$i"."_maxDist"})) { $party_skill_dist = $config{"partySkill_$i"."_dist"} . ".." . $config{"partySkill_$i"."_maxDist"};}
my $realActorPos = calcPosition($field, $player);
my $realActorPos = calcPosition($player);
my $distance = blockDistance($realMyPos, $realActorPos);
next unless ($party_skill{owner}{ID} eq $player->{ID} || inRange($distance, $party_skill_dist));
next unless (checkPlayerCondition("partySkill_$i"."_target", $ID));
Expand Down
Loading