97 lines
3.3 KiB
C#
97 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Numerics;
|
|
using System.Runtime.InteropServices;
|
|
using Questionable.Model.Common;
|
|
using Questionable.Model.Questing;
|
|
|
|
namespace Questionable.SeasonalDutyPaths;
|
|
|
|
public static class AssemblySeasonalDutyDefinitionLoader
|
|
{
|
|
private static Dictionary<ushort, SeasonalDutyDefinition>? _definitions;
|
|
|
|
public static Stream SeasonalDutyDefinitionSchema => typeof(AssemblySeasonalDutyDefinitionLoader).Assembly.GetManifestResourceStream("Questionable.SeasonalDutyPaths.SeasonalDutyDefinitionSchema");
|
|
|
|
public static IReadOnlyDictionary<ushort, SeasonalDutyDefinition> GetDefinitions()
|
|
{
|
|
if (_definitions == null)
|
|
{
|
|
_definitions = new Dictionary<ushort, SeasonalDutyDefinition>();
|
|
LoadDefinitions();
|
|
}
|
|
return _definitions ?? throw new InvalidOperationException("seasonal duty definition data is not initialized");
|
|
}
|
|
|
|
private static void AddDefinition(ushort id, SeasonalDutyDefinition definition)
|
|
{
|
|
_definitions[id] = definition;
|
|
}
|
|
|
|
private static void LoadDefinitions()
|
|
{
|
|
LoadDefinition0();
|
|
}
|
|
|
|
private static void LoadDefinition0()
|
|
{
|
|
SeasonalDutyDefinition obj = new SeasonalDutyDefinition
|
|
{
|
|
Name = "Hatching-tide (2026)",
|
|
TerritoryId = 133,
|
|
Aetheryte = EAetheryteLocation.Gridania,
|
|
AethernetShortcut = new AethernetShortcut
|
|
{
|
|
From = EAetheryteLocation.Gridania,
|
|
To = EAetheryteLocation.GridaniaAmphitheatre
|
|
},
|
|
NpcDataId = 1056067u,
|
|
NpcPosition = new Vector3(-54.551025f, 6.851239f, -110.948364f)
|
|
};
|
|
int num = 1;
|
|
List<DialogueChoice> list = new List<DialogueChoice>(num);
|
|
CollectionsMarshal.SetCount(list, num);
|
|
CollectionsMarshal.AsSpan(list)[0] = new DialogueChoice
|
|
{
|
|
Type = EDialogChoiceType.List,
|
|
ExcelSheet = "custom/009/FesEst2026Entrance_00960",
|
|
Prompt = new ExcelRef("TEXT_FESEST2026ENTRANCE_00960_Q1_000_000"),
|
|
Answer = new ExcelRef("TEXT_FESEST2026ENTRANCE_00960_A1_000_001"),
|
|
PromptIsRegularExpression = true
|
|
};
|
|
obj.DialogueChoices = list;
|
|
obj.DutyTerritoryId = 1336;
|
|
num = 8;
|
|
List<uint> list2 = new List<uint>(num);
|
|
CollectionsMarshal.SetCount(list2, num);
|
|
Span<uint> span = CollectionsMarshal.AsSpan(list2);
|
|
span[0] = 2015072u;
|
|
span[1] = 2015073u;
|
|
span[2] = 2015074u;
|
|
span[3] = 2015075u;
|
|
span[4] = 2015076u;
|
|
span[5] = 2015077u;
|
|
span[6] = 2015078u;
|
|
span[7] = 2015079u;
|
|
obj.DataIds = list2;
|
|
num = 9;
|
|
List<Vector3> list3 = new List<Vector3>(num);
|
|
CollectionsMarshal.SetCount(list3, num);
|
|
Span<Vector3> span2 = CollectionsMarshal.AsSpan(list3);
|
|
span2[0] = new Vector3(-700.0023f, -0.15729797f, -721.67926f);
|
|
span2[1] = new Vector3(-700.1704f, -0.0301615f, 77.54147f);
|
|
span2[2] = new Vector3(-699.9926f, -0.021064043f, 877.55304f);
|
|
span2[3] = new Vector3(99.99213f, -0.100738764f, -721.9226f);
|
|
span2[4] = new Vector3(99.92716f, 4.7683716E-07f, 77.599335f);
|
|
span2[5] = new Vector3(100.40486f, 0.20596194f, 877.50397f);
|
|
span2[6] = new Vector3(899.93384f, 0.03615737f, -722.4109f);
|
|
span2[7] = new Vector3(900.052f, 0.23717809f, 77.897415f);
|
|
span2[8] = new Vector3(900.26733f, -0.30200624f, 877.5144f);
|
|
obj.WaypointPositions = list3;
|
|
obj.Action = EAction.PruningPirouette;
|
|
obj.RequiredQuestId = (ushort)5425;
|
|
obj.EventExpiry = new DateTime(2026, 4, 6, 14, 59, 0, DateTimeKind.Utc);
|
|
AddDefinition(1, obj);
|
|
}
|
|
}
|