Fix wrong command condition

This commit is contained in:
Liza 2024-07-17 21:42:49 +02:00
parent 8ec3583ffc
commit 83db1f9dce
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 9 additions and 4 deletions

View File

@ -65,6 +65,11 @@
"[Gridania] Lancers' Guild" "[Gridania] Lancers' Guild"
] ]
}, },
{
"TerritoryId": 152,
"InteractionType": "AttuneAetheryte",
"Aetheryte": "East Shroud - Hawthorne Hut"
},
{ {
"DataId": 1004886, "DataId": 1004886,
"Position": { "Position": {

View File

@ -101,9 +101,7 @@ internal sealed class CommandHandler : IDisposable
if (arguments.Length >= 1 && ushort.TryParse(arguments[0], out ushort questId)) if (arguments.Length >= 1 && ushort.TryParse(arguments[0], out ushort questId))
{ {
if (_gameFunctions.IsQuestLocked(questId, 0)) if (_questRegistry.TryGetQuest(questId, out Quest? quest))
_chatGui.PrintError($"[Questionable] Quest {questId} is locked.");
else if (_questRegistry.TryGetQuest(questId, out Quest? quest))
{ {
_debugOverlay.HighlightedQuest = questId; _debugOverlay.HighlightedQuest = questId;
_chatGui.Print($"[Questionable] Set highlighted quest to {questId} ({quest.Info.Name})."); _chatGui.Print($"[Questionable] Set highlighted quest to {questId} ({quest.Info.Name}).");
@ -122,7 +120,9 @@ internal sealed class CommandHandler : IDisposable
{ {
if (arguments.Length >= 1 && ushort.TryParse(arguments[0], out ushort questId)) if (arguments.Length >= 1 && ushort.TryParse(arguments[0], out ushort questId))
{ {
if (_questRegistry.TryGetQuest(questId, out Quest? quest)) if (_gameFunctions.IsQuestLocked(questId, 0))
_chatGui.PrintError($"[Questionable] Quest {questId} is locked.");
else if (_questRegistry.TryGetQuest(questId, out Quest? quest))
{ {
_questController.SetNextQuest(quest); _questController.SetNextQuest(quest);
_chatGui.Print($"[Questionable] Set next quest to {questId} ({quest.Info.Name})."); _chatGui.Print($"[Questionable] Set next quest to {questId} ({quest.Info.Name}).");