Skip to content

Commit

Permalink
Include explicit target for attacking with area skill
Browse files Browse the repository at this point in the history
  • Loading branch information
nitoygo committed Dec 16, 2024
1 parent ac0e233 commit 5330d9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GameLogic/PlayerActions/Skills/AreaSkillAttackAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private async ValueTask PerformAutomaticHitsAsync(Player player, ushort extraTar
}
else
{
extraTarget = await AttackTargetsAsync(player, extraTargetId, targetAreaCenter, skillEntry, areaSkillSettings, targets, isCombo).ConfigureAwait(false);
extraTarget = await this.AttackTargetsAsync(player, extraTargetId, targetAreaCenter, skillEntry, areaSkillSettings, targets, isCombo).ConfigureAwait(false);
}

if (isCombo)
Expand All @@ -115,7 +115,7 @@ private async ValueTask PerformAutomaticHitsAsync(Player player, ushort extraTar
var attackCount = 0;
var maxAttacks = areaSkillSettings.MaximumNumberOfHitsPerAttack == 0 ? int.MaxValue : areaSkillSettings.MaximumNumberOfHitsPerAttack;
var currentDelay = TimeSpan.Zero;

for (int attackRound = 0; attackRound < areaSkillSettings.MaximumNumberOfHitsPerTarget; attackRound++)
{
if (attackCount > maxAttacks)
Expand Down Expand Up @@ -199,7 +199,7 @@ private static IEnumerable<IAttackable> GetTargets(Player player, Point targetAr
yield break;
}

foreach (var target in GetTargetsInRange(player, targetAreaCenter, skill, rotation).Where(t => t != extraTarget))
foreach (var target in GetTargetsInRange(player, targetAreaCenter, skill, rotation))
{
yield return target;
}
Expand Down

0 comments on commit 5330d9e

Please sign in to comment.