mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 16:47:22 +01:00
attempt to gracefully reconnect, do not send notification for player on connect, do not check other players on framework update thread, delay palette+ sending data
This commit is contained in:
parent
680c5f4712
commit
fc3ad1f7f8
6 changed files with 58 additions and 24 deletions
|
|
@ -19,7 +19,7 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
|
|||
private readonly IpcManager _ipcManager;
|
||||
private readonly FileCacheManager _fileDbManager;
|
||||
private API.Data.CharacterData _cachedData = new();
|
||||
private GameObjectHandler? _currentCharacterEquipment;
|
||||
private GameObjectHandler? _currentOtherChara;
|
||||
private CancellationTokenSource? _downloadCancellationTokenSource = new();
|
||||
private bool _isVisible;
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
|
|||
return false;
|
||||
}
|
||||
|
||||
if (_currentCharacterEquipment?.CheckAndUpdateObject() ?? false)
|
||||
if (_currentOtherChara?.CheckAndUpdateObject() ?? false)
|
||||
{
|
||||
OnPlayerChanged();
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
|
|||
Logger.Debug("Disposing " + PlayerName + " (" + OnlineUser + ")");
|
||||
try
|
||||
{
|
||||
_currentCharacterEquipment?.Dispose();
|
||||
_currentOtherChara?.Dispose();
|
||||
Logger.Verbose("Restoring state for " + PlayerName);
|
||||
_ipcManager.PenumbraRemoveTemporaryCollection(PlayerName);
|
||||
_downloadCancellationTokenSource?.Cancel();
|
||||
|
|
@ -267,7 +267,7 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
|
|||
|
||||
Mediator.Subscribe<PenumbraRedrawMessage>(this, (msg) => IpcManagerOnPenumbraRedrawEvent(((PenumbraRedrawMessage)msg)));
|
||||
_originalGlamourerData = _ipcManager.GlamourerGetCharacterCustomization(PlayerCharacter);
|
||||
_currentCharacterEquipment = new GameObjectHandler(Mediator, ObjectKind.Player, () => _dalamudUtil.GetPlayerCharacterFromObjectTableByName(PlayerName)?.Address ?? IntPtr.Zero, false);
|
||||
_currentOtherChara = new GameObjectHandler(Mediator, ObjectKind.Player, () => _dalamudUtil.GetPlayerCharacterFromObjectTableByName(PlayerName)?.Address ?? IntPtr.Zero, false);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue