~ruther/NosSmooth

b0278d9ff8fd02a67cf85cd9f5514efeabe69aea — Rutherther 3 years ago 0e0daae
fix(combat): reset attack command if new target is different
1 files changed, 6 insertions(+), 0 deletions(-)

M Extensions/NosSmooth.Extensions.Combat/CombatManager.cs
M Extensions/NosSmooth.Extensions.Combat/CombatManager.cs => Extensions/NosSmooth.Extensions.Combat/CombatManager.cs +6 -0
@@ 23,6 23,7 @@ public class CombatManager : IStatefulEntity
    private readonly SemaphoreSlim _semaphore;
    private readonly INostaleClient _client;
    private readonly Game.Game _game;
    private bool _cancelling;

    /// <summary>
    /// Initializes a new instance of the <see cref="CombatManager"/> class.


@@ 79,6 80,11 @@ public class CombatManager : IStatefulEntity
                                previousTarget = currentTarget;
                                currentTarget = stepResult.Entity;

                                if (previousTarget != currentTarget)
                                {
                                    continue;
                                }

                                operation = combatState.NextOperation();
                            }


Do not follow this link