Skip to content

Commit dd42bef

Browse files
committed
Api11
1 parent 0cf3543 commit dd42bef

11 files changed

Lines changed: 34 additions & 34 deletions

ActionStackManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static Bool OnUseAction(ActionManager* actionManager, uint actionType, ui
5656
if (!stack.Actions.Any(action
5757
=> action.ID == 0
5858
|| action.ID == 1 && a.CanTargetHostile
59-
|| action.ID == 2 && (a.CanTargetFriendly || a.CanTargetParty)
59+
|| action.ID == 2 && (a.CanTargetAlliance || a.CanTargetParty)
6060
|| (action.UseAdjustedID ? actionManager->CS.GetAdjustedActionId(action.ID) : action.ID) == adjustedActionID))
6161
continue;
6262

Game.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public static unsafe class Game
1818

1919
public static readonly AsmPatch queueGroundTargetsPatch = new("75 49 44 8B C7 41 8B D5", [ 0x90, 0x90 ], ReAction.Config.EnableGroundTargetQueuing);
2020

21-
// test byte ptr [rsi+3A], 04
22-
// jnz 7Ah
23-
public static readonly AsmPatch spellAutoAttackPatch = new("41 B0 01 44 0F B6 CA 41 0F B6 D0 E9 ?? ?? ?? ?? 41 B0 01", [ 0xF6, 0x46, 0x3A, 0x04, 0x0F, 0x85, 0x7A, 0x00, 0x00, 0x00, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 ], ReAction.Config.EnableSpellAutoAttacks && ReAction.Config.EnableSpellAutoAttacksOutOfCombat);
21+
// test byte ptr [rbp+3A], 04 (CanTargetSelf)
22+
// jnz 79h
23+
public static readonly AsmPatch spellAutoAttackPatch = new("41 B0 01 41 0F B6 D0 E9 ?? ?? ?? ?? 41 B0 01", [ 0xF6, 0x45, 0x3A, 0x04, 0x0F, 0x85, 0x79, 0x00, 0x00, 0x00, 0x90, 0x90 ], ReAction.Config.EnableSpellAutoAttacks && ReAction.Config.EnableSpellAutoAttacksOutOfCombat);
2424

2525
public static readonly AsmPatch allowUnassignableActionsPatch = new("75 07 32 C0 E9 ?? ?? ?? ?? 48 8B 00", [ 0xEB ], ReAction.Config.EnableUnassignableActions);
2626

Modules/CameraRelativeActions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private static void PostActionStack(ActionManager* actionManager, uint actionTyp
3636
private static bool CheckAction(uint actionType, uint actionID, uint adjustedActionID)
3737
{
3838
if (!ReAction.actionSheet.TryGetValue(adjustedActionID, out var a)) return false;
39-
if (ReAction.Config.EnableCameraRelativeDirectionals && a.IsPlayerAction && (a.Unknown50 == 6 || (a.CastType is 3 or 4 && a.CanTargetSelf))) return true; // Channeled abilities and cones and rectangles
39+
if (ReAction.Config.EnableCameraRelativeDirectionals && a.IsPlayerAction && (a.AutoAttackBehaviour == 6 || (a.CastType is 3 or 4 && a.CanTargetSelf))) return true; // Channeled abilities and cones and rectangles
4040
if (!ReAction.Config.EnableCameraRelativeDashes) return false;
4141
if (!a.AffectsPosition && adjustedActionID != 29494) return false; // Block non movement abilities
4242
if (!a.CanTargetSelf) return false; // Block non self targeted abilities

Modules/EnhancedAutoFaceTarget.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
using Hypostasis.Game.Structures;
2-
using Lumina.Excel.GeneratedSheets;
2+
using Lumina.Excel.Sheets;
33

44
namespace ReAction.Modules;
55

66
public unsafe class EnhancedAutoFaceTarget : PluginModule
77
{
88
// jmp 1Ch
9-
private static readonly AsmPatch removeAutoFaceTargetPatch = new("80 7E 33 06 75 1E 48 8D 0D", [ 0x90, 0x90, 0x90, 0x90, 0xEB, 0x1C ]);
9+
private static readonly AsmPatch removeAutoFaceTargetPatch = new("80 7D 33 06 75 1E 48 8D 0D", [ 0x90, 0x90, 0x90, 0x90, 0xEB, 0x1C ]);
1010
// jz -> jmp ??
11-
private static readonly AsmPatch removeAutoFaceGroundTargetPatch = new("80 7E 33 06 74 21 48 8D 8F", [ 0x90, 0x90, 0x90, 0x90, 0xEB ]);
11+
private static readonly AsmPatch removeAutoFaceGroundTargetPatch = new("80 7D 33 06 74 21 48 8D 8F", [ 0x90, 0x90, 0x90, 0x90, 0xEB ]);
1212

1313
public override bool ShouldEnable => ReAction.Config.EnableEnhancedAutoFaceTarget;
1414

@@ -30,7 +30,7 @@ protected override void Disable()
3030

3131
private static void PostActionStack(ActionManager* actionManager, uint actionType, uint actionID, uint adjustedActionID, ref ulong targetObjectID, uint param, uint useType, int pvp)
3232
{
33-
if (DalamudApi.DataManager.GetExcelSheet<Action>()?.GetRow(adjustedActionID) is { Unknown26: false }) // This is checked by Client::Game::ActionManager_GetActionInRangeOrLoS
33+
if (DalamudApi.DataManager.GetExcelSheet<Action>().GetRow(adjustedActionID) is { NeedToFaceTarget: false })
3434
removeAutoFaceTargetPatch.Enable();
3535
else
3636
removeAutoFaceTargetPatch.Disable();

Modules/QueueMore.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Hypostasis.Game.Structures;
2-
using Lumina.Excel.GeneratedSheets;
2+
using Lumina.Excel.Sheets;
33

44
namespace ReAction.Modules;
55

@@ -56,14 +56,14 @@ private static void PostUseAction(ActionManager* actionManager, uint actionType,
5656
{
5757
allowQueuingPatch.Disable();
5858

59-
if (ret && DalamudApi.DataManager.GetExcelSheet<Action>()?.GetRow(adjustedActionID) is { ActionCategory.Row: 9 or 15 })
59+
if (ret && DalamudApi.DataManager.GetExcelSheet<Action>().GetRow(adjustedActionID) is { ActionCategory.RowId: 9 or 15 })
6060
lastLBSequence = actionManager->currentSequence;
6161
}
6262

6363
private static bool CheckAction(uint actionType, uint actionID, uint adjustedActionID) =>
6464
actionType switch
6565
{
66-
1 when DalamudApi.DataManager.GetExcelSheet<Action>()?.GetRow(adjustedActionID) is { ActionCategory.Row: 9 or 15 } => lastLBSequence != Common.ActionManager->currentSequence, // Allow LB
66+
1 when DalamudApi.DataManager.GetExcelSheet<Action>().GetRow(adjustedActionID) is { ActionCategory.RowId: 9 or 15 } => lastLBSequence != Common.ActionManager->currentSequence, // Allow LB
6767
2 => true, // Allow items
6868
5 when actionID == 4 => true, // Allow Sprint
6969
_ => false

PluginUI.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
77
using Hypostasis.Game.Structures;
88
using ImGuiNET;
9-
using Lumina.Excel.GeneratedSheets;
10-
using Action = Lumina.Excel.GeneratedSheets.Action;
9+
using Lumina.Excel.Sheets;
10+
using Action = Lumina.Excel.Sheets.Action;
1111

1212
namespace ReAction;
1313

@@ -226,13 +226,13 @@ private static void DrawStackEditorLists(Configuration.ActionStack stack)
226226
0 => "All Actions",
227227
1 => "All Harmful Actions",
228228
2 => "All Beneficial Actions",
229-
_ => $"[#{a.RowId} {a.ClassJob.Value?.Abbreviation}{(a.IsPvP ? " PVP" : string.Empty)}] {a.Name}"
229+
_ => $"[#{a.RowId} {a.ClassJob.ValueNullable?.Abbreviation}{(a.IsPvP ? " PVP" : string.Empty)}] {a.Name}"
230230
};
231231

232232
private static readonly ImGuiEx.ExcelSheetComboOptions<Action> actionComboOptions = new()
233233
{
234234
FormatRow = FormatActionRow,
235-
FilteredSheet = DalamudApi.DataManager.GetExcelSheet<Action>()?.Take(3).Concat(ReAction.actionSheet.Select(kv => kv.Value))
235+
FilteredSheet = DalamudApi.DataManager.GetExcelSheet<Action>().Take(3).Concat(ReAction.actionSheet.Select(kv => kv.Value))
236236
};
237237

238238
private static readonly ImGuiEx.ExcelSheetPopupOptions<Action> actionPopupOptions = new()
@@ -304,13 +304,13 @@ private static void DrawActionEditor(Configuration.ActionStack stack)
304304
private static string FormatOverrideActionRow(Action a) => a.RowId switch
305305
{
306306
0 => "Same Action",
307-
_ => $"[#{a.RowId} {a.ClassJob.Value?.Abbreviation}{(a.IsPvP ? " PVP" : string.Empty)}] {a.Name}"
307+
_ => $"[#{a.RowId} {a.ClassJob.ValueNullable?.Abbreviation}{(a.IsPvP ? " PVP" : string.Empty)}] {a.Name}"
308308
};
309309

310310
private static readonly ImGuiEx.ExcelSheetComboOptions<Action> actionOverrideComboOptions = new()
311311
{
312312
FormatRow = FormatOverrideActionRow,
313-
FilteredSheet = DalamudApi.DataManager.GetExcelSheet<Action>()?.Take(1).Concat(ReAction.actionSheet.Select(kv => kv.Value))
313+
FilteredSheet = DalamudApi.DataManager.GetExcelSheet<Action>().Take(1).Concat(ReAction.actionSheet.Select(kv => kv.Value))
314314
};
315315

316316
private static void DrawItemEditor(Configuration.ActionStack stack)
@@ -544,7 +544,7 @@ private static void DrawOtherSettings()
544544

545545
ImGui.SameLine();
546546

547-
if (ImGuiEx.BeginGroupBox("Sunderings", 0.5f))
547+
/*if (ImGuiEx.BeginGroupBox("Sunderings", 0.5f))
548548
{
549549
save |= ImGui.Checkbox("Sunder Meditation", ref ReAction.Config.EnableDecomboMeditation);
550550
ImGuiEx.SetItemTooltip("Removes the Meditation <-> Steel Peak / Forbidden Chakra combo. You will need to use\nthe hotbar feature below to place one of them on your hotbar in order to use them again.\nSteel Peak ID: 25761\nForbidden Chakra ID: 3547");
@@ -568,7 +568,7 @@ private static void DrawOtherSettings()
568568
ImGuiEx.SetItemTooltip("Removes the Geirskogul -> Nastrond combo. You will need to use the\nhotbar feature below to place it on your hotbar in order to use it again.\nNastrond ID: 7400");
569569
570570
ImGuiEx.EndGroupBox();
571-
}
571+
}*/
572572

573573
if (ImGuiEx.BeginGroupBox("Misc", 0.5f))
574574
{
@@ -596,7 +596,7 @@ private static void DrawOtherSettings()
596596
ImGuiEx.EndGroupBox();
597597
}
598598

599-
ImGui.SameLine();
599+
//ImGui.SameLine();
600600

601601
if (ImGuiEx.BeginGroupBox("Place on Hotbar (HOVER ME FOR INFORMATION)", 0.5f, new ImGuiEx.GroupBoxOptions
602602
{
@@ -684,7 +684,7 @@ public static void DrawHotbarIDInput(RaptureHotbarModule.HotbarSlotType slotType
684684
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<FieldMarker> { FormatRow = r => $"[#{r.RowId}] {r.Name}" });
685685
break;
686686
case RaptureHotbarModule.HotbarSlotType.Recipe:
687-
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<Recipe> { FormatRow = r => $"[#{r.RowId}] {r.ItemResult.Value?.Name}" });
687+
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<Recipe> { FormatRow = r => $"[#{r.RowId}] {r.ItemResult.ValueNullable?.Name}" });
688688
break;
689689
case RaptureHotbarModule.HotbarSlotType.ChocoboRaceAbility:
690690
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<ChocoboRaceAbility> { FormatRow = r => $"[#{r.RowId}] {r.Name}" });
@@ -711,7 +711,7 @@ public static void DrawHotbarIDInput(RaptureHotbarModule.HotbarSlotType slotType
711711
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<Perform> { FormatRow = r => $"[#{r.RowId}] {r.Instrument}" });
712712
break;
713713
case RaptureHotbarModule.HotbarSlotType.McGuffin:
714-
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<McGuffin> { FormatRow = r => $"[#{r.RowId}] {r.UIData.Value?.Name}" });
714+
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<McGuffin> { FormatRow = r => $"[#{r.RowId}] {r.UIData.ValueNullable?.Name}" });
715715
break;
716716
case RaptureHotbarModule.HotbarSlotType.Ornament:
717717
ImGuiEx.ExcelSheetCombo($"ID##{commandType}", ref commandID, new ImGuiEx.ExcelSheetComboOptions<Ornament> { FormatRow = r => $"[#{r.RowId}] {r.Singular}" });

PronounManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using FFXIVClientStructs.FFXIV.Client.Game.Character;
66
using FFXIVClientStructs.FFXIV.Client.Game.Control;
77
using FFXIVClientStructs.FFXIV.Client.Game.Object;
8-
using Lumina.Excel.GeneratedSheets;
8+
using Lumina.Excel.Sheets;
99

1010
namespace ReAction;
1111

@@ -20,11 +20,11 @@ public static unsafe class PronounHelpers
2020
public static GameObject* GetPartyMemberByClassJobID(byte classJob) => (GameObject*)Common.GetPartyMembers().Skip(1).FirstOrDefault(address => ((Character*)address)->CharacterData.ClassJob == classJob);
2121

2222
public static GameObject* GetPartyMemberByRoleID(byte role) => DalamudApi.DataManager.GetExcelSheet<ClassJob>() is { } sheet
23-
? (GameObject*)Common.GetPartyMembers().Skip(1).FirstOrDefault(address => sheet.GetRow(((Character*)address)->CharacterData.ClassJob)?.Role == role)
23+
? (GameObject*)Common.GetPartyMembers().Skip(1).FirstOrDefault(address => sheet.GetRow(((Character*)address)->CharacterData.ClassJob).Role == role)
2424
: null;
2525

2626
public static GameObject* GetPartyMemberByLimitBreak1(uint actionID) => DalamudApi.DataManager.GetExcelSheet<ClassJob>() is { } sheet
27-
? (GameObject*)Common.GetPartyMembers().Skip(1).FirstOrDefault(address => sheet.GetRow(((Character*)address)->CharacterData.ClassJob)?.LimitBreak1.Row == actionID)
27+
? (GameObject*)Common.GetPartyMembers().Skip(1).FirstOrDefault(address => sheet.GetRow(((Character*)address)->CharacterData.ClassJob).LimitBreak1.RowId == actionID)
2828
: null;
2929
}
3030

ReAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ namespace ReAction;
77

88
public class ReAction(IDalamudPluginInterface pluginInterface) : DalamudPlugin<Configuration>(pluginInterface), IDalamudPlugin
99
{
10-
public static Dictionary<uint, Lumina.Excel.GeneratedSheets.Action> actionSheet;
11-
public static Dictionary<uint, Lumina.Excel.GeneratedSheets.Action> mountActionsSheet;
10+
public static Dictionary<uint, Lumina.Excel.Sheets.Action> actionSheet;
11+
public static Dictionary<uint, Lumina.Excel.Sheets.Action> mountActionsSheet;
1212

1313
protected override void Initialize()
1414
{
1515
Game.Initialize();
1616
PronounManager.Initialize();
1717

18-
actionSheet = DalamudApi.DataManager.GetExcelSheet<Lumina.Excel.GeneratedSheets.Action>()?.Where(i => i.ClassJobCategory.Row > 0 && i.ActionCategory.Row <= 4 && i.RowId > 8).ToDictionary(i => i.RowId, i => i);
19-
mountActionsSheet = DalamudApi.DataManager.GetExcelSheet<Lumina.Excel.GeneratedSheets.Action>()?.Where(i => i.ActionCategory.Row == 12).ToDictionary(i => i.RowId, i => i);
18+
actionSheet = DalamudApi.DataManager.GetExcelSheet<Lumina.Excel.Sheets.Action>().Where(i => i.ClassJobCategory.RowId > 0 && i.ActionCategory.RowId <= 4 && i.RowId > 8).ToDictionary(i => i.RowId, i => i);
19+
mountActionsSheet = DalamudApi.DataManager.GetExcelSheet<Lumina.Excel.Sheets.Action>().Where(i => i.ActionCategory.RowId == 12).ToDictionary(i => i.RowId, i => i);
2020
if (actionSheet == null || mountActionsSheet == null)
2121
throw new ApplicationException("Action sheet failed to load!");
2222
}

ReAction.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>1.3.3.10</Version>
4+
<Version>1.3.3.11</Version>
55
<TargetFramework>net8.0</TargetFramework>
66
<PlatformTarget>x64</PlatformTarget>
77
<Platforms>x64;AnyCPU</Platforms>
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="DalamudPackager" Version="2.1.13" />
19+
<PackageReference Include="DalamudPackager" Version="11.0.0" />
2020
<Reference Include="FFXIVClientStructs">
2121
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
2222
<Private>false</Private>

0 commit comments

Comments
 (0)