add alternative upload, ignore NIN pets, fix progress crashing
This commit is contained in:
@@ -26,6 +26,7 @@ public class DalamudUtilService : IHostedService
|
||||
private readonly MareMediator _mediator;
|
||||
private readonly ObjectTable _objectTable;
|
||||
private readonly PerformanceCollectorService _performanceCollector;
|
||||
private readonly List<uint> ClassJobIdsIgnoredForPets = new() { 30 };
|
||||
private uint? _classJobId = 0;
|
||||
private DateTime _delayedFrameworkUpdateCheck = DateTime.Now;
|
||||
private bool _sentBetweenAreas = false;
|
||||
@@ -107,6 +108,7 @@ public class DalamudUtilService : IHostedService
|
||||
|
||||
public unsafe IntPtr GetPet(IntPtr? playerPointer = null)
|
||||
{
|
||||
if (ClassJobIdsIgnoredForPets.Contains(_classJobId ?? 0)) return IntPtr.Zero;
|
||||
var mgr = CharacterManager.Instance();
|
||||
playerPointer ??= PlayerPointer;
|
||||
if (playerPointer == IntPtr.Zero) return IntPtr.Zero;
|
||||
@@ -320,7 +322,7 @@ public class DalamudUtilService : IHostedService
|
||||
if (_classJobId != newclassJobId)
|
||||
{
|
||||
_classJobId = newclassJobId;
|
||||
_mediator.Publish(new ClassJobChangedMessage());
|
||||
_mediator.Publish(new ClassJobChangedMessage(_classJobId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,16 +102,12 @@ public sealed class MareMediator : IDisposable
|
||||
{
|
||||
lock (_addRemoveLock)
|
||||
{
|
||||
foreach (KeyValuePair<Type, HashSet<SubscriberAction>> kvp in _subscriberDict)
|
||||
foreach (Type kvp in _subscriberDict.Select(k => k.Key))
|
||||
{
|
||||
int unSubbed = _subscriberDict[kvp.Key]?.RemoveWhere(p => p.Subscriber == subscriber) ?? 0;
|
||||
int unSubbed = _subscriberDict[kvp]?.RemoveWhere(p => p.Subscriber == subscriber) ?? 0;
|
||||
if (unSubbed > 0)
|
||||
{
|
||||
_logger.LogDebug("{sub} unsubscribed from {msg}", subscriber.GetType().Name, kvp.Key.Name);
|
||||
if (_subscriberDict[kvp.Key].Any())
|
||||
{
|
||||
_logger.LogTrace("Remaining Subscribers: {item}", string.Join(", ", _subscriberDict[kvp.Key].Select(k => k.Subscriber.GetType().Name)));
|
||||
}
|
||||
_logger.LogDebug("{sub} unsubscribed from {msg}", subscriber.GetType().Name, kvp.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public record OpenSettingsUiMessage : IMessage;
|
||||
public record DalamudLoginMessage : IMessage;
|
||||
public record DalamudLogoutMessage : IMessage;
|
||||
public record FrameworkUpdateMessage : IMessage;
|
||||
public record ClassJobChangedMessage : IMessage;
|
||||
public record ClassJobChangedMessage(uint? ClassJob) : IMessage;
|
||||
public record DelayedFrameworkUpdateMessage : IMessage;
|
||||
public record ZoneSwitchStartMessage : IMessage;
|
||||
public record ZoneSwitchEndMessage : IMessage;
|
||||
|
||||
Reference in New Issue
Block a user