PalacePal/Pal.Client/Floors/TerritoryState.cs

37 lines
1.0 KiB
C#
Raw Normal View History

2023-02-15 22:17:19 +00:00
using Dalamud.Game.ClientState;
using Dalamud.Game.ClientState.Conditions;
using Pal.Common;
2023-02-22 22:58:05 +00:00
namespace Pal.Client.Floors
2023-02-15 22:17:19 +00:00
{
public sealed class TerritoryState
{
private readonly ClientState _clientState;
private readonly Condition _condition;
public TerritoryState(ClientState clientState, Condition condition)
{
_clientState = clientState;
_condition = condition;
}
public ushort LastTerritory { get; set; }
public PomanderState PomanderOfSight { get; set; } = PomanderState.Inactive;
public PomanderState PomanderOfIntuition { get; set; } = PomanderState.Inactive;
public bool IsInDeepDungeon() =>
_clientState.IsLoggedIn
&& _condition[ConditionFlag.InDeepDungeon]
&& typeof(ETerritoryType).IsEnumDefined(_clientState.TerritoryType);
}
public enum PomanderState
{
Inactive,
Active,
FoundOnCurrentFloor,
PomanderOfSafetyUsed,
}
}