Skip to content

Commit

Permalink
AutoHook 2.4.4.0 [PUSH]
Browse files Browse the repository at this point in the history
It's now possible to enable both Double and Triple hook
  • Loading branch information
InitialDet committed Mar 7, 2023
1 parent 79f2e06 commit 3d5ea60
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 29 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.4.3.1</Version>
<Version>2.4.4.0</Version>
<Description>Auto hooks for you</Description>
<PackageProjectUrl>https://github.com/InitialDet/AutoHook</PackageProjectUrl>
<Configurations>Release;Debug</Configurations>
Expand Down
32 changes: 13 additions & 19 deletions AutoHook/Configurations/BaitConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,31 +135,25 @@ public bool CheckHookDHTHEnabled(BiteType bite) =>

private HookType? GetDoubleTripleHook(BiteType bite)
{
HookType hook = HookType.None;
if (UseTripleHook || UseDoubleHook)
{
if (UseDHTHOnlySurfaceSlap && !PlayerResources.HasStatus(IDs.Status.IdenticalCast))
return HookType.None;

if (PlayerResources.HasStatus(IDs.Status.AnglersFortune) && !UseDHTHPatience)
return hook;
if (PlayerResources.HasStatus(IDs.Status.AnglersFortune) && !UseDHTHPatience)
return HookType.None;

if (UseDHTHOnlySurfaceSlap && !PlayerResources.HasStatus(IDs.Status.IdenticalCast))
return hook;
if (UseTripleHook && PlayerResources.GetCurrentGP() >= 700 && CheckHookDHTHEnabled(bite))
return HookType.Triple;

if (UseDoubleHook && PlayerResources.GetCurrentGP() >= 400 && CheckHookDHTHEnabled(bite))
return HookType.Double;


if (UseDoubleHook)
{
if (PlayerResources.GetCurrentGP() >= 400 && CheckHookDHTHEnabled(bite))
hook = HookType.Double;
if (LetFishEscape)
return null;
}
else if (UseTripleHook)
{
if (PlayerResources.GetCurrentGP() >= 700 && CheckHookDHTHEnabled(bite))
hook = HookType.Triple;
else if (LetFishEscape)
return null;
}

return hook;

return HookType.None;
}

public override bool Equals(object? obj)
Expand Down
7 changes: 5 additions & 2 deletions AutoHook/Ui/TabBaseConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,17 @@ public void DrawCheckBoxDoubleTripleHook(BaitConfig cfg)

if (ImGui.Checkbox("Use Double Hook (If gp > 400)", ref cfg.UseDoubleHook))
{
if (cfg.UseDoubleHook) cfg.UseTripleHook = false;
if (cfg.UseDoubleHook && !ImGui.GetIO().KeyShift) cfg.UseTripleHook = false;
Service.Configuration.Save();
}
ImGuiComponents.HelpMarker("Hold SHIFT to select both Double and Triple Hook (not recommended)");

if (ImGui.Checkbox("Use Triple Hook (If gp > 700)", ref cfg.UseTripleHook))
{
if (cfg.UseTripleHook) cfg.UseDoubleHook = false;
if (cfg.UseTripleHook && !ImGui.GetIO().KeyShift) cfg.UseDoubleHook = false;
Service.Configuration.Save();
}
ImGuiComponents.HelpMarker("Hold SHIFT to select both Double and Triple Hook (not recommended)");

if (cfg.UseTripleHook || cfg.UseDoubleHook)
{
Expand Down
23 changes: 16 additions & 7 deletions AutoHook/Ui/TabGeneral.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,31 @@ private void DrawChangelog()
if (ImGui.Begin("Changelog", ref openChangelog, ImGuiWindowFlags.AlwaysAutoResize))
{
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudYellow);
ImGui.TextWrapped("2.4.3.0");
ImGui.TextWrapped("2.4.4.0");
ImGui.PopStyleColor();
ImGui.Separator();
ImGui.TextWrapped("- Added Watered Cortials for AutoCasts");
//Current Version
ImGui.TextWrapped("- It's now possible to enable both Double and Triple hook (hold shift when selecting the options)");

ImGui.Spacing();

if (ImGui.TreeNode("2.4.3.x"))
/*if (ImGui.TreeNode("2.4.4.x"))
{
ImGui.TextWrapped("- Fixed duplicated GP Configs");

ImGui.TreePop();
}
}*/

if (ImGui.BeginChild("old_versions", new Vector2(0, 150), true))
{
if (ImGui.TreeNode("2.4.3.0"))
{
ImGui.TextWrapped("- Added Watered Cortials for AutoCasts");
ImGui.Spacing();
ImGui.TextWrapped("2.4.3.x");
ImGui.TextWrapped("- Fixed duplicated GP Configs");

ImGui.TreePop();
}

if (ImGui.TreeNode("2.4.2.0"))
{
ImGui.TextWrapped("- Added customizable hitbox for autogig");
Expand All @@ -162,7 +171,7 @@ private void DrawChangelog()
ImGui.Separator();
ImGui.Spacing();

ImGui.TextWrapped("2.4.2.X");
ImGui.TextWrapped("2.4.2.x");
ImGui.TextWrapped("- Gig hitbox is now enabled by default");
ImGui.TextWrapped("- Fixed the order of the Chum Timer Min/Max fields");
ImGui.TextWrapped("- Fixed some options not saving correctly");
Expand Down

0 comments on commit 3d5ea60

Please sign in to comment.