mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 16:27:22 +01:00
don't call zoning when zoning is not happening, wait for mark offline on players, fixes initial data application after zoning
This commit is contained in:
parent
0a80531836
commit
effe6c2839
3 changed files with 41 additions and 22 deletions
|
|
@ -34,6 +34,7 @@ public class DalamudUtilService : IHostedService
|
|||
private string _lastGlobalBlockPlayer = string.Empty;
|
||||
private Dictionary<string, (string Name, nint Address)> _playerCharas = new(StringComparer.Ordinal);
|
||||
private bool _sentBetweenAreas = false;
|
||||
private ushort _lastZone = 0;
|
||||
|
||||
public DalamudUtilService(ILogger<DalamudUtilService> logger, ClientState clientState, ObjectTable objectTable, Framework framework,
|
||||
GameGui gameGui, Condition condition, Dalamud.Data.DataManager gameData, MareMediator mediator, PerformanceCollectorService performanceCollector)
|
||||
|
|
@ -433,12 +434,17 @@ public class DalamudUtilService : IHostedService
|
|||
|
||||
if (_condition[ConditionFlag.BetweenAreas] || _condition[ConditionFlag.BetweenAreas51])
|
||||
{
|
||||
if (!_sentBetweenAreas)
|
||||
var zone = _clientState.TerritoryType;
|
||||
if (_lastZone != zone)
|
||||
{
|
||||
_logger.LogDebug("Zone switch/Gpose start");
|
||||
_sentBetweenAreas = true;
|
||||
_mediator.Publish(new ZoneSwitchStartMessage());
|
||||
_mediator.Publish(new HaltScanMessage("Zone switch"));
|
||||
_lastZone = zone;
|
||||
if (!_sentBetweenAreas)
|
||||
{
|
||||
_logger.LogDebug("Zone switch/Gpose start");
|
||||
_sentBetweenAreas = true;
|
||||
_mediator.Publish(new ZoneSwitchStartMessage());
|
||||
_mediator.Publish(new HaltScanMessage("Zone switch"));
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -462,6 +468,7 @@ public class DalamudUtilService : IHostedService
|
|||
{
|
||||
_logger.LogDebug("Logged in");
|
||||
IsLoggedIn = true;
|
||||
_lastZone = _clientState.TerritoryType;
|
||||
_mediator.Publish(new DalamudLoginMessage());
|
||||
}
|
||||
else if (localPlayer == null && IsLoggedIn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue