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

Commit

Permalink
fix: changed the duty name.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 17, 2023
1 parent 1ed1d1f commit 3e565f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RotationSolver/UI/ImGuiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public unsafe static void Display(this ICustomRotation rotation, ICustomRotation
else if (!rotation.IsAllowed(out _))
{
var showStr = string.Format(LocalizationManager.RightLang.ConfigWindow_Helper_HighEndWarning, rotation)
+ string.Join("", SocialUpdater.HighEndDuties.Select(x => x.PlaceName?.Value?.Name.ToString())
+ string.Join("", SocialUpdater.HighEndDuties.Select(SocialUpdater.GetDutyName)
.Where(s => !string.IsNullOrEmpty(s)).Select(t => "\n - " + t));

HoveredString(showStr);
Expand Down
9 changes: 7 additions & 2 deletions RotationSolver/Updaters/SocialUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ internal class SocialUpdater
static bool _canSaying = false;
public static TerritoryType[] HighEndDuties { get; private set; } = Array.Empty<TerritoryType>();

public static string GetDutyName(TerritoryType territory)
{
return territory.ContentFinderCondition?.Value?.Name?.RawString ?? "High-end Duty";
//return territory.PlaceName?.Value?.Name.ToString() ?? "High-end Duty";
}

static bool CanSocial
{
get
Expand Down Expand Up @@ -100,8 +106,7 @@ static void DutyState_DutyStarted(object sender, ushort e)
var territory = Service.GetSheet<TerritoryType>().GetRow(e);
if (HighEndDuties.Any(t => t.RowId == territory.RowId))
{
var str = territory.PlaceName?.Value?.Name.ToString() ?? "High-end Duty";
var message = string.Format(LocalizationManager.RightLang.HighEndWarning, str);
var message = string.Format(LocalizationManager.RightLang.HighEndWarning, GetDutyName(territory));

Service.ChatGui.PrintChat(new Dalamud.Game.Text.XivChatEntry()
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Watcher : IDisposable
/// https://github.com/Tischel/ActionTimeline/blob/master/ActionTimeline/Helpers/TimelineManager.cs#L86
/// </summary>
[Signature("4C 89 44 24 ?? 55 56 41 54 41 55 41 56", DetourName = nameof(ReceiveAbilityEffect))]
private static Hook<ReceiveAbilityDelegate> _receiveAbilityHook;
private static Hook<ReceiveAbilityDelegate> _receiveAbilityHook = null;


public static ICallGateSubscriber<object, object> IpcSubscriber;
Expand Down

0 comments on commit 3e565f2

Please sign in to comment.