1
0
forked from liza/Questionable

Add EnemySpawnType: AfterEmote

This commit is contained in:
Liza 2024-09-23 16:25:23 +02:00
parent 01c88ecb84
commit 4767af7cc5
Signed by: liza
GPG Key ID: 7199F8D727D55F67
4 changed files with 15 additions and 6 deletions

View File

@ -579,6 +579,7 @@
"AfterInteraction",
"AfterItemUse",
"AfterAction",
"AfterEmote",
"OverworldEnemies",
"FateEnemies"
]

View File

@ -10,6 +10,7 @@ public sealed class EnemySpawnTypeConverter() : EnumConverter<EEnemySpawnType>(V
{ EEnemySpawnType.AfterInteraction, "AfterInteraction" },
{ EEnemySpawnType.AfterItemUse, "AfterItemUse" },
{ EEnemySpawnType.AfterAction, "AfterAction" },
{ EEnemySpawnType.AfterEmote, "AfterEmote" },
{ EEnemySpawnType.AutoOnEnterArea, "AutoOnEnterArea" },
{ EEnemySpawnType.OverworldEnemies, "OverworldEnemies" },
{ EEnemySpawnType.FateEnemies, "FateEnemies" },

View File

@ -10,6 +10,7 @@ public enum EEnemySpawnType
AfterInteraction,
AfterItemUse,
AfterAction,
AfterEmote,
AutoOnEnterArea,
OverworldEnemies,
FateEnemies,

View File

@ -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)