Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add action target is null check.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 20, 2023
1 parent 1e953a5 commit 54789c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public unsafe virtual bool CanUse(out IAction act, bool mustUse = false, bool em
if (CastTime > 0 && DataCenter.IsMoving &&
!player.HasStatus(true, CustomRotation.Swiftcast.StatusProvide)) return false;

if (!FindTarget(mustUse, out var target)) return false;
if (!FindTarget(mustUse, out var target) || target == null) return false;

if (ActionCheck != null && !ActionCheck(target)) return false;
if (!skipDisable && RotationCheck != null && !RotationCheck(target)) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ private bool TargetParty(float range, int aoeCount, bool mustUse, out BattleChar
//特殊选队友的方法。
target = ChoiceTarget(availableCharas, mustUse);
}
if (target == null) return false;

return mustUse || CheckStatus(target);
}
Expand Down

0 comments on commit 54789c9

Please sign in to comment.