Skip to content

Commit

Permalink
df commands and aether auger
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Feb 24, 2024
1 parent c2c2d9e commit 485e53e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
17 changes: 17 additions & 0 deletions SomethingNeedDoing/Interface/HelpWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Dalamud.Interface.Windowing;
using ECommons;
using ECommons.DalamudServices;
using FFXIVClientStructs.FFXIV.Client.Game;
using ImGuiNET;
using Lumina.Excel.GeneratedSheets;
using SomethingNeedDoing.Misc.Commands;
Expand Down Expand Up @@ -326,6 +327,22 @@ static void DisplayChangelog(string date, string changes, bool separator = true)

ImGui.PushFont(UiBuilder.MonoFont);

DisplayChangelog(
"2024-02-24",
"- Added SetDFLanguageJ()\n" +
"- Added SetDFLanguageE()\n" +
"- Added SetDFLanguageD()\n" +
"- Added SetDFLanguageF()\n" +
"- Added SetDFJoinInProgress()\n" +
"- Added SetDFUnrestricted()\n" +
"- Added SetDFLevelSync()\n" +
"- Added SetDFMinILvl()\n" +
"- Added SetDFSilenceEcho()\n" +
"- Added SetDFExplorerMode()\n" +
"- Added SetDFLimitedLeveling()\n" +
"- Added GetDiademAetherGaugeBarCount()\n" +
"- Added IsPlayerAvailable()\n");

DisplayChangelog(
"2024-02-22",
"- Added ExecuteAction()\n" +
Expand Down
15 changes: 15 additions & 0 deletions SomethingNeedDoing/Misc/Commands/AddonCommands.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using ECommons;
using ECommons.DalamudServices;
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using FFXIVClientStructs.FFXIV.Component.GUI;
Expand Down Expand Up @@ -28,6 +30,19 @@ public List<string> ListAllFunctions()

public unsafe void OpenRouletteDuty(byte contentRouletteID) => AgentContentsFinder.Instance()->OpenRouletteDuty(contentRouletteID);
public unsafe void OpenRegularDuty(uint cfcID) => AgentContentsFinder.Instance()->OpenRegularDuty(cfcID);
public void SetDFLanguageJ(bool state) => Svc.GameConfig.UiConfig.Set("ContentsFinderUseLangTypeJA", state);
public void SetDFLanguageE(bool state) => Svc.GameConfig.UiConfig.Set("ContentsFinderUseLangTypeEN", state);
public void SetDFLanguageD(bool state) => Svc.GameConfig.UiConfig.Set("ContentsFinderUseLangTypeDE", state);
public void SetDFLanguageF(bool state) => Svc.GameConfig.UiConfig.Set("ContentsFinderUseLangTypeFR", state);
public void SetDFJoinInProgress(bool state) => Svc.GameConfig.UiConfig.Set("ContentsFinderSupplyEnable", state);
public unsafe void SetDFUnrestricted(bool state) => ContentsFinder.Instance()->IsUnrestrictedParty = state;
public unsafe void SetDFLevelSync(bool state) => ContentsFinder.Instance()->IsLevelSync = state;
public unsafe void SetDFMinILvl(bool state) => ContentsFinder.Instance()->IsMinimalIL = state;
public unsafe void SetDFSilenceEcho(bool state) => ContentsFinder.Instance()->IsSilenceEcho = state;
public unsafe void SetDFExplorerMode(bool state) => ContentsFinder.Instance()->IsExplorerMode = state;
public unsafe void SetDFLimitedLeveling(bool state) => ContentsFinder.Instance()->IsLimitedLevelingRoulette = state;

public unsafe int GetDiademAetherGaugeBarCount() => GenericHelpers.TryGetAddonByName<AtkUnitBase>("HWDAetherGauge", out var addon) ? addon->AtkValues[1].Int / 200 : 0;

public unsafe bool IsAddonVisible(string addonName)
{
Expand Down
3 changes: 3 additions & 0 deletions SomethingNeedDoing/Misc/Commands/CharacterStateCommands.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Dalamud.Utility;
using ECommons.DalamudServices;
using ECommons.GameHelpers;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using FFXIVClientStructs.FFXIV.Client.System.Framework;
Expand Down Expand Up @@ -27,6 +28,8 @@ public List<string> ListAllFunctions()
return list;
}

public bool IsPlayerAvailable() => Player.Interactable && !ECommons.GenericHelpers.IsOccupied();

public unsafe bool HasStatus(string statusName)
{
statusName = statusName.ToLowerInvariant();
Expand Down

0 comments on commit 485e53e

Please sign in to comment.