Skip to content

Commit 2a09cd8

Browse files
committed
Fix for EW?
1 parent aad4284 commit 2a09cd8

File tree

4 files changed

+32
-28
lines changed

4 files changed

+32
-28
lines changed

MOAction/MOAction.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ namespace MOAction
2828
{
2929
public class MOAction
3030
{
31-
public delegate bool OnRequestActionDetour(long param_1, uint param_2, ulong param_3, long param_4,
32-
uint param_5, uint param_6, int param_7);
31+
public unsafe delegate bool OnRequestActionDetour(long param_1, uint param_2, ulong param_3, long param_4,
32+
uint param_5, uint param_6, int param_7, byte* param_8);
3333

3434
[UnmanagedFunctionPointer(CallingConvention.ThisCall, CharSet = CharSet.Ansi)]
3535
private delegate ulong ResolvePlaceholderActor(long param1, string param2, byte param3, byte param4);
@@ -87,7 +87,7 @@ public delegate bool OnRequestActionDetour(long param_1, uint param_2, ulong par
8787
private unsafe ActionManager* AM;
8888
private readonly int IdOffset = (int)Marshal.OffsetOf<FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject>("ObjectID");
8989

90-
public MOAction(SigScanner scanner, ClientState clientstate,
90+
public unsafe MOAction(SigScanner scanner, ClientState clientstate,
9191
DataManager datamanager, TargetManager targetmanager, ObjectTable objects, KeyState keystate, GameGui gamegui
9292
)
9393
{
@@ -193,9 +193,9 @@ private bool ReqLocDetour(IntPtr actionMgr, uint type, uint id, uint targetId, r
193193
}
194194

195195
private unsafe bool HandleRequestAction(long param_1, uint actionType, ulong actionID, long param_4,
196-
uint param_5, uint param_6, int param_7)
196+
uint param_5, uint param_6, int param_7, byte* param_8)
197197
{
198-
if (actionType != 1) return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7);
198+
if (actionType != 1) return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7, param_8);
199199
var (action, target) = GetActionTarget((uint)actionID, actionType);
200200
void EnqueueGroundTarget()
201201
{
@@ -219,9 +219,9 @@ void DequeueGroundTarget()
219219
Marshal.WriteInt64(self + 120, 0);
220220
}
221221

222-
if (action == null) return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7);
222+
if (action == null) return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7, param_8);
223223
if (action.Name == "Earthly Star" && clientState.LocalPlayer.StatusList.Any(x => x.StatusId == 1248 || x.StatusId == 1224))
224-
return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7);
224+
return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7, param_8);
225225
// Ground target "at my cursor"
226226
if (action != null && target == null)
227227
{
@@ -265,9 +265,9 @@ void DequeueGroundTarget()
265265
bool returnval = RALDelegate((IntPtr)param_1, actionType, action.RowId, (uint)param_4, ref targpos, 0);
266266
return returnval;
267267
}
268-
return requestActionHook.Original(param_1, actionType, action.RowId, target.ObjectId, param_5, param_6, param_7);
268+
return requestActionHook.Original(param_1, actionType, action.RowId, target.ObjectId, param_5, param_6, param_7, param_8);
269269
}
270-
return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7);
270+
return requestActionHook.Original(param_1, actionType, actionID, param_4, param_5, param_6, param_7, param_8);
271271
}
272272

273273
private Vector3 GetClampedGroundCoords(Vector3 self, Vector3 dest, int range)

MOAction/MOAction.csproj

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<Product>MOActionPlugin</Product>
66
<Description>This plugin allows for actions to be used on mouseover targets without a macro.</Description>
77
<Copyright>Copyleft attick 2021 baybeeee</Copyright>
8-
<AssemblyVersion>4.0.9</AssemblyVersion>
9-
<FileVersion>4.0.9</FileVersion>
8+
<AssemblyVersion>4.1.0</AssemblyVersion>
9+
<FileVersion>4.1.0</FileVersion>
1010
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1111
<OutputPath>bin\$(Configuration)\</OutputPath>
1212
<AppDesignerFolder>Properties.bak</AppDesignerFolder>
@@ -17,31 +17,43 @@
1717
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
1818
<DebugType>pdbonly</DebugType>
1919
</PropertyGroup>
20+
21+
<PropertyGroup>
22+
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev</DalamudLibPath>
23+
</PropertyGroup>
24+
2025
<ItemGroup>
2126
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
2227
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
2328
</ItemGroup>
2429
<ItemGroup>
2530
<Reference Include="Dalamud">
26-
<HintPath>..\..\..\..\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
31+
<HintPath>$(DalamudLibPath)\Dalamud.dll</HintPath>
32+
<Private>false</Private>
2733
</Reference>
2834
<Reference Include="FFXIVClientStructs">
29-
<HintPath>..\..\dalamud-goatcorp\bin\Release\FFXIVClientStructs.dll</HintPath>
35+
<HintPath>$(DalamudLibPath)\FFXIVClientStructs.dll</HintPath>
36+
<Private>false</Private>
3037
</Reference>
3138
<Reference Include="ImGui.NET">
32-
<HintPath>..\..\dalamud-goatcorp\bin\Release\ImGui.NET.dll</HintPath>
39+
<HintPath>$(DalamudLibPath)\ImGui.NET.dll</HintPath>
40+
<Private>false</Private>
3341
</Reference>
3442
<Reference Include="ImGuiScene">
35-
<HintPath>..\..\dalamud-goatcorp\bin\Release\ImGuiScene.dll</HintPath>
43+
<HintPath>$(DalamudLibPath)\ImGuiScene.dll</HintPath>
44+
<Private>false</Private>
3645
</Reference>
3746
<Reference Include="Lumina">
38-
<HintPath>..\..\dalamud-goatcorp\bin\Release\Lumina.dll</HintPath>
47+
<HintPath>$(DalamudLibPath)\Lumina.dll</HintPath>
48+
<Private>false</Private>
3949
</Reference>
4050
<Reference Include="Lumina.Excel">
41-
<HintPath>..\..\dalamud-goatcorp\bin\Release\Lumina.Excel.dll</HintPath>
51+
<HintPath>$(DalamudLibPath)\Lumina.Excel.dll</HintPath>
52+
<Private>false</Private>
4253
</Reference>
4354
<Reference Include="SDL2-CS">
44-
<HintPath>..\..\dalamud-goatcorp\bin\Release\SDL2-CS.dll</HintPath>
55+
<HintPath>$(DalamudLibPath)\SDL2-CS.dll</HintPath>
56+
<Private>false</Private>
4557
</Reference>
4658
</ItemGroup>
4759
</Project>

MOAction/MOActionAddressResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public class MOActionAddressResolver : BaseAddressResolver
2727
// This is so hacky. One day I'm going to figure out how to get proper sigs.
2828
protected override void Setup64Bit(SigScanner sig)
2929
{
30-
RequestAction = sig.ScanText("40 53 55 57 41 54 41 57 48 83 EC 60 83 BC 24 ?? ?? ?? ?? ?? 49 8B E9 45 8B E0 44 8B FA 48 8B F9 41 8B D8 74 14 80 79 68 00 74 0E 32 C0 48 83 C4 60 41 5F 41 5C 5F 5D 5B C3");
30+
RequestAction = sig.ScanText("E8 ?? ?? ?? ?? EB 64 B1 01");
3131

32-
SetUiMouseoverEntityId = sig.ScanText("48 89 91 ?? ?? ?? ?? C3 CC CC CC CC CC CC CC CC 48 89 5C 24 ?? 55 56 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 48 8D B1 ?? ?? ?? ?? 44 89 44 24 ?? 48 8B EA 48 8B D9 48 8B CE 48 8D 15 ?? ?? ?? ?? 41 B9 ?? ?? ?? ??");
32+
SetUiMouseoverEntityId = sig.ScanText("E8 ?? ?? ?? ?? 48 8B 6C 24 ?? 48 8B 5C 24 ?? 4C 8B 7C 24 ?? 41 83 FC 02");
3333

3434
ResolvePlaceholderText = sig.ScanText("E8 ?? ?? ?? ?? 48 8B 5C 24 ?? EB 0C");
3535

MOAction/MOActionPlugin.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,16 @@ internal class MOActionPlugin : IDalamudPlugin
3737
private List<Lumina.Excel.GeneratedSheets.Action> applicableActions;
3838
private List<TargetType> TargetTypes;
3939
private List<TargetType> GroundTargetTypes;
40-
private readonly string[] tTypeNames = { "UI Mouseover", "Field Mouseover", "Regular Target", "Focus Target", "Target of Target", "Myself", "<2>", "<3>", "<4>", "<5>", "<6>", "<7>", "<8>", "Mouse Cursor (Ground Target)" };
41-
private List<GuiSettings> SortedStackFlags;
42-
private List<GuiSettings> UnsortedStackFlags;
4340
private List<MoActionStack> NewStacks;
4441
private Dictionary<string, HashSet<MoActionStack>> SavedStacks;
45-
//List<Lumina.Excel.GeneratedSheets.Action> actions;
4642

4743
private bool firstTimeUpgrade = false;
4844
private bool rangeCheck;
4945
private bool mouseClamp;
5046
private bool otherGroundClamp;
5147

52-
// private readonly string[] soloJobNames = { "AST", "WHM", "SCH", "SMN", "BLM", "RDM", "BLU", "BRD", "MCH", "DNC", "DRK", "GNB", "WAR", "PLD", "DRG", "MNK", "SAM", "NIN" };
5348
private readonly Lumina.Excel.GeneratedSheets.ClassJob[] Jobs;
5449
private readonly List<Lumina.Excel.GeneratedSheets.ClassJob> JobAbbreviations;
55-
private readonly string[] roleActionNames = { "BLM SMN RDM BLU", "BRD MCH DNC", "MNK DRG NIN SAM", "PLD WAR DRK GNB", "WHM SCH AST"};
5650
private readonly uint[] GroundTargets = { 3569, 3639, 188, 7439, 2262 };
5751

5852
private Dictionary<string, List<Lumina.Excel.GeneratedSheets.Action>> JobActions;
@@ -69,8 +63,6 @@ internal class MOActionPlugin : IDalamudPlugin
6963
private KeyState KeyState;
7064
//private FFXIVClientStructs.Attributes.Addon addon;
7165

72-
private bool testo;
73-
7466
unsafe public MOActionPlugin(DalamudPluginInterface pluginInterface, CommandManager commands, DataManager datamanager, GameGui gamegui, KeyState keystate, ObjectTable objects, SigScanner scanner, ClientState clientstate, TargetManager targetmanager)
7567
{
7668
this.pluginInterface = pluginInterface;

0 commit comments

Comments
 (0)