Support 'ChatMessage' in CompleteQuest steps
authorLiza Carvelli <liza@carvel.li>
Tue, 27 Aug 2024 19:14:22 +0000 (21:14 +0200)
committerLiza Carvelli <liza@carvel.li>
Tue, 27 Aug 2024 19:14:22 +0000 (21:14 +0200)
Questionable/Controller/Steps/Interactions/Interact.cs
Questionable/Controller/Steps/Interactions/Say.cs

index c826fef5db36cf5bb94ca3edb10896dec4ad179c..b79fa9047f7b7a79d4b93709f4ab857af3bfcd60 100644 (file)
@@ -28,6 +28,9 @@ internal static class Interact
                 if (step.Emote != null)
                     yield break;
 
+                if (step.ChatMessage != null)
+                    yield break;
+
                 if (step.DataId == null)
                     yield break;
             }
index 7b8855a18c0a45eadc23f062639a25b7c92e35ca..3d917b333ea103cd03d8c416608ee13224674179 100644 (file)
@@ -17,7 +17,12 @@ internal static class Say
     {
         public IEnumerable<ITask> CreateAllTasks(Quest quest, QuestSequence sequence, QuestStep step)
         {
-            if (step.InteractionType != EInteractionType.Say)
+            if (step.InteractionType is EInteractionType.AcceptQuest or EInteractionType.CompleteQuest)
+            {
+                if (step.ChatMessage == null)
+                    return [];
+            }
+            else if (step.InteractionType != EInteractionType.Say)
                 return [];