From cd16cf93a3d39fdb533a0996e9866a50d357f76e Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 20 Sep 2024 21:46:10 +0200 Subject: [PATCH] Fix some EventHandler related code if in firmament --- Questionable/Controller/GameUi/InteractionUiController.cs | 4 ++-- Questionable/Controller/GatheringController.cs | 3 +-- Questionable/Controller/Steps/Leves/InitiateLeve.cs | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Questionable/Controller/GameUi/InteractionUiController.cs b/Questionable/Controller/GameUi/InteractionUiController.cs index 99b2dd51a..e94a57161 100644 --- a/Questionable/Controller/GameUi/InteractionUiController.cs +++ b/Questionable/Controller/GameUi/InteractionUiController.cs @@ -517,8 +517,8 @@ internal sealed class InteractionUiController : IDisposable _logger.LogTrace("Prompt: '{Prompt}'", actualPrompt); var director = UIState.Instance()->DirectorTodo.Director; - if (director != null && director->EventHandlerInfo != null && - director->EventHandlerInfo->EventId.ContentId == EventHandlerType.GatheringLeveDirector && + if (director != null && + director->Info.EventId.ContentId == EventHandlerType.GatheringLeveDirector && director->Sequence == 254) { // just close the dialogue for 'do you want to return to next settlement', should prolly be different for diff --git a/Questionable/Controller/GatheringController.cs b/Questionable/Controller/GatheringController.cs index f97a9b37e..4af7ede2e 100644 --- a/Questionable/Controller/GatheringController.cs +++ b/Questionable/Controller/GatheringController.cs @@ -135,8 +135,7 @@ internal sealed unsafe class GatheringController : MiniTaskControllerDirectorTodo.Director; - if (director != null && director->EventHandlerInfo != null && - director->EventHandlerInfo->EventId.ContentId == EventHandlerType.GatheringLeveDirector) + if (director != null && director->Info.EventId.ContentId == EventHandlerType.GatheringLeveDirector) { if (director->Sequence == 254) return; diff --git a/Questionable/Controller/Steps/Leves/InitiateLeve.cs b/Questionable/Controller/Steps/Leves/InitiateLeve.cs index 4014b2fb3..ab584cefc 100644 --- a/Questionable/Controller/Steps/Leves/InitiateLeve.cs +++ b/Questionable/Controller/Steps/Leves/InitiateLeve.cs @@ -44,8 +44,7 @@ internal static class InitiateLeve { var director = UIState.Instance()->DirectorTodo.Director; if (director != null && - director->EventHandlerInfo != null && - director->EventHandlerInfo->EventId.ContentId == EventHandlerType.GatheringLeveDirector && + director->Info.EventId.ContentId == EventHandlerType.GatheringLeveDirector && director->ContentId == Task.ElementId.Value) return ETaskResult.SkipRemainingTasksForStep;