From 5330d9e71bdaad19c607638fb8439c497304eeba Mon Sep 17 00:00:00 2001 From: Benito Go III Date: Tue, 17 Dec 2024 02:07:49 +0800 Subject: [PATCH] Include explicit target for attacking with area skill --- src/GameLogic/PlayerActions/Skills/AreaSkillAttackAction.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GameLogic/PlayerActions/Skills/AreaSkillAttackAction.cs b/src/GameLogic/PlayerActions/Skills/AreaSkillAttackAction.cs index ce51a93a4..c1c66ac10 100644 --- a/src/GameLogic/PlayerActions/Skills/AreaSkillAttackAction.cs +++ b/src/GameLogic/PlayerActions/Skills/AreaSkillAttackAction.cs @@ -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) @@ -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) @@ -199,7 +199,7 @@ private static IEnumerable 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; }