Add MCDO (#80)
* update api * mcd online editor impl * most of chara data hub impl * some state of things * some refactoring * random bullshit go * more nearby impl * add uid to peformance msg * cleanup/homogenization * some split, update nuget packages * migrate to latest packages where possible, remove lz4net, do some split, idk * some polish and cleanup * more cleanup, beautification, etc. * fixes and cleanups --------- Co-authored-by: Stanley Dimant <root.darkarchon@outlook.com>
This commit is contained in:
@@ -23,6 +23,7 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
|
||||
private CancellationTokenSource _petNicknamesCts = new();
|
||||
private CancellationTokenSource _moodlesCts = new();
|
||||
private bool _isZoning = false;
|
||||
private bool _haltCharaDataCreation;
|
||||
private readonly Dictionary<ObjectKind, CancellationTokenSource> _glamourerCts = new();
|
||||
|
||||
public CacheCreationService(ILogger<CacheCreationService> logger, MareMediator mediator, GameObjectHandlerFactory gameObjectHandlerFactory,
|
||||
@@ -41,6 +42,11 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
|
||||
Mediator.Subscribe<ZoneSwitchStartMessage>(this, (msg) => _isZoning = true);
|
||||
Mediator.Subscribe<ZoneSwitchEndMessage>(this, (msg) => _isZoning = false);
|
||||
|
||||
Mediator.Subscribe<HaltCharaDataCreation>(this, (msg) =>
|
||||
{
|
||||
_haltCharaDataCreation = !msg.Resume;
|
||||
});
|
||||
|
||||
_playerRelatedObjects[ObjectKind.Player] = gameObjectHandlerFactory.Create(ObjectKind.Player, dalamudUtil.GetPlayerPointer, isWatched: true)
|
||||
.GetAwaiter().GetResult();
|
||||
_playerRelatedObjects[ObjectKind.MinionOrMount] = gameObjectHandlerFactory.Create(ObjectKind.MinionOrMount, () => dalamudUtil.GetMinionOrMount(), isWatched: true)
|
||||
@@ -218,7 +224,7 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
|
||||
|
||||
private void ProcessCacheCreation()
|
||||
{
|
||||
if (_isZoning) return;
|
||||
if (_isZoning || _haltCharaDataCreation) return;
|
||||
|
||||
if (_cachesToCreate.Any() && (_cacheCreationTask?.IsCompleted ?? true))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user