From 03ce68b4c4221c616d5e577b3341f1d012c87de1 Mon Sep 17 00:00:00 2001 From: Vld Mrk Date: Tue, 21 Jan 2025 17:32:21 +0100 Subject: [PATCH 1/2] Add null check for quests in EmpoweredNationItem to prevent loading failures --- Nation/Various/EmpoweredNationItem.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Nation/Various/EmpoweredNationItem.cs b/Nation/Various/EmpoweredNationItem.cs index 84b0fbb18..e4d021ed4 100644 --- a/Nation/Various/EmpoweredNationItem.cs +++ b/Nation/Various/EmpoweredNationItem.cs @@ -75,7 +75,12 @@ public void GetEmpoweredItem(EmpoweredItems Item) Core.AddDrop(Nation.bagDrops); foreach (int Quest in Core.FromTo(8694, 8701)) { - Quest q = Core.InitializeWithRetries(() => Core.EnsureLoad(Quest)); + Quest? q = Core.InitializeWithRetries(() => Core.EnsureLoad(Quest)); + if (q == null) + { + Core.Logger($"Failed to load quest with ID {Quest}"); + continue; + } Core.AddDrop(q.Rewards.Select(x => x.ID).ToArray()); } From 370e71e94df816faac2cb0462304eb97b0977c19 Mon Sep 17 00:00:00 2001 From: PUNK3DAF <78049813+PUNK3DAF@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:32:53 +0000 Subject: [PATCH 2/2] Automatic commit by GitHub Actions --- scripts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts.json b/scripts.json index d0298886d..42c2334c4 100644 --- a/scripts.json +++ b/scripts.json @@ -4884,7 +4884,7 @@ "evovled void armor" ], "path": "Nation/Various/EmpoweredNationItem.cs", - "size": 10120, + "size": 10272, "fileName": "EmpoweredNationItem.cs", "downloadUrl": "https://raw.githubusercontent.com/BrenoHenrike/Scripts/Skua/Nation/Various/EmpoweredNationItem.cs" },