148 lines
6.3 KiB
C#
148 lines
6.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
using Questionable.Controller.Steps.Common;
|
|
using Questionable.Model;
|
|
using Questionable.Model.Questing;
|
|
|
|
namespace Questionable.Controller.Steps.Shared;
|
|
|
|
internal static class WaitAtStart
|
|
{
|
|
internal sealed class Factory : SimpleTaskFactory
|
|
{
|
|
public override ITask? CreateTask(Quest quest, QuestSequence sequence, QuestStep step)
|
|
{
|
|
int num = (_202C_202C_206A_206A_206F_200F_202E_200C_206E_202D_206E_202D_206C_206B_202C_202B_200E_200B_200C_206A_200C_206F_200D_200F_200D_200D_202A_202C_202A_202A_200E_202A_206F_202A_202B_200E_206E_202A_206C_202B_202E(step).HasValue ? 917790050 : 917790049);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 917790048;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
goto IL_0050;
|
|
case 1:
|
|
return null;
|
|
case 2:
|
|
return new WaitDelay(TimeSpan.FromSeconds(_202C_202C_206A_206A_206F_200F_202E_200C_206E_202D_206E_202D_206C_206B_202C_202B_200E_200B_200C_206A_200C_206F_200D_200F_200D_200D_202A_202C_202A_202A_200E_202A_206F_202A_202B_200E_206E_202A_206C_202B_202E(step).Value));
|
|
}
|
|
continue;
|
|
IL_0050:
|
|
num = 917790049;
|
|
}
|
|
}
|
|
|
|
static float? _202C_202C_206A_206A_206F_200F_202E_200C_206E_202D_206E_202D_206C_206B_202C_202B_200E_200B_200C_206A_200C_206F_200D_200F_200D_200D_202A_202C_202A_202A_200E_202A_206F_202A_202B_200E_206E_202A_206C_202B_202E(QuestStep P_0)
|
|
{
|
|
return P_0.DelaySecondsAtStart;
|
|
}
|
|
}
|
|
|
|
internal sealed record WaitDelay(TimeSpan Delay) : ITask
|
|
{
|
|
[CompilerGenerated]
|
|
private Type EqualityContract
|
|
{
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return _202B_200F_206B_200D_206E_206B_206D_202E_206C_200B_200F_206B_202A_200D_202C_206F_206F_206C_202B_200E_200F_206A_202B_202D_206D_206D_206D_206E_200C_206A_200E_200E_206B_202D_206F_200B_206B_206A_202B_200C_202E(typeof(WaitDelay).TypeHandle);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override string ToString()
|
|
{
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(18, 1);
|
|
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(-761909785));
|
|
defaultInterpolatedStringHandler.AppendFormatted(Delay.TotalSeconds);
|
|
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(424561659));
|
|
return defaultInterpolatedStringHandler.ToStringAndClear();
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
[CompilerGenerated]
|
|
private bool PrintMembers(StringBuilder builder)
|
|
{
|
|
_206A_200E_206B_202D_202D_206C_202E_206F_202A_200F_206B_200C_206B_202D_200C_206C_206D_200F_206B_206D_206D_200C_202A_200D_206B_206C_202C_200D_206B_202C_206A_206F_206A_206B_200B_206E_200B_206A_202B_206B_202E();
|
|
_200E_202A_206F_206B_206D_200E_202D_206A_206D_206A_200B_202D_200E_206E_202D_206E_200E_200E_200D_202E_202C_200D_202E_206E_200F_200C_200D_200F_200C_200C_202A_206C_200F_206F_202B_206F_202B_202E_202A_202E(builder, global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(484837343));
|
|
_200E_202A_206F_206B_206D_200E_202D_206A_206D_206A_200B_202D_200E_206E_202D_206E_200E_200E_200D_202E_202C_200D_202E_206E_200F_200C_200D_200F_200C_200C_202A_206C_200F_206F_202B_206F_202B_202E_202A_202E(builder, Delay.ToString());
|
|
return true;
|
|
}
|
|
|
|
[CompilerGenerated]
|
|
public bool Equals(WaitDelay? other)
|
|
{
|
|
int num = (((object)this == other) ? 1541411164 : 1541411161);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1541411165;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 1:
|
|
return true;
|
|
case 2:
|
|
num = ((!_202D_200D_206A_206E_200F_202C_202B_200E_206D_200C_200E_206B_200D_206C_206D_200D_202E_206B_206F_200E_206B_200C_200C_200E_200F_206D_202D_202B_206D_200D_202C_200D_202E_206B_200B_202C_200D_202E_206A_202D_202E(EqualityContract, other.EqualityContract)) ? 1541411160 : 1541411166);
|
|
break;
|
|
case 4:
|
|
num = (((object)other == null) ? 1541411160 : 1541411167);
|
|
break;
|
|
case 5:
|
|
return false;
|
|
case 0:
|
|
num = 1541411161;
|
|
break;
|
|
case 3:
|
|
return EqualityComparer<TimeSpan>.Default.Equals(Delay, other.Delay);
|
|
}
|
|
}
|
|
}
|
|
|
|
bool IEquatable<WaitDelay>.Equals(WaitDelay? other)
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
|
return this.Equals(other);
|
|
}
|
|
|
|
static Type _202B_200F_206B_200D_206E_206B_206D_202E_206C_200B_200F_206B_202A_200D_202C_206F_206F_206C_202B_200E_200F_206A_202B_202D_206D_206D_206D_206E_200C_206A_200E_200E_206B_202D_206F_200B_206B_206A_202B_200C_202E(RuntimeTypeHandle P_0)
|
|
{
|
|
return Type.GetTypeFromHandle(P_0);
|
|
}
|
|
|
|
static void _206A_200E_206B_202D_202D_206C_202E_206F_202A_200F_206B_200C_206B_202D_200C_206C_206D_200F_206B_206D_206D_200C_202A_200D_206B_206C_202C_200D_206B_202C_206A_206F_206A_206B_200B_206E_200B_206A_202B_206B_202E()
|
|
{
|
|
RuntimeHelpers.EnsureSufficientExecutionStack();
|
|
}
|
|
|
|
static StringBuilder _200E_202A_206F_206B_206D_200E_202D_206A_206D_206A_200B_202D_200E_206E_202D_206E_200E_200E_200D_202E_202C_200D_202E_206E_200F_200C_200D_200F_200C_200C_202A_206C_200F_206F_202B_206F_202B_202E_202A_202E(StringBuilder P_0, string P_1)
|
|
{
|
|
return P_0.Append(P_1);
|
|
}
|
|
|
|
static bool _202D_200D_206A_206E_200F_202C_202B_200E_206D_200C_200E_206B_200D_206C_206D_200D_202E_206B_206F_200E_206B_200C_200C_200E_200F_206D_202D_202B_206D_200D_202C_200D_202E_206B_200B_202C_200D_202E_206A_202D_202E(Type P_0, Type P_1)
|
|
{
|
|
return P_0 == P_1;
|
|
}
|
|
}
|
|
|
|
internal sealed class WaitDelayExecutor : AbstractDelayedTaskExecutor<WaitDelay>
|
|
{
|
|
protected override bool StartInternal()
|
|
{
|
|
base.Delay = base.Task.Delay;
|
|
return true;
|
|
}
|
|
|
|
public override bool ShouldInterruptOnDamage()
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|