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, "Sequence": 255,
"Steps": [ "Steps": [
{
"Position": {
"X": 0.1512314,
"Y": 1.9999986,
"Z": 19.4396
},
"TerritoryId": 351,
"InteractionType": "WalkTo"
},
{ {
"DataId": 1033896, "DataId": 1033896,
"Position": { "Position": {

View File

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

View File

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

View File

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