master #3

Open
cacahuetes wants to merge 640 commits from liza/Questionable:master into cacahuetes-ShB-Healer
4 changed files with 15 additions and 6 deletions
Showing only changes of commit 4767af7cc5 - Show all commits

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)