major refactoring, maybe some bugfixes, idk

This commit is contained in:
Stanley Dimant
2022-06-24 00:47:47 +02:00
parent 0fe3f1cf25
commit 2dcd02d170
22 changed files with 997 additions and 949 deletions

View File

@@ -0,0 +1,43 @@
using System.Collections.Generic;
using Dalamud.Game.ClientState.Objects.SubKinds;
using MareSynchronos.API;
namespace MareSynchronos.Models;
public class CachedPlayer
{
private bool _isVisible = false;
public CachedPlayer(string nameHash)
{
PlayerNameHash = nameHash;
}
public Dictionary<int, CharacterCacheDto> CharacterCache { get; set; } = new();
public bool IsVisible
{
get => _isVisible;
set
{
WasVisible = _isVisible;
_isVisible = value;
}
}
public int? JobId { get; set; }
public PlayerCharacter? PlayerCharacter { get; set; }
public string? PlayerName { get; set; }
public string PlayerNameHash { get; }
public bool WasVisible { get; private set; }
public void Reset()
{
PlayerName = string.Empty;
JobId = null;
PlayerCharacter = null;
}
public override string ToString()
{
return PlayerNameHash + " : " + PlayerName + " : HasChar " + (PlayerCharacter != null);
}
}