finalize petnames

This commit is contained in:
Stanley Dimant
2024-09-10 10:48:08 +02:00
committed by Loporrit
parent 28828a620b
commit 95759b157a
2 changed files with 7 additions and 2 deletions

View File

@@ -10,9 +10,7 @@ public class CharacterData
{ {
public Dictionary<ObjectKind, string> CustomizePlusScale { get; set; } = []; public Dictionary<ObjectKind, string> CustomizePlusScale { get; set; } = [];
public Dictionary<ObjectKind, HashSet<FileReplacement>> FileReplacements { get; set; } = []; public Dictionary<ObjectKind, HashSet<FileReplacement>> FileReplacements { get; set; } = [];
public Dictionary<ObjectKind, string> GlamourerString { get; set; } = []; public Dictionary<ObjectKind, string> GlamourerString { get; set; } = [];
public string HeelsData { get; set; } = string.Empty; public string HeelsData { get; set; } = string.Empty;
public string HonorificData { get; set; } = string.Empty; public string HonorificData { get; set; } = string.Empty;
public string ManipulationString { get; set; } = string.Empty; public string ManipulationString { get; set; } = string.Empty;

View File

@@ -188,6 +188,13 @@ public static class VariousExtensions
logger.LogDebug("[BASE-{appBase}] Updating {object}/{kind} (Diff honorific data) => {change}", applicationBase, cachedPlayer, objectKind, PlayerChanges.Honorific); logger.LogDebug("[BASE-{appBase}] Updating {object}/{kind} (Diff honorific data) => {change}", applicationBase, cachedPlayer, objectKind, PlayerChanges.Honorific);
charaDataToUpdate[objectKind].Add(PlayerChanges.Honorific); charaDataToUpdate[objectKind].Add(PlayerChanges.Honorific);
} }
bool petNamesDataDifferent = !string.Equals(oldData.PetNamesData, newData.PetNamesData, StringComparison.Ordinal);
if (petNamesDataDifferent || (forceApplyCustomization && !string.IsNullOrEmpty(newData.PetNamesData)))
{
logger.LogDebug("[BASE-{appBase}] Updating {object}/{kind} (Diff petnames data) => {change}", applicationBase, cachedPlayer, objectKind, PlayerChanges.PetNames);
charaDataToUpdate[objectKind].Add(PlayerChanges.PetNames);
}
} }
foreach (KeyValuePair<ObjectKind, HashSet<PlayerChanges>> data in charaDataToUpdate.ToList()) foreach (KeyValuePair<ObjectKind, HashSet<PlayerChanges>> data in charaDataToUpdate.ToList())