Skip to content

Commit 7afa35e

Browse files
committed
AutoHook 2.3.0.0 [PUSH]
- New AutoGig (spearfishing) Option - Added GP management for AutoCast - Added selectable Tugs for Double/Triple hook Small changes - Adjustments to the UI - A lot of code refactor - Some bugfixes - Added a new command to open the configuration window
1 parent be24611 commit 7afa35e

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

AutoHook/AutoHook.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class AutoHook : IDalamudPlugin
1515
public string Name => "AutoHook";
1616

1717
private const string CmdAHCfg = "/ahcfg";
18+
private const string CmdAH = "/ah";
1819
private const string CmdAHOn = "/ahon";
1920
private const string CmdAHOff = "/ahoff";
2021

@@ -59,6 +60,11 @@ public AutoHook(DalamudPluginInterface pluginInterface)
5960
HelpMessage = "Opens Config Window"
6061
});
6162

63+
Service.Commands.AddHandler(CmdAH, new CommandInfo(OnCommand)
64+
{
65+
HelpMessage = "Opens Config Window"
66+
});
67+
6268
HookManager = new HookingManager();
6369
HookManager.Enable();
6470

@@ -72,6 +78,9 @@ private void OnCommand(string command, string args)
7278
if (command.Trim().Equals(CmdAHCfg))
7379
OnOpenConfigUi();
7480

81+
if (command.Trim().Equals(CmdAH))
82+
OnOpenConfigUi();
83+
7584
if (command.Trim().Equals(CmdAHOn))
7685
{
7786
Service.Chat.Print("AutoHook Enabled");
@@ -95,6 +104,7 @@ public void Dispose()
95104
Service.PluginInterface!.UiBuilder.Draw -= Service.WindowSystem.Draw;
96105
Service.PluginInterface.UiBuilder.OpenConfigUi -= OnOpenConfigUi;
97106
Service.Commands.RemoveHandler(CmdAHCfg);
107+
Service.Commands.RemoveHandler(CmdAH);
98108
Service.Commands.RemoveHandler(CmdAHOn);
99109
Service.Commands.RemoveHandler(CmdAHOff);
100110
}

AutoHook/AutoHook.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<Authors>Det</Authors>
5-
<Version>2.2.3.2</Version>
5+
<Version>2.3.0.0</Version>
66
<Description>Auto hooks for you</Description>
77
<PackageProjectUrl>https://github.com/InitialDet/AutoHook</PackageProjectUrl>
88
<Configurations>Release;Debug</Configurations>

AutoHook/Configurations/Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class Configuration : IPluginConfiguration
1818
public HookConfig DefaultMoochConfig = new("DefaultMooch");
1919
public List<HookConfig> CustomBait = new();
2020

21-
public bool AutoGigEnabled = true;
21+
public bool AutoGigEnabled = false;
2222
public bool AutoGigHideOverlay = false;
2323
public bool AutoGigNaturesBountyEnabled = false;
2424

AutoHook/Utils/PlayerResources.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public class PlayerResources : IDisposable
2323

2424
[Signature("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 41 B0 01 BA 13 00 00 00")]
2525
private static unsafe delegate* unmanaged<IntPtr, uint, uint, uint, short, void> useItem = null;
26-
26+
/*
2727
[Signature("E8 ?? ?? ?? ?? 48 8B 8D F0 03 00 00", DetourName = nameof(ReceiveActionEffectDetour))]
2828
private readonly Hook<ReceiveActionEffectDelegate>? receiveActionEffectHook = null;
29-
private delegate void ReceiveActionEffectDelegate(int sourceObjectId, IntPtr sourceActor, IntPtr position, IntPtr effectHeader, IntPtr effectArray, IntPtr effectTrail);
29+
private delegate void ReceiveActionEffectDelegate(int sourceObjectId, IntPtr sourceActor, IntPtr position, IntPtr effectHeader, IntPtr effectArray, IntPtr effectTrail);*/
3030

3131
public void Initialize()
3232
{
@@ -204,12 +204,12 @@ public static void CastActionNoDelay(uint id, ActionType actionType = ActionType
204204
isCastingNoDelay = false;
205205
}
206206

207-
207+
/*
208208
private void ReceiveActionEffectDetour(int sourceObjectId, IntPtr sourceActor, IntPtr position, IntPtr effectHeader, IntPtr effectArray, IntPtr effectTrail)
209209
{
210210
receiveActionEffectHook!.Original(sourceObjectId, sourceActor, position, effectHeader, effectArray, effectTrail);
211211
212-
/*ActionEffectHeader header = Marshal.PtrToStructure<ActionEffectHeader>(effectHeader);
212+
ActionEffectHeader header = Marshal.PtrToStructure<ActionEffectHeader>(effectHeader);
213213
214214
if (sourceObjectId == Service.ClientState.LocalPlayer?.ObjectId)
215215
{
@@ -218,8 +218,8 @@ private void ReceiveActionEffectDetour(int sourceObjectId, IntPtr sourceActor, I
218218
LastActionID = NextActionID;
219219
ResetAutoCast();
220220
}
221-
}*/
222-
}
221+
}
222+
}*/
223223

224224
public static async void ResetAutoCast()
225225
{

0 commit comments

Comments
 (0)