Potential fix for Honorific throwing away data. Still testing efficacy.
All checks were successful
Build and Update Repo / build-and-update-repo (push) Successful in 1m13s

This commit is contained in:
2025-09-24 20:37:12 +01:00
parent 51004f3017
commit 75f88d5104
4 changed files with 27 additions and 7 deletions

View File

@@ -56,7 +56,7 @@ public static class VariousExtensions
}
public static Dictionary<ObjectKind, HashSet<PlayerChanges>> CheckUpdatedData(this CharacterData newData, Guid applicationBase,
CharacterData? oldData, ILogger logger, PairHandler cachedPlayer, bool forceApplyCustomization, bool forceApplyMods)
CharacterData? oldData, ILogger logger, PairHandler cachedPlayer, bool forceApplyCustomization, bool forceApplyMods, string oldHonorificData)
{
oldData ??= new();
var charaDataToUpdate = new Dictionary<ObjectKind, HashSet<PlayerChanges>>();
@@ -182,7 +182,7 @@ public static class VariousExtensions
charaDataToUpdate[objectKind].Add(PlayerChanges.Heels);
}
bool honorificDataDifferent = !string.Equals(oldData.HonorificData, newData.HonorificData, StringComparison.Ordinal);
bool honorificDataDifferent = !string.Equals(oldHonorificData, newData.HonorificData, StringComparison.Ordinal);
if (honorificDataDifferent || (forceApplyCustomization && !string.IsNullOrEmpty(newData.HonorificData)))
{
logger.LogDebug("[BASE-{appBase}] Updating {object}/{kind} (Diff honorific data) => {change}", applicationBase, cachedPlayer, objectKind, PlayerChanges.Honorific);