109 lines
3.1 KiB
C#
109 lines
3.1 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.FatePaths;
|
|
|
|
public static class AssemblyFateDefinitionLoader
|
|
{
|
|
private static Dictionary<ushort, FateDefinition>? _definitions;
|
|
|
|
public static Stream FateDefinitionSchema => typeof(AssemblyFateDefinitionLoader).Assembly.GetManifestResourceStream("Questionable.FatePaths.FateDefinitionSchema");
|
|
|
|
public static IReadOnlyDictionary<ushort, FateDefinition> GetDefinitions()
|
|
{
|
|
if (_definitions == null)
|
|
{
|
|
_definitions = new Dictionary<ushort, FateDefinition>();
|
|
LoadDefinitions();
|
|
}
|
|
return _definitions ?? throw new InvalidOperationException("fate definition data is not initialized");
|
|
}
|
|
|
|
private static void AddDefinition(ushort id, FateDefinition definition)
|
|
{
|
|
_definitions[id] = definition;
|
|
}
|
|
|
|
private static void LoadDefinitions()
|
|
{
|
|
LoadDefinition0();
|
|
}
|
|
|
|
private static void LoadDefinition0()
|
|
{
|
|
FateDefinition obj = new FateDefinition
|
|
{
|
|
Name = "Little Ladies' Day (2026)",
|
|
Description = "Cheer Rhythm FATE in Ul'dah - Steps of Nald",
|
|
TerritoryId = 130,
|
|
Aetheryte = EAetheryteLocation.Uldah,
|
|
Position = new Vector3(-38.322124f, 3.9999998f, -144.23155f)
|
|
};
|
|
int num = 4;
|
|
List<FateActionTarget> list = new List<FateActionTarget>(num);
|
|
CollectionsMarshal.SetCount(list, num);
|
|
Span<FateActionTarget> span = CollectionsMarshal.AsSpan(list);
|
|
int num2 = 0;
|
|
span[num2] = new FateActionTarget
|
|
{
|
|
DataId = 18862u,
|
|
Action = EAction.CheerRhythmYellow
|
|
};
|
|
num2++;
|
|
span[num2] = new FateActionTarget
|
|
{
|
|
DataId = 18860u,
|
|
Action = EAction.CheerRhythmBlue
|
|
};
|
|
num2++;
|
|
span[num2] = new FateActionTarget
|
|
{
|
|
DataId = 18861u,
|
|
Action = EAction.CheerRhythmGreen
|
|
};
|
|
num2++;
|
|
span[num2] = new FateActionTarget
|
|
{
|
|
DataId = 18859u,
|
|
Action = EAction.CheerRhythmRed
|
|
};
|
|
obj.Targets = list;
|
|
obj.RequiredStatusId = EStatus.FaceInTheCrowd;
|
|
obj.TransformNpcDataId = 1055771u;
|
|
obj.TransformNpcPosition = new Vector3(-37.369385f, 5.0000005f, -130.14423f);
|
|
num2 = 3;
|
|
List<DialogueChoice> list2 = new List<DialogueChoice>(num2);
|
|
CollectionsMarshal.SetCount(list2, num2);
|
|
Span<DialogueChoice> span2 = CollectionsMarshal.AsSpan(list2);
|
|
num = 0;
|
|
span2[num] = new DialogueChoice
|
|
{
|
|
Type = EDialogChoiceType.List,
|
|
ExcelSheet = "custom/009/FesPdy2026FateDisguise_00951",
|
|
Prompt = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_Q1_000_000"),
|
|
Answer = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_A1_000_001")
|
|
};
|
|
num++;
|
|
span2[num] = new DialogueChoice
|
|
{
|
|
Type = EDialogChoiceType.List,
|
|
ExcelSheet = "custom/009/FesPdy2026FateDisguise_00951",
|
|
Prompt = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_Q2_000_000"),
|
|
Answer = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_A2_100_004")
|
|
};
|
|
num++;
|
|
span2[num] = new DialogueChoice
|
|
{
|
|
Type = EDialogChoiceType.YesNo,
|
|
ExcelSheet = "custom/009/FesPdy2026FateDisguise_00951",
|
|
Prompt = new ExcelRef("TEXT_FESPDY2026FATEDISGUISE_00951_CONFIRM_100_004")
|
|
};
|
|
obj.TransformDialogueChoices = list2;
|
|
AddDefinition(1, obj);
|
|
}
|
|
}
|