Change pomander logic

This commit is contained in:
Liza 2022-10-27 00:25:09 +02:00
parent 16a2305892
commit 6c7389c831
2 changed files with 17 additions and 26 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<LangVersion>9.0</LangVersion> <LangVersion>9.0</LangVersion>
<Version>1.6.0.0</Version> <Version>1.7.0.0</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@ -4,9 +4,7 @@ using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.Command; using Dalamud.Game.Command;
using Dalamud.Game.Text; using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Windowing; using Dalamud.Interface.Windowing;
using Dalamud.Logging;
using Dalamud.Plugin; using Dalamud.Plugin;
using ECommons; using ECommons;
using ECommons.Schedulers; using ECommons.Schedulers;
@ -41,7 +39,6 @@ namespace Pal.Client
{ Marker.EType.SilverCoffer, new MarkerConfig { Radius = 1f } }, { Marker.EType.SilverCoffer, new MarkerConfig { Radius = 1f } },
}; };
private bool _configUpdated = false; private bool _configUpdated = false;
private bool _pomandersUpdated = false;
private LocalizedChatMessages _localizedChatMessages = new(); private LocalizedChatMessages _localizedChatMessages = new();
internal ConcurrentDictionary<ushort, ConcurrentBag<Marker>> FloorMarkers { get; } = new(); internal ConcurrentDictionary<ushort, ConcurrentBag<Marker>> FloorMarkers { get; } = new();
@ -190,8 +187,6 @@ namespace Pal.Client
} }
else else
return; return;
_pomandersUpdated = true;
} }
private void OnFrameworkUpdate(Framework framework) private void OnFrameworkUpdate(Framework framework)
@ -286,9 +281,7 @@ namespace Pal.Client
saveMarkers = true; saveMarkers = true;
} }
if (_pomandersUpdated) if (!recreateLayout && currentFloorMarkers.Count > 0 && (config.OnlyVisibleTrapsAfterPomander || config.OnlyVisibleHoardAfterPomander))
{
if (currentFloorMarkers.Count > 0 && (config.OnlyVisibleTrapsAfterPomander || config.OnlyVisibleHoardAfterPomander))
{ {
try try
@ -312,8 +305,6 @@ namespace Pal.Client
recreateLayout = true; recreateLayout = true;
} }
} }
_pomandersUpdated = false;
}
if (saveMarkers) if (saveMarkers)
{ {