mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
rework cache creation conditions
This commit is contained in:
parent
3a481f606b
commit
17ae9633e8
11 changed files with 264 additions and 271 deletions
|
|
@ -15,6 +15,32 @@ public class CharacterData
|
|||
public string MoodlesData { get; set; } = string.Empty;
|
||||
public string PetNamesData { get; set; } = string.Empty;
|
||||
|
||||
public void SetFragment(ObjectKind kind, CharacterDataFragment? fragment)
|
||||
{
|
||||
if (kind == ObjectKind.Player)
|
||||
{
|
||||
var playerFragment = (fragment as CharacterDataFragmentPlayer);
|
||||
HeelsData = playerFragment?.HeelsData ?? string.Empty;
|
||||
HonorificData = playerFragment?.HonorificData ?? string.Empty;
|
||||
ManipulationString = playerFragment?.ManipulationString ?? string.Empty;
|
||||
MoodlesData = playerFragment?.MoodlesData ?? string.Empty;
|
||||
PetNamesData = playerFragment?.PetNamesData ?? string.Empty;
|
||||
}
|
||||
|
||||
if (fragment is null)
|
||||
{
|
||||
CustomizePlusScale.Remove(kind);
|
||||
FileReplacements.Remove(kind);
|
||||
GlamourerString.Remove(kind);
|
||||
}
|
||||
else
|
||||
{
|
||||
CustomizePlusScale[kind] = fragment.CustomizePlusScale;
|
||||
FileReplacements[kind] = fragment.FileReplacements;
|
||||
GlamourerString[kind] = fragment.GlamourerString;
|
||||
}
|
||||
}
|
||||
|
||||
public API.Data.CharacterData ToAPI()
|
||||
{
|
||||
Dictionary<ObjectKind, List<FileReplacementData>> fileReplacements =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue