do not handle blocked/muted characters
simplify get ids potentially fix invalid chara state partial 514d254 skip erroneous blockstatus
This commit is contained in:
@@ -5,6 +5,7 @@ using Dalamud.Utility;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Control;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
||||
using MareSynchronos.Interop;
|
||||
using MareSynchronos.PlayerData.Handlers;
|
||||
using MareSynchronos.Services.Mediator;
|
||||
using MareSynchronos.Utils;
|
||||
@@ -37,6 +38,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
private readonly IClientState _clientState;
|
||||
private readonly ICondition _condition;
|
||||
private readonly IDataManager _gameData;
|
||||
private readonly BlockedCharacterHandler _blockedCharacterHandler;
|
||||
private readonly IFramework _framework;
|
||||
private readonly IGameGui _gameGui;
|
||||
private readonly IToastGui _toastGui;
|
||||
@@ -53,9 +55,10 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
private bool _sentBetweenAreas = false;
|
||||
private static readonly Dictionary<uint, PlayerInfo> _playerInfoCache = new();
|
||||
|
||||
|
||||
public DalamudUtilService(ILogger<DalamudUtilService> logger, IClientState clientState, IObjectTable objectTable, IFramework framework,
|
||||
IGameGui gameGui, IToastGui toastGui,ICondition condition, IDataManager gameData, ITargetManager targetManager,
|
||||
MareMediator mediator, PerformanceCollectorService performanceCollector)
|
||||
BlockedCharacterHandler blockedCharacterHandler, MareMediator mediator, PerformanceCollectorService performanceCollector)
|
||||
{
|
||||
_logger = logger;
|
||||
_clientState = clientState;
|
||||
@@ -65,6 +68,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
_toastGui = toastGui;
|
||||
_condition = condition;
|
||||
_gameData = gameData;
|
||||
_blockedCharacterHandler = blockedCharacterHandler;
|
||||
Mediator = mediator;
|
||||
_performanceCollector = performanceCollector;
|
||||
WorldData = new(() =>
|
||||
@@ -501,6 +505,12 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||
if (chara == null || chara.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player)
|
||||
continue;
|
||||
|
||||
if (_blockedCharacterHandler.IsCharacterBlocked(chara.Address, out bool firstTime) && firstTime)
|
||||
{
|
||||
_logger.LogTrace("Skipping character {addr}, blocked/muted", chara.Address.ToString("X"));
|
||||
continue;
|
||||
}
|
||||
|
||||
var info = GetPlayerInfo(chara);
|
||||
|
||||
if (!IsAnythingDrawing)
|
||||
|
||||
Reference in New Issue
Block a user