Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add is in high-end duty property.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 8, 2023
1 parent 0d43e79 commit 5b35f8f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal static bool HasApplyStatus(uint id, StatusID[] ids)
}
return false;
}
public static bool InHighEndDuty { get; set; } = false;
public static bool IsInHighEndDuty { get; set; } = false;
public static TerritoryContentType TerritoryContentType { get; set; } = TerritoryContentType.None;

public static AutoStatus AutoStatus { get; private set; } = AutoStatus.None;
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
/// <summary>
///
/// </summary>
public static IBLUAction MortalFlame { get; } = new BLUAction(ActionID.MortalFlame);
public static IBLUAction MortalFlame { get; } = new BLUAction(ActionID.MortalFlame, ActionOption.Dot);

/// <summary>
///
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_Medicine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected bool UseBurstMedicine(out IAction act, bool clippingCheck = true)
{
act = null;

if (!(Target?.IsDummy() ?? false) && !DataCenter.InHighEndDuty) return false;
if (!(Target?.IsDummy() ?? false) && !DataCenter.IsInHighEndDuty) return false;

return MedicineType switch
{
Expand Down
5 changes: 5 additions & 0 deletions RotationSolver.Basic/Rotations/CustomRotation_OtherInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ public abstract partial class CustomRotation
/// </summary>
protected static TerritoryContentType TerritoryContentType => DataCenter.TerritoryContentType;

/// <summary>
/// Is player in high-end duty.
/// </summary>
protected static bool IsInHighEndDuty => DataCenter.IsInHighEndDuty;

/// <summary>
///
/// </summary>
Expand Down
17 changes: 2 additions & 15 deletions RotationSolver/Updaters/SocialUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Logging;
using ECommons.Automation;
using ECommons.Configuration;
using ECommons.DalamudServices;
using ECommons.GameFunctions;
using ECommons.GameHelpers;
using FFXIVClientStructs.FFXIV.Client.UI;
using Lumina.Excel.GeneratedSheets;
using RotationSolver.Commands;
using RotationSolver.Localization;
using RotationSolver.UI;
using System.Security.Cryptography;
using System.Text;

Expand All @@ -21,7 +17,6 @@ namespace RotationSolver.Updaters;
internal class SocialUpdater
{
public static bool InPvp { get; private set; }
//public static bool InHouse { get; private set; }

private static readonly List<string> _macroToAuthor = new()
{
Expand All @@ -38,9 +33,6 @@ internal class SocialUpdater
static bool _canSaying = false;
public static TerritoryType[] HighEndDuties { get; private set; } = Array.Empty<TerritoryType>();

//public static bool IsHouseArea(TerritoryType territory)
// => territory?.Bg.RawString.Contains("/hou/") ?? false;

public static string GetDutyName(TerritoryType territory)
{
return territory.ContentFinderCondition?.Value?.Name?.RawString ?? "High-end Duty";
Expand Down Expand Up @@ -95,14 +87,9 @@ static void ClientState_TerritoryChanged(object sender, ushort e)
_canSaying = true;
}
InPvp = territory?.IsPvpZone ?? false;
//InHouse = IsHouseArea(territory);
//if (PainterManager._painter != null) PainterManager._painter.Enable = !InHouse;
DataCenter.TerritoryContentType = (TerritoryContentType)(territory?.ContentFinderCondition?.Value?.ContentType?.Value?.RowId ?? 0);
DataCenter.InHighEndDuty = HighEndDuties.Any(t => t.RowId == territory.RowId);

#if DEBUG
//PluginLog.Information($"Territory: {e}");
#endif
DataCenter.TerritoryContentType = (TerritoryContentType)(territory?.ContentFinderCondition?.Value?.ContentType?.Value?.RowId ?? 0);
DataCenter.IsInHighEndDuty = HighEndDuties.Any(t => t.RowId == territory.RowId);

try
{
Expand Down

0 comments on commit 5b35f8f

Please sign in to comment.