Skip to content

Commit

Permalink
AutoHook 2.2.3.0 [PUSH]
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
InitialDet committed Aug 15, 2022
1 parent 6df5e13 commit ed55df5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AutoHook/AutoHook.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Authors>Det</Authors>
<Version>2.2.2.5</Version>
<Version>2.2.3.0</Version>
<Description>Auto hooks for you</Description>
<PackageProjectUrl>https://github.com/InitialDet/AutoHook</PackageProjectUrl>
<Configurations>Release;Debug</Configurations>
Expand Down
8 changes: 7 additions & 1 deletion AutoHook/HookManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ private void UpdateCurrentSetting()

private void OnBeganFishing()
{
if (LastStep == CatchSteps.BeganFishing)
return;
CurrentBait = GetCurrentBait();
Timer.Reset();
Timer.Start();
Expand All @@ -115,6 +117,9 @@ private void OnBeganFishing()

private void OnBeganMooch()
{
if (LastStep == CatchSteps.BeganMooching)
return;

CurrentBait = new string(LastCatch);
Timer.Reset();
Timer.Start();
Expand Down Expand Up @@ -171,7 +176,6 @@ private void OnFishingStop()
if (Timer.IsRunning)
{
Timer.Stop();

}

CurrentBait = "-";
Expand All @@ -190,6 +194,8 @@ private void OnFrameworkUpdate(Framework _)
state = FishingState.Quit;
}

//CheckState();

// FishBit in this case means that the fish was hooked, but it escaped. I might need to find a way to check if the fish was caught or not.
if (LastStep != CatchSteps.Quitting && state == FishingState.PoleReady && (LastStep == CatchSteps.FishBit || LastStep == CatchSteps.FishCaught || LastStep == CatchSteps.TimeOut))
{
Expand Down
3 changes: 2 additions & 1 deletion AutoHook/Parser/FishingParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ private void OnMessageDelegate(XivChatType type, uint senderId, ref SeString sen

private bool OnUseAction(IntPtr manager, ActionType actionType, uint actionId, GameObjectID targetId, uint a4, uint a5, uint a6, IntPtr a7)
{
if (actionType == ActionType.Spell)
if (actionType == ActionType.Spell && PlayerResources.ActionAvailable(actionId))
switch (actionId)
{
case IDs.Actions.Cast:

BeganFishing?.Invoke();
break;
case IDs.Actions.Mooch:
Expand Down
1 change: 1 addition & 0 deletions AutoHook/Utils/InputUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace AutoHook.Utils;

// I got this from the XIVDeck plugin, ty KazWolfe
internal static class InputUtil
{
private const uint WM_KEYUP = 0x101;
Expand Down

0 comments on commit ed55df5

Please sign in to comment.