diff --git a/QuestPaths/quest-v1.json b/QuestPaths/quest-v1.json index 9502f77ae..e5d946bd5 100644 --- a/QuestPaths/quest-v1.json +++ b/QuestPaths/quest-v1.json @@ -579,6 +579,7 @@ "AfterInteraction", "AfterItemUse", "AfterAction", + "AfterEmote", "OverworldEnemies", "FateEnemies" ] diff --git a/Questionable.Model/Questing/Converter/EnemySpawnTypeConverter.cs b/Questionable.Model/Questing/Converter/EnemySpawnTypeConverter.cs index 4abc27395..1b43eaf43 100644 --- a/Questionable.Model/Questing/Converter/EnemySpawnTypeConverter.cs +++ b/Questionable.Model/Questing/Converter/EnemySpawnTypeConverter.cs @@ -10,6 +10,7 @@ public sealed class EnemySpawnTypeConverter() : EnumConverter(V { EEnemySpawnType.AfterInteraction, "AfterInteraction" }, { EEnemySpawnType.AfterItemUse, "AfterItemUse" }, { EEnemySpawnType.AfterAction, "AfterAction" }, + { EEnemySpawnType.AfterEmote, "AfterEmote" }, { EEnemySpawnType.AutoOnEnterArea, "AutoOnEnterArea" }, { EEnemySpawnType.OverworldEnemies, "OverworldEnemies" }, { EEnemySpawnType.FateEnemies, "FateEnemies" }, diff --git a/Questionable.Model/Questing/EEnemySpawnType.cs b/Questionable.Model/Questing/EEnemySpawnType.cs index b7e5332e2..e4f49433f 100644 --- a/Questionable.Model/Questing/EEnemySpawnType.cs +++ b/Questionable.Model/Questing/EEnemySpawnType.cs @@ -10,6 +10,7 @@ public enum EEnemySpawnType AfterInteraction, AfterItemUse, AfterAction, + AfterEmote, AutoOnEnterArea, OverworldEnemies, FateEnemies, diff --git a/Questionable/Controller/Steps/Interactions/Combat.cs b/Questionable/Controller/Steps/Interactions/Combat.cs index 514f15752..12a41d605 100644 --- a/Questionable/Controller/Steps/Interactions/Combat.cs +++ b/Questionable/Controller/Steps/Interactions/Combat.cs @@ -33,17 +33,14 @@ internal static class Combat switch (step.EnemySpawnType) { case EEnemySpawnType.AfterInteraction: - { ArgumentNullException.ThrowIfNull(step.DataId); yield return new Interact.Task(step.DataId.Value, quest, EInteractionType.None, true); yield return new WaitAtEnd.WaitDelay(TimeSpan.FromSeconds(1)); yield return CreateTask(quest, sequence, step); break; - } case EEnemySpawnType.AfterItemUse: - { ArgumentNullException.ThrowIfNull(step.DataId); ArgumentNullException.ThrowIfNull(step.ItemId); @@ -52,10 +49,8 @@ internal static class Combat yield return new WaitAtEnd.WaitDelay(TimeSpan.FromSeconds(1)); yield return CreateTask(quest, sequence, step); break; - } case EEnemySpawnType.AfterAction: - { ArgumentNullException.ThrowIfNull(step.DataId); ArgumentNullException.ThrowIfNull(step.Action); @@ -65,7 +60,18 @@ internal static class Combat yield return new WaitAtEnd.WaitDelay(TimeSpan.FromSeconds(1)); yield return CreateTask(quest, sequence, step); break; - } + + case EEnemySpawnType.AfterEmote: + ArgumentNullException.ThrowIfNull(step.Emote); + + yield return new Mount.UnmountTask(); + if (step.DataId != null) + yield return new Emote.UseOnObject(step.Emote.Value, step.DataId.Value); + else + yield return new Emote.UseOnSelf(step.Emote.Value); + yield return new WaitAtEnd.WaitDelay(TimeSpan.FromSeconds(1)); + yield return CreateTask(quest, sequence, step); + break; case EEnemySpawnType.AutoOnEnterArea: if (step.CombatDelaySecondsAtStart == null)