1
0
forked from liza/Questionable

Fix for potentially getting stuck during accepting quests

This commit is contained in:
Liza 2024-07-13 13:47:15 +02:00
parent ab9bc41805
commit 73c6aae1e2
Signed by: liza
GPG Key ID: 7199F8D727D55F67
4 changed files with 15 additions and 4 deletions

View File

@ -60,6 +60,15 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 0.1512314,
"Y": 1.9999986,
"Z": 19.4396
},
"TerritoryId": 351,
"InteractionType": "WalkTo"
},
{
"DataId": 1033896,
"Position": {

View File

@ -12,7 +12,7 @@
"Y": 64.45569,
"Z": -242.66425
},
"StopDistance": 5,
"StopDistance": 7,
"TerritoryId": 180,
"InteractionType": "AcceptQuest"
}

View File

@ -12,6 +12,7 @@
"Y": 83.2,
"Z": 15.121643
},
"StopDistance": 5,
"TerritoryId": 130,
"InteractionType": "AcceptQuest"
}

View File

@ -112,9 +112,10 @@ internal sealed class QuestController
if (CurrentQuest != null && CurrentQuest.Quest.Root.TerritoryBlacklist.Contains(_clientState.TerritoryType))
return;
if (_automatic && _currentTask == null && _taskQueue.Count == 0
&& CurrentQuest is { Sequence: 0, Step: 0 } or { Sequence: 0, Step: 255 }
&& DateTime.Now >= CurrentQuest.StepProgress.StartedAt.AddSeconds(15))
if (_automatic && ((_currentTask == null && _taskQueue.Count == 0) ||
_currentTask is WaitAtEnd.WaitQuestAccepted)
&& CurrentQuest is { Sequence: 0, Step: 0 } or { Sequence: 0, Step: 255 }
&& DateTime.Now >= CurrentQuest.StepProgress.StartedAt.AddSeconds(15))
{
lock (_lock)
{