From 49bed0d2beb854b8a5ecc8bc7a729808ecd89234 Mon Sep 17 00:00:00 2001
From: RisaDev <151885272+RisaDev@users.noreply.github.com>
Date: Sat, 29 Mar 2025 11:34:47 +0300
Subject: [PATCH] Sync with upstream
---
.../ReverseSearchDictBNpc.cs | 2 +-
.../ReverseSearchDictCompanion.cs | 2 +-
.../ReverseSearchDictENpc.cs | 2 +-
.../ReverseSearchDictMount.cs | 2 +-
.../ReverseSearchDictionaries/Versions.cs | 26 +++++++++++++++++++
5 files changed, 30 insertions(+), 4 deletions(-)
create mode 100644 CustomizePlus.GameData/ReverseSearchDictionaries/Versions.cs
diff --git a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictBNpc.cs b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictBNpc.cs
index 4920a45..5e67051 100644
--- a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictBNpc.cs
+++ b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictBNpc.cs
@@ -11,7 +11,7 @@ namespace CustomizePlus.GameData.ReverseSearchDictionaries;
/// A dictionary that matches names to battle npc ids.
public sealed class ReverseSearchDictBNpc(IDalamudPluginInterface pluginInterface, Logger log, IDataManager gameData)
- : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchBNpcs", 7, () => CreateBNpcData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchBNpcs", Versions.DictBNpc, () => CreateBNpcData(gameData))
{
/// Create the data.
private static IReadOnlyDictionary CreateBNpcData(IDataManager gameData)
diff --git a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictCompanion.cs b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictCompanion.cs
index 6fb496c..7cc6eaf 100644
--- a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictCompanion.cs
+++ b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictCompanion.cs
@@ -11,7 +11,7 @@ namespace CustomizePlus.GameData.ReverseSearchDictionaries;
/// A dictionary that matches companion names to their ids.
public sealed class ReverseSearchDictCompanion(IDalamudPluginInterface pluginInterface, Logger log, IDataManager gameData)
- : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchCompanions", 7, () => CreateCompanionData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchCompanions", Versions.DictCompanion, () => CreateCompanionData(gameData))
{
/// Create the data.
private static IReadOnlyDictionary CreateCompanionData(IDataManager gameData)
diff --git a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictENpc.cs b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictENpc.cs
index 1912c78..32afccc 100644
--- a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictENpc.cs
+++ b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictENpc.cs
@@ -11,7 +11,7 @@ namespace CustomizePlus.GameData.ReverseSearchDictionaries;
/// A dictionary that matches names to event npc ids.
public sealed class ReverseSearchDictENpc(IDalamudPluginInterface pluginInterface, Logger log, IDataManager gameData)
- : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchENpcs", 7, () => CreateENpcData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchENpcs", Versions.DictENpc, () => CreateENpcData(gameData))
{
/// Create the data.
private static IReadOnlyDictionary CreateENpcData(IDataManager gameData)
diff --git a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictMount.cs b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictMount.cs
index c2a9229..425c4c5 100644
--- a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictMount.cs
+++ b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictMount.cs
@@ -12,7 +12,7 @@ namespace CustomizePlus.GameData.ReverseSearchDictionaries;
/// A dictionary that matches names to mount ids.
public sealed class ReverseSearchDictMount(IDalamudPluginInterface pluginInterface, Logger log, IDataManager gameData)
- : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchMounts", 7, () => CreateMountData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchMounts", Versions.DictMount, () => CreateMountData(gameData))
{
/// Create the data.
private static IReadOnlyDictionary CreateMountData(IDataManager gameData)
diff --git a/CustomizePlus.GameData/ReverseSearchDictionaries/Versions.cs b/CustomizePlus.GameData/ReverseSearchDictionaries/Versions.cs
new file mode 100644
index 0000000..1a62115
--- /dev/null
+++ b/CustomizePlus.GameData/ReverseSearchDictionaries/Versions.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CustomizePlus.GameData.ReverseSearchDictionaries;
+
+public static class Versions
+{
+ public const int GlobalOffset = 0;
+ public const int UsesExtractTextOffset = 0;
+ public const int UsesTitleCaseOffset = 0 + UsesExtractTextOffset;
+
+ public const int DictCompanionOffset = 9;
+ public const int DictCompanion = UsesTitleCaseOffset + DictCompanionOffset;
+
+ public const int DictBNpcOffset = 9;
+ public const int DictBNpc = UsesTitleCaseOffset + DictBNpcOffset;
+
+ public const int DictMountOffset = 9;
+ public const int DictMount = UsesTitleCaseOffset + DictMountOffset;
+
+ public const int DictENpcOffset = 9;
+ public const int DictENpc = UsesTitleCaseOffset + DictENpcOffset;
+}