Skip to content

Commit

Permalink
Merge pull request #439 from FFXIV-CombatReborn/even-more-redtext
Browse files Browse the repository at this point in the history
Handle null values in DataCenter's DispelTarget property more carefully
  • Loading branch information
LTS-FFXIV authored Oct 25, 2024
2 parents fee5ea2 + f587866 commit 7e0ffab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ public static IBattleChara? DispelTarget
{
get
{
var weakenPeople = DataCenter.PartyMembers
.Where(o => o is IBattleChara b && b.StatusList != null && b.StatusList.Any(StatusHelper.CanDispel));
var weakenNPC = DataCenter.FriendlyNPCMembers
.Where(o => o is IBattleChara b && b.StatusList != null && b.StatusList.Any(StatusHelper.CanDispel));
var weakenPeople = DataCenter.PartyMembers?
.Where(o => o is IBattleChara b && b.StatusList != null && b.StatusList.Any(StatusHelper.CanDispel)) ?? Enumerable.Empty<IBattleChara>();
var weakenNPC = DataCenter.FriendlyNPCMembers?
.Where(o => o is IBattleChara b && b.StatusList != null && b.StatusList.Any(StatusHelper.CanDispel)) ?? Enumerable.Empty<IBattleChara>();
var dyingPeople = weakenPeople
.Where(o => o is IBattleChara b && b.StatusList != null && b.StatusList.Any(StatusHelper.IsDangerous));

Expand Down

0 comments on commit 7e0ffab

Please sign in to comment.