From 317ab9e564b75df438f1764b58b4e0b0d02053ed Mon Sep 17 00:00:00 2001
From: RisaDev <151885272+RisaDev@users.noreply.github.com>
Date: Sat, 29 Mar 2025 12:08:11 +0300
Subject: [PATCH] Actually let's just use info from Penumbra.GameData
---
.../ReverseSearchDictBNpc.cs | 2 +-
.../ReverseSearchDictCompanion.cs | 2 +-
.../ReverseSearchDictENpc.cs | 2 +-
.../ReverseSearchDictMount.cs | 2 +-
.../ReverseSearchDictionaries/Versions.cs | 26 -------------------
5 files changed, 4 insertions(+), 30 deletions(-)
delete mode 100644 CustomizePlus.GameData/ReverseSearchDictionaries/Versions.cs
diff --git a/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictBNpc.cs b/CustomizePlus.GameData/ReverseSearchDictionaries/ReverseSearchDictBNpc.cs
index 5e67051..0180ecc 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", Versions.DictBNpc, () => CreateBNpcData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchBNpcs", Penumbra.GameData.DataContainers.Version.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 7cc6eaf..ff9e3a3 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", Versions.DictCompanion, () => CreateCompanionData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchCompanions", Penumbra.GameData.DataContainers.Version.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 32afccc..42bf515 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", Versions.DictENpc, () => CreateENpcData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchENpcs", Penumbra.GameData.DataContainers.Version.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 425c4c5..b22e760 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", Versions.DictMount, () => CreateMountData(gameData))
+ : ReverseNameDictionary(pluginInterface, log, gameData, "ReverseSearchMounts", Penumbra.GameData.DataContainers.Version.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
deleted file mode 100644
index 1a62115..0000000
--- a/CustomizePlus.GameData/ReverseSearchDictionaries/Versions.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-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;
-}