From 4c7eedfd772a963970808502f76beaa3e467e601 Mon Sep 17 00:00:00 2001 From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:09:37 -0600 Subject: [PATCH] Update ECommons submodule and validate ClassJob in BaseAction Updated ECommons submodule to commit 110b75972e45aa0765ce99d99b69d928e2d3e747. In BaseAction, added validation for Action.ClassJob within the RotationActionConfig check. If ClassJob is invalid, log an error and return the value. --- ECommons | 2 +- RotationSolver.Basic/Actions/BaseAction.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ECommons b/ECommons index 3673f3c1e..110b75972 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 3673f3c1e2fa1d68f7ab4c04463fd376d5659e13 +Subproject commit 110b75972e45aa0765ce99d99b69d928e2d3e747 diff --git a/RotationSolver.Basic/Actions/BaseAction.cs b/RotationSolver.Basic/Actions/BaseAction.cs index 1fc40b8d0..2c6ca0f53 100644 --- a/RotationSolver.Basic/Actions/BaseAction.cs +++ b/RotationSolver.Basic/Actions/BaseAction.cs @@ -85,7 +85,15 @@ public ActionConfig Config value = Setting.CreateConfig?.Invoke() ?? new ActionConfig(); Service.Config.RotationActionConfig[ID] = value; + if (!Action.ClassJob.IsValid) + { + // Log the error for debugging purposes + Svc.Log.Debug($"ClassJob is not valid for Action ID: {ID}"); + return value; + } + var classJob = Action.ClassJob.Value; + if (classJob.RowId != 0 && classJob.GetJobRole() == JobRole.Tank) { value.AoeCount = 2;