1
0
Fork 0

Compare commits

..

3 Commits

2 changed files with 19 additions and 3 deletions

View File

@ -88,7 +88,14 @@
"TerritoryId": 814,
"InteractionType": "Interact",
"AetheryteShortcut": "Kholusia - Wright",
"Fly": true
"Fly": true,
"DialogueChoices": [
{
"Type": "List",
"Prompt": "TEXT_BANPIX002_03684_Q1_000_000",
"Answer": "TEXT_BANPIX002_03684_A1_000_001"
}
]
}
]
},

View File

@ -29,7 +29,7 @@ internal static class Mount
public ITask Unmount()
{
return new UnmountTask(condition, loggerFactory.CreateLogger<UnmountTask>(), gameFunctions);
return new UnmountTask(condition, loggerFactory.CreateLogger<UnmountTask>(), gameFunctions, clientState);
}
}
@ -119,7 +119,11 @@ internal static class Mount
public override string ToString() => "Mount";
}
private sealed class UnmountTask(ICondition condition, ILogger<UnmountTask> logger, GameFunctions gameFunctions)
private sealed class UnmountTask(
ICondition condition,
ILogger<UnmountTask> logger,
GameFunctions gameFunctions,
IClientState clientState)
: ITask
{
private bool _unmountTriggered;
@ -148,6 +152,9 @@ internal static class Mount
if (_continueAt >= DateTime.Now)
return ETaskResult.StillRunning;
if (IsUnmounting())
return ETaskResult.StillRunning;
if (!_unmountTriggered)
{
// if still flying, we still need to land
@ -172,6 +179,8 @@ internal static class Mount
: ETaskResult.TaskComplete;
}
private unsafe bool IsUnmounting() => **(byte**)(clientState.LocalPlayer!.Address + 1432) == 1;
public override string ToString() => "Unmount";
}