Skip to content

Commit

Permalink
Merge pull request #117 from InitialDet/newVersion
Browse files Browse the repository at this point in the history
3.0 Update
  • Loading branch information
InitialDet authored Oct 16, 2023
2 parents 5e46398 + 830ea94 commit 9bb609a
Show file tree
Hide file tree
Showing 68 changed files with 5,728 additions and 4,719 deletions.
50 changes: 25 additions & 25 deletions AutoHook.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoHook", "AutoHook\AutoHook.csproj", "{B00DE705-685B-4CAD-AEC1-37BA94BD537D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Debug|x64.ActiveCfg = Debug|x64
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Debug|x64.Build.0 = Debug|x64
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Release|x64.ActiveCfg = Release|x64
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8BCE7152-3829-4975-A314-A29987BE3DE9}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoHook", "AutoHook\AutoHook.csproj", "{B00DE705-685B-4CAD-AEC1-37BA94BD537D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Debug|x64.ActiveCfg = Debug|x64
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Debug|x64.Build.0 = Debug|x64
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Release|x64.ActiveCfg = Release|x64
{B00DE705-685B-4CAD-AEC1-37BA94BD537D}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8BCE7152-3829-4975-A314-A29987BE3DE9}
EndGlobalSection
EndGlobal
17 changes: 10 additions & 7 deletions AutoHook/AutoHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
using AutoHook.Utils;
using Dalamud.Game.Command;
using Dalamud.Plugin;
using SeFunctions;

namespace AutoHook;

public class AutoHook : IDalamudPlugin
{

/*
todo: autofood (not yet)
todo: Add Guides
*/
public string Name => UIStrings.AutoHook;

private const string CmdAhCfg = "/ahcfg";
Expand All @@ -31,15 +36,15 @@ public AutoHook(DalamudPluginInterface pluginInterface)
{
Service.Initialize(pluginInterface);
Service.EventFramework = new EventFramework(Service.SigScanner);
Service.CurrentBait = new CurrentBait(Service.SigScanner);
Service.EquipedBait = new CurrentBait(Service.SigScanner);
Service.TugType = new SeTugType(Service.SigScanner);
Service.PluginInterface.UiBuilder.Draw += Service.WindowSystem.Draw;
Service.PluginInterface.UiBuilder.OpenConfigUi += OnOpenConfigUi;
Service.Configuration = Configuration.Load();
Service.Language = Service.ClientState.ClientLanguage;

_playerResources = new PlayerResources();
_playerResources.Initialize();

Service.Configuration = Configuration.Load();
UIStrings.Culture = new CultureInfo(Service.Configuration.CurrentLanguage);
_pluginUi = new PluginUi();
_autoGig = new AutoGig();
Expand Down Expand Up @@ -73,8 +78,6 @@ public AutoHook(DalamudPluginInterface pluginInterface)

#if (DEBUG)
OnOpenConfigUi();


#endif
}

Expand Down Expand Up @@ -111,7 +114,7 @@ public void Dispose()
_autoGig.Dispose();
_hookManager.Dispose();
_playerResources.Dispose();
Service.Configuration.Save();
Service.Save();
Service.PluginInterface.UiBuilder.Draw -= Service.WindowSystem.Draw;
Service.PluginInterface.UiBuilder.OpenConfigUi -= OnOpenConfigUi;
Service.Commands.RemoveHandler(CmdAhCfg);
Expand Down
168 changes: 84 additions & 84 deletions AutoHook/AutoHook.csproj
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Authors>Det</Authors>
<Version>2.5.0.0</Version>
<Description>Auto hooks for you</Description>
<PackageProjectUrl>https://github.com/InitialDet/AutoHook</PackageProjectUrl>
<Configurations>Release;Debug</Configurations>
<TargetFramework>net7.0-windows</TargetFramework>
<Platforms>x64</Platforms>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputPath>bin\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<Authors>Det</Authors>
<Version>2.5.0.1</Version>
<Description>Auto hooks for you</Description>
<PackageProjectUrl>https://github.com/InitialDet/AutoHook</PackageProjectUrl>
<Configurations>Release;Debug</Configurations>
<TargetFramework>net7.0-windows</TargetFramework>
<Platforms>x64</Platforms>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputPath>bin\$(Configuration)\</OutputPath>
</PropertyGroup>

<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<PropertyGroup>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
</PropertyGroup>

<ItemGroup>
<Content Include="AutoHook.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<PropertyGroup>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Content Include="AutoHook.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<Folder Include="images\" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>

<!-- Localization -->
<ItemGroup>
<Folder Include="images\"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.12" />
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGui.NET">
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGuiScene">
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina.Excel">
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<!-- Localization -->

<ItemGroup>
<Compile Update="Resources\Localization\UIStrings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>UIStrings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.12"/>
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGui.NET">
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGuiScene">
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina.Excel">
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\Localization\UIStrings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>UIStrings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\Localization\UIStrings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>UIStrings.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\Localization\UIStrings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>UIStrings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
22 changes: 22 additions & 0 deletions AutoHook/Classes/AutoCasts/AutoCastLine.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using AutoHook.Resources.Localization;

namespace AutoHook.Classes.AutoCasts;

public class AutoCastLine : BaseActionCast
{

public AutoCastLine() : base(UIStrings.AutoCastLine_Auto_Cast_Line, Data.IDs.Actions.Cast)
{
GpThreshold = 1;
}

public override bool CastCondition()
{
return true;
}

/*protected override DrawOptionsDelegate DrawOptions => () =>
{
};*/
}
33 changes: 33 additions & 0 deletions AutoHook/Classes/AutoCasts/AutoChum.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using AutoHook.Data;
using AutoHook.Resources.Localization;
using AutoHook.Utils;

namespace AutoHook.Classes.AutoCasts;

public class AutoChum : BaseActionCast
{
private bool _onlyUseWithIntuition;

public AutoChum() : base(UIStrings.Chum, IDs.Actions.Chum)
{
DoesCancelMooch = true;
HelpText = UIStrings.CancelsCurrentMooch;
}

public override bool CastCondition()
{
if (!PlayerResources.HasStatus(IDs.Status.FishersIntuition) && _onlyUseWithIntuition)
return false;

return true;
}

protected override DrawOptionsDelegate DrawOptions => () =>
{
if (DrawUtil.Checkbox(UIStrings.OnlyUseWhenFisherSIntutionIsActive,
ref _onlyUseWithIntuition))
{
Service.Save();
}
};
}
Loading

0 comments on commit 9bb609a

Please sign in to comment.