Compare commits

...

7 Commits
v4.2 ... master

35 changed files with 1110 additions and 408 deletions

View File

@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>4.2</Version>
<Version>4.3</Version>
</PropertyGroup>
</Project>

View File

@ -3,16 +3,12 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization.Metadata;
using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.Command;
using Dalamud.Plugin.Services;
using Lumina.Excel.GeneratedSheets;
using Lumina.Excel.Sheets;
using Questionable.Model;
using Questionable.Model.Gathering;
using Questionable.Model.Questing;
@ -70,14 +66,14 @@ internal sealed class EditorCommands : IDisposable
if (target == null || target.ObjectKind != ObjectKind.GatheringPoint)
throw new Exception("No valid target");
var gatheringPoint = _dataManager.GetExcelSheet<GatheringPoint>()!.GetRow(target.DataId);
var gatheringPoint = _dataManager.GetExcelSheet<GatheringPoint>().GetRowOrDefault(target.DataId);
if (gatheringPoint == null)
throw new Exception("Invalid gathering point");
FileInfo targetFile;
GatheringRoot root;
var locationsInTerritory = _plugin.GetLocationsInTerritory(_clientState.TerritoryType).ToList();
var location = locationsInTerritory.SingleOrDefault(x => x.Id == gatheringPoint.GatheringPointBase.Row);
var location = locationsInTerritory.SingleOrDefault(x => x.Id == gatheringPoint.Value.GatheringPointBase.RowId);
if (location != null)
{
targetFile = location.File;
@ -96,7 +92,7 @@ internal sealed class EditorCommands : IDisposable
}
else
{
(targetFile, root) = CreateNewFile(gatheringPoint, target);
(targetFile, root) = CreateNewFile(gatheringPoint.Value, target);
_chatGui.Print($"Creating new file under {targetFile.FullName}", "qG");
}
@ -174,16 +170,16 @@ internal sealed class EditorCommands : IDisposable
?.File.Directory;
if (targetFolder == null)
{
var territoryInfo = _dataManager.GetExcelSheet<TerritoryType>()!.GetRow(_clientState.TerritoryType)!;
var territoryInfo = _dataManager.GetExcelSheet<TerritoryType>().GetRow(_clientState.TerritoryType);
targetFolder = _plugin.PathsDirectory
.CreateSubdirectory(ExpansionData.ExpansionFolders[(EExpansionVersion)territoryInfo.ExVersion.Row])
.CreateSubdirectory(territoryInfo.PlaceName.Value!.Name.ToString());
.CreateSubdirectory(ExpansionData.ExpansionFolders[(EExpansionVersion)territoryInfo.ExVersion.RowId])
.CreateSubdirectory(territoryInfo.PlaceName.Value.Name.ToString());
}
FileInfo targetFile =
new FileInfo(
Path.Combine(targetFolder.FullName,
$"{gatheringPoint.GatheringPointBase.Row}_{gatheringPoint.PlaceName.Value!.Name}_{(_clientState.LocalPlayer!.ClassJob.Id == 16 ? "MIN" : "BTN")}.json"));
$"{gatheringPoint.GatheringPointBase.RowId}_{gatheringPoint.PlaceName.Value.Name}_{(_clientState.LocalPlayer!.ClassJob.RowId == 16 ? "MIN" : "BTN")}.json"));
var root = new GatheringRoot
{
Author = [_configuration.AuthorName],

View File

@ -59,7 +59,7 @@ public sealed class RendererPlugin : IDalamudPlugin
_editorWindow = new EditorWindow(this, _editorCommands, dataManager, targetManager, clientState, objectTable)
{ IsOpen = true };
_windowSystem.AddWindow(_editorWindow);
_currentClassJob = (EClassJob?)_clientState.LocalPlayer?.ClassJob.Id ?? EClassJob.Adventurer;
_currentClassJob = (EClassJob?)_clientState.LocalPlayer?.ClassJob.RowId ?? EClassJob.Adventurer;
_pluginInterface.GetIpcSubscriber<object>("Questionable.ReloadData")
.Subscribe(Reload);

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using Dalamud.Game.ClientState.Objects;
@ -11,7 +10,7 @@ using Dalamud.Interface.Colors;
using Dalamud.Interface.Windowing;
using Dalamud.Plugin.Services;
using ImGuiNET;
using Lumina.Excel.GeneratedSheets;
using Lumina.Excel.Sheets;
using Questionable.Model.Gathering;
namespace GatheringPathRenderer.Windows;
@ -205,12 +204,12 @@ internal sealed class EditorWindow : Window
}
else if (_target != null)
{
var gatheringPoint = _dataManager.GetExcelSheet<GatheringPoint>()!.GetRow(_target.DataId);
var gatheringPoint = _dataManager.GetExcelSheet<GatheringPoint>().GetRowOrDefault(_target.DataId);
if (gatheringPoint == null)
return;
var locationsInTerritory = _plugin.GetLocationsInTerritory(_clientState.TerritoryType).ToList();
var location = locationsInTerritory.SingleOrDefault(x => x.Id == gatheringPoint.GatheringPointBase.Row);
var location = locationsInTerritory.SingleOrDefault(x => x.Id == gatheringPoint.Value.GatheringPointBase.RowId);
if (location != null)
{
var targetFile = location.File;
@ -234,9 +233,9 @@ internal sealed class EditorWindow : Window
}
else
{
if (ImGui.Button($"Create location ({gatheringPoint.GatheringPointBase.Row})"))
if (ImGui.Button($"Create location ({gatheringPoint.Value.GatheringPointBase.RowId})"))
{
var (targetFile, root) = _editorCommands.CreateNewFile(gatheringPoint, _target);
var (targetFile, root) = _editorCommands.CreateNewFile(gatheringPoint.Value, _target);
_plugin.Save(targetFile, root);
}
}

View File

@ -0,0 +1,118 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1016093,
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"TerritoryId": 401,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1016219,
"Position": {
"X": 14.389221,
"Y": -111.05486,
"Z": 413.71777
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 1016217,
"Position": {
"X": 97.48987,
"Y": -86.45681,
"Z": 466.57495
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 1016218,
"Position": {
"X": 137.95679,
"Y": -87.380325,
"Z": 434.62268
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Sea of Clouds - Ok' Zundu"
}
]
}
]
}

View File

@ -62,6 +62,16 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
@ -70,8 +80,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -58,6 +58,16 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
@ -66,8 +76,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "Interact",
"Fly": true
"InteractionType": "Interact"
}
]
},
@ -102,6 +111,16 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
@ -110,8 +129,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -98,6 +98,17 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -106,9 +117,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -62,6 +62,17 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -70,9 +81,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -91,6 +91,17 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -99,9 +110,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -91,6 +91,17 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -99,9 +110,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -73,6 +73,17 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -81,9 +92,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -58,6 +58,17 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -66,9 +77,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "Interact",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "Interact"
}
]
},

View File

@ -1,114 +1,113 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1017031,
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"TerritoryId": 398,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 2006915,
"Position": {
"X": 96.45227,
"Y": -66.2395,
"Z": 616.6017
},
"TerritoryId": 398,
"InteractionType": "Action",
"Action": "Fumigate",
"Fly": true
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 2006916,
"Position": {
"X": -149.95044,
"Y": -55.25299,
"Z": 541.37476
},
"TerritoryId": 398,
"InteractionType": "Action",
"Action": "Fumigate",
"Fly": true
}
]
},
{
"Sequence": 4,
"Steps": [
{
"DataId": 2006917,
"Position": {
"X": -625.0859,
"Y": -49.94281,
"Z": 491.02002
},
"TerritoryId": 398,
"InteractionType": "Action",
"Action": "Fumigate",
"Fly": true
}
]
},
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 59.511234,
"Y": -48,
"Z": -171.35385
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"Land": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest"
}
]
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "AcceptQuest"
}
]
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1017031,
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"TerritoryId": 398,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 2006915,
"Position": {
"X": 96.45227,
"Y": -66.2395,
"Z": 616.6017
},
"TerritoryId": 398,
"InteractionType": "Action",
"Action": "Fumigate",
"Fly": true
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 2006916,
"Position": {
"X": -149.95044,
"Y": -55.25299,
"Z": 541.37476
},
"TerritoryId": 398,
"InteractionType": "Action",
"Action": "Fumigate",
"Fly": true
}
]
},
{
"Sequence": 4,
"Steps": [
{
"DataId": 2006917,
"Position": {
"X": -625.0859,
"Y": -49.94281,
"Z": 491.02002
},
"TerritoryId": 398,
"InteractionType": "Action",
"Action": "Fumigate",
"Fly": true
}
]
},
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest"
}
]
}
]
}

View File

@ -1,173 +1,173 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": 449.65012,
"Y": -51.141403,
"Z": 106.932205
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"Land": true,
"AetheryteShortcut": "The Dravanian Forelands - Tailfeather"
},
{
"DataId": 1011922,
"Position": {
"X": 448.56934,
"Y": -51.141407,
"Z": 108.93408
},
"TerritoryId": 398,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 2006918,
"Position": {
"X": 475.69995,
"Y": -44.174927,
"Z": -231.46417
},
"TerritoryId": 398,
"InteractionType": "Combat",
"EnemySpawnType": "AfterItemUse",
"ItemId": 2001961,
"KillEnemyDataIds": [
71224
],
"Fly": true,
"Land": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 2006920,
"Position": {
"X": 329.4879,
"Y": -45.487183,
"Z": -262.13477
},
"TerritoryId": 398,
"InteractionType": "Combat",
"EnemySpawnType": "AfterItemUse",
"ItemId": 2001961,
"KillEnemyDataIds": [
5548
],
"Fly": true,
"Land": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 2006919,
"Position": {
"X": 535.45435,
"Y": -32.39496,
"Z": -410.60504
},
"TerritoryId": 398,
"InteractionType": "Combat",
"EnemySpawnType": "AfterItemUse",
"ItemId": 2001961,
"KillEnemyDataIds": [
71224
],
"Fly": true,
"Land": true
}
]
},
{
"Sequence": 3,
"Steps": [
{
"Position": {
"X": 449.65012,
"Y": -51.141403,
"Z": 106.932205
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"Land": true,
"AetheryteShortcut": "The Dravanian Forelands - Tailfeather"
},
{
"DataId": 1011922,
"Position": {
"X": 448.56934,
"Y": -51.141407,
"Z": 108.93408
},
"TerritoryId": 398,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 59.511234,
"Y": -48,
"Z": -171.35385
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"Land": true
},
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest"
}
]
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "AcceptQuest"
}
]
]
},
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": 449.65012,
"Y": -51.141403,
"Z": 106.932205
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"Land": true,
"AetheryteShortcut": "The Dravanian Forelands - Tailfeather"
},
{
"DataId": 1011922,
"Position": {
"X": 448.56934,
"Y": -51.141407,
"Z": 108.93408
},
"TerritoryId": 398,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 2006918,
"Position": {
"X": 475.69995,
"Y": -44.174927,
"Z": -231.46417
},
"TerritoryId": 398,
"InteractionType": "Combat",
"EnemySpawnType": "AfterItemUse",
"ItemId": 2001961,
"KillEnemyDataIds": [
71224
],
"Fly": true,
"Land": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 2006920,
"Position": {
"X": 329.4879,
"Y": -45.487183,
"Z": -262.13477
},
"TerritoryId": 398,
"InteractionType": "Combat",
"EnemySpawnType": "AfterItemUse",
"ItemId": 2001961,
"KillEnemyDataIds": [
5548
],
"Fly": true,
"Land": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 2006919,
"Position": {
"X": 535.45435,
"Y": -32.39496,
"Z": -410.60504
},
"TerritoryId": 398,
"InteractionType": "Combat",
"EnemySpawnType": "AfterItemUse",
"ItemId": 2001961,
"KillEnemyDataIds": [
71224
],
"Fly": true,
"Land": true
}
]
},
{
"Sequence": 3,
"Steps": [
{
"Position": {
"X": 449.65012,
"Y": -51.141403,
"Z": 106.932205
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"Land": true,
"AetheryteShortcut": "The Dravanian Forelands - Tailfeather"
},
{
"DataId": 1011922,
"Position": {
"X": 448.56934,
"Y": -51.141407,
"Z": 108.93408
},
"TerritoryId": 398,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest"
}
]
}
]
}

View File

@ -78,6 +78,17 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -86,9 +97,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -55,6 +55,16 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
@ -63,8 +73,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -91,6 +91,17 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -99,9 +110,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "Interact",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "Interact"
}
]
},

View File

@ -0,0 +1,125 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1016865,
"Position": {
"X": -272.23627,
"Y": -35.408485,
"Z": 219.07373
},
"TerritoryId": 398,
"InteractionType": "Interact",
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 1016864,
"Position": {
"X": -452.32324,
"Y": -35.352047,
"Z": 174.30371
},
"TerritoryId": 398,
"InteractionType": "Interact",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1016866,
"Position": {
"X": -397.05505,
"Y": -34.192406,
"Z": 243.12195
},
"TerritoryId": 398,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
5551
],
"Fly": true
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 1016866,
"Position": {
"X": -397.05505,
"Y": -34.192406,
"Z": 243.12195
},
"TerritoryId": 398,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
"X": 57.297607,
"Y": -47.842846,
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest"
}
]
}
]
}

View File

@ -101,6 +101,16 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
@ -109,8 +119,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -100,6 +100,16 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
@ -108,8 +118,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -73,6 +73,17 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
},
{
"DataId": 1016803,
"Position": {
@ -81,9 +92,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Dravanian Forelands - Anyx Trine"
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -101,6 +101,16 @@
{
"Sequence": 255,
"Steps": [
{
"Position": {
"X": 58.39701,
"Y": -48.000008,
"Z": -172.36507
},
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1016803,
"Position": {
@ -109,8 +119,7 @@
"Z": -174.63953
},
"TerritoryId": 398,
"InteractionType": "CompleteQuest",
"Fly": true
"InteractionType": "CompleteQuest"
}
]
}

View File

@ -1,7 +1,6 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"Comment": "TODO untested how many RNG states this has",
"QuestSequence": [
{
"Sequence": 0,
@ -112,6 +111,32 @@
null,
null
]
},
{
"DataId": 2014490,
"Position": {
"X": 485.6183,
"Y": 10.8185425,
"Z": -281.7884
},
"TerritoryId": 1188,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
18173
],
"RequiredQuestVariables": [
null,
null,
[
{
"High": 3
}
],
null,
null,
null
]
}
]
},

View File

@ -1,7 +1,6 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
@ -28,6 +27,93 @@
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 2014497,
"Position": {
"X": -130.7851,
"Y": 114.39685,
"Z": 240.31421
},
"TerritoryId": 1188,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
18174
],
"AetheryteShortcut": "Kozama'uka - Earthenshire",
"Fly": true,
"RequiredQuestVariables": [
null,
null,
[
{
"High": 1
}
],
null,
null,
null
]
},
{
"DataId": 2014498,
"Position": {
"X": -56.565247,
"Y": 111.77234,
"Z": 172.62524
},
"TerritoryId": 1188,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
18174
],
"Fly": true,
"RequiredQuestVariables": [
null,
null,
[
{
"High": 2
}
],
null,
null,
null
]
},
{
"DataId": 2014499,
"Position": {
"X": -84.18408,
"Y": 111.436646,
"Z": 268.05518
},
"TerritoryId": 1188,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
18174
],
"Fly": true,
"RequiredQuestVariables": [
null,
null,
[
{
"High": 3
}
],
null,
null,
null
]
}
]
},
{
"Sequence": 255,
"Steps": [

View File

@ -1,7 +1,6 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
@ -28,6 +27,74 @@
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1052324,
"Position": {
"X": -248.18805,
"Y": 110.17465,
"Z": 189.01343
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"AetheryteShortcut": "Kozama'uka - Earthenshire",
"Fly": true
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1052326,
"Position": {
"X": -304.61584,
"Y": 110.20639,
"Z": 725.39856
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"Fly": true,
"RequiredQuestVariables": [
null,
[
{
"High": 2
}
],
null,
null,
null,
null
]
},
{
"DataId": 1052435,
"Position": {
"X": 505.76025,
"Y": 115.10293,
"Z": 205.7373
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"AetheryteShortcut": "Kozama'uka - Many Fires",
"RequiredQuestVariables": [
null,
[
{
"High": 1
}
],
null,
null,
null,
null
]
}
]
},
{
"Sequence": 255,
"Steps": [

View File

@ -1,7 +1,6 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
@ -28,6 +27,99 @@
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1051798,
"Position": {
"X": 897.734,
"Y": 6.8223433,
"Z": -285.1759
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"Fly": true
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1052328,
"Position": {
"X": 171.6792,
"Y": 16.762953,
"Z": -112.44379
},
"TerritoryId": 1188,
"InteractionType": "Action",
"Action": "Bosom Brook",
"Fly": true,
"RequiredQuestVariables": [
null,
null,
[
{
"High": 1
}
],
null,
null,
null
]
},
{
"DataId": 1052329,
"Position": {
"X": 216.7544,
"Y": 16.31888,
"Z": -99.687195
},
"TerritoryId": 1188,
"InteractionType": "Action",
"Action": "Bosom Brook",
"Fly": true,
"RequiredQuestVariables": [
null,
null,
[
{
"High": 2
}
],
null,
null,
null
]
},
{
"DataId": 1052327,
"Position": {
"X": 186.38892,
"Y": 21.742897,
"Z": -74.47931
},
"TerritoryId": 1188,
"InteractionType": "Action",
"Action": "Bosom Brook",
"Fly": true,
"RequiredQuestVariables": [
null,
null,
[
{
"High": 3
}
],
null,
null,
null
]
}
]
},
{
"Sequence": 255,
"Steps": [

View File

@ -1,7 +1,6 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "liza",
"Disabled": true,
"QuestSequence": [
{
"Sequence": 0,
@ -28,6 +27,84 @@
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1052333,
"Position": {
"X": 775.1736,
"Y": 12.871736,
"Z": -196.0022
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 1052335,
"Position": {
"X": 867.76526,
"Y": 14.402381,
"Z": -171.31305
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 1052334,
"Position": {
"X": 864.5609,
"Y": 15.056413,
"Z": -256.27533
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"Fly": true,
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 1052336,
"Position": {
"X": 838.4375,
"Y": 14.301746,
"Z": -222.06458
},
"TerritoryId": 1188,
"InteractionType": "Interact",
"Fly": true
}
]
},
{
"Sequence": 255,
"Steps": [
@ -39,7 +116,7 @@
},
"TerritoryId": 1188,
"InteractionType": "WalkTo",
"AetheryteShortcut": "Kozama'uka - Dock Poga"
"Fly": true
},
{
"DataId": 1051711,

View File

@ -965,7 +965,8 @@
"Katon",
"Raiton",
"Hide",
"Slug Shot"
"Slug Shot",
"Bosom Brook"
]
}
},

View File

@ -41,5 +41,6 @@ public sealed class ActionConverter() : EnumConverter<EAction>(Values)
{ EAction.Katon, "Katon" },
{ EAction.Raiton, "Raiton" },
{ EAction.SlugShot, "Slug Shot" },
{ EAction.BosomBrook, "Bosom Brook" },
};
}

View File

@ -47,6 +47,7 @@ public enum EAction
Raiton = 2267,
RabbitMedium = 2272,
SlugShot = 7412,
BosomBrook = 37173,
CollectMiner = 240,
ScourMiner = 22182,
@ -84,6 +85,7 @@ public static class EActionExtensions
or EAction.YellowGulal
or EAction.BlueGulal
or EAction.ElectrixFlux
or EAction.HopStep;
or EAction.HopStep
or EAction.BosomBrook;
}
}

View File

@ -98,7 +98,6 @@ internal sealed class InteractionUiController : IDisposable
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "SelectYesno", SelectYesnoPostSetup);
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "PointMenu", PointMenuPostSetup);
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "HousingSelectBlock", HousingSelectBlockPostSetup);
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, "TelepotTown", TeleportTownPostSetup);
unsafe
{
@ -848,46 +847,6 @@ internal sealed class InteractionUiController : IDisposable
addon->FireCallbackInt(0);
}
private void TeleportTownPostSetup(AddonEvent type, AddonArgs args)
{
if (ShouldHandleUiInteractions &&
_questController.HasCurrentTaskMatching(out AethernetShortcut.Task? aethernetShortcut) &&
aethernetShortcut.From.IsFirmamentAetheryte())
{
// this might be better via atkvalues; but this works for now
uint toIndex = aethernetShortcut.To switch
{
EAetheryteLocation.FirmamentMendicantsCourt => 0,
EAetheryteLocation.FirmamentMattock => 1,
EAetheryteLocation.FirmamentNewNest => 2,
EAetheryteLocation.FirmanentSaintRoellesDais => 3,
EAetheryteLocation.FirmamentFeatherfall => 4,
EAetheryteLocation.FirmamentHoarfrostHall => 5,
EAetheryteLocation.FirmamentWesternRisensongQuarter => 6,
EAetheryteLocation.FIrmamentEasternRisensongQuarter => 7,
_ => uint.MaxValue,
};
if (toIndex == uint.MaxValue)
return;
_logger.LogInformation("Teleporting to {ToName} with menu index {ToIndex}", aethernetShortcut.From,
toIndex);
unsafe
{
var teleportToDestination = stackalloc AtkValue[]
{
new() { Type = ValueType.Int, Int = 11 },
new() { Type = ValueType.UInt, UInt = toIndex }
};
var addon = (AtkUnitBase*)args.Addon;
addon->FireCallback(2, teleportToDestination);
addon->FireCallback(2, teleportToDestination, true);
}
}
}
private StringOrRegex? ResolveReference(Quest? quest, string? excelSheet, ExcelRef? excelRef, bool isRegExp)
{
if (excelRef == null)
@ -905,7 +864,6 @@ internal sealed class InteractionUiController : IDisposable
public void Dispose()
{
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "TelepotTown", TeleportTownPostSetup);
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "HousingSelectBlock", HousingSelectBlockPostSetup);
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "PointMenu", PointMenuPostSetup);
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "SelectYesno", SelectYesnoPostSetup);

View File

@ -205,17 +205,9 @@ internal static class AethernetShortcut
private void DoTeleport()
{
if (Task.From.IsFirmamentAetheryte())
{
logger.LogInformation("Using manual teleport interaction");
_teleported = gameFunctions.InteractWith((uint)Task.From, ObjectKind.EventObj);
}
else
{
logger.LogInformation("Using lifestream to teleport to {Destination}", Task.To);
lifestreamIpc.Teleport(Task.To);
_teleported = true;
}
logger.LogInformation("Using lifestream to teleport to {Destination}", Task.To);
lifestreamIpc.Teleport(Task.To);
_teleported = true;
}
public override ETaskResult Update()

View File

@ -1,5 +1,9 @@
using Dalamud.Plugin;
using System.Collections.Generic;
using Dalamud.Plugin;
using Dalamud.Plugin.Ipc;
using Dalamud.Plugin.Services;
using Lumina.Excel.Sheets;
using Microsoft.Extensions.Logging;
using Questionable.Data;
using Questionable.Model.Common;
@ -8,25 +12,40 @@ namespace Questionable.External;
internal sealed class LifestreamIpc
{
private readonly AetheryteData _aetheryteData;
private readonly IDataManager _dataManager;
private readonly ILogger<LifestreamIpc> _logger;
private readonly ICallGateSubscriber<string, bool> _aethernetTeleport;
public LifestreamIpc(IDalamudPluginInterface pluginInterface, AetheryteData aetheryteData)
public LifestreamIpc(IDalamudPluginInterface pluginInterface, AetheryteData aetheryteData, IDataManager dataManager, ILogger<LifestreamIpc> logger)
{
_aetheryteData = aetheryteData;
_dataManager = dataManager;
_logger = logger;
_aethernetTeleport = pluginInterface.GetIpcSubscriber<string, bool>("Lifestream.AethernetTeleport");
}
public bool Teleport(EAetheryteLocation aetheryteLocation)
{
if (aetheryteLocation == EAetheryteLocation.IshgardFirmament)
string? name = aetheryteLocation switch
{
// TODO does this even work on non-EN clients?
return _aethernetTeleport.InvokeFunc("Firmament");
}
EAetheryteLocation.IshgardFirmament => "Firmament",
EAetheryteLocation.FirmamentMendicantsCourt => GetPlaceName(3436),
EAetheryteLocation.FirmamentMattock => GetPlaceName(3473),
EAetheryteLocation.FirmamentNewNest => GetPlaceName(3475),
EAetheryteLocation.FirmanentSaintRoellesDais => GetPlaceName(3474),
EAetheryteLocation.FirmamentFeatherfall => GetPlaceName(3525),
EAetheryteLocation.FirmamentHoarfrostHall => GetPlaceName(3528),
EAetheryteLocation.FirmamentWesternRisensongQuarter => GetPlaceName(3646),
EAetheryteLocation.FIrmamentEasternRisensongQuarter => GetPlaceName(3645),
_ => _aetheryteData.AethernetNames.GetValueOrDefault(aetheryteLocation),
};
if (!_aetheryteData.AethernetNames.TryGetValue(aetheryteLocation, out string? name))
if (name == null)
return false;
_logger.LogInformation("Teleporting to '{Name}'", name);
return _aethernetTeleport.InvokeFunc(name);
}
private string GetPlaceName(uint rowId) => _dataManager.GetExcelSheet<PlaceName>().GetRow(rowId).Name.ToString();
}

View File

@ -243,6 +243,7 @@ internal sealed unsafe class QuestFunctions
{
return questId.Value switch
{
5215 => EAlliedSociety.None,
>= 5199 and <= 5226 => EAlliedSociety.Pelupelu,
_ => EAlliedSociety.None,
};