Skip to content

Commit

Permalink
6.5 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Limiana committed Oct 3, 2023
1 parent c12be14 commit 75799e5
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "lib/ClickLib"]
path = lib/ClickLib
url = https://github.com/daemitus/ClickLib.git
url = https://github.com/Limiana/ClickLib
18 changes: 9 additions & 9 deletions YesAlready.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClickLib", "lib\ClickLib\ClickLib\ClickLib.csproj", "{029CD692-00EF-4B95-B140-6BEEE9660480}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClickLib", "..\ClickLib\ClickLib\ClickLib.csproj", "{8B73109D-D97E-4C1E-A974-42DD707D20DF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -35,14 +35,14 @@ Global
{151006FE-161B-478D-BA72-479DFBF4BE7A}.Release|Any CPU.Build.0 = Release|x64
{151006FE-161B-478D-BA72-479DFBF4BE7A}.Release|x64.ActiveCfg = Release|x64
{151006FE-161B-478D-BA72-479DFBF4BE7A}.Release|x64.Build.0 = Release|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Debug|Any CPU.ActiveCfg = Debug|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Debug|Any CPU.Build.0 = Debug|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Debug|x64.ActiveCfg = Debug|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Debug|x64.Build.0 = Debug|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Release|Any CPU.ActiveCfg = Release|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Release|Any CPU.Build.0 = Release|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Release|x64.ActiveCfg = Release|x64
{029CD692-00EF-4B95-B140-6BEEE9660480}.Release|x64.Build.0 = Release|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Debug|Any CPU.ActiveCfg = Debug|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Debug|Any CPU.Build.0 = Debug|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Debug|x64.ActiveCfg = Debug|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Debug|x64.Build.0 = Debug|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Release|Any CPU.ActiveCfg = Release|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Release|Any CPU.Build.0 = Release|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Release|x64.ActiveCfg = Release|x64
{8B73109D-D97E-4C1E-A974-42DD707D20DF}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion YesAlready/BaseFeatures/OnSetupFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal abstract class OnSetupFeature : IBaseFeature
public OnSetupFeature(string onSetupSig)
{
this.HookAddress = Service.Scanner.ScanText(onSetupSig);
this.onSetupHook = Hook<OnSetupDelegate>.FromAddress(this.HookAddress, this.OnSetupDetour);
this.onSetupHook = Service.Hook.HookFromAddress<OnSetupDelegate>(this.HookAddress, this.OnSetupDetour);
this.onSetupHook.Enable();
}

Expand Down
2 changes: 1 addition & 1 deletion YesAlready/BaseFeatures/OnSetupSelectListFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected unsafe void SetupOnItemSelectedHook(PopupMenu* popupMenu)
return;

var onItemSelectedAddress = (IntPtr)popupMenu->AtkEventListener.vfunc[3];
this.onItemSelectedHook = Hook<OnItemSelectedDelegate>.FromAddress(onItemSelectedAddress, this.OnItemSelectedDetour);
this.onItemSelectedHook = Service.Hook.HookFromAddress<OnItemSelectedDelegate>(onItemSelectedAddress, this.OnItemSelectedDetour);
this.onItemSelectedHook.Enable();
}

Expand Down
2 changes: 1 addition & 1 deletion YesAlready/BaseFeatures/UpdateFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal abstract class UpdateFeature : IBaseFeature
public UpdateFeature(string updateSig)
{
this.HookAddress = Service.Scanner.ScanText(updateSig);
this.updateHook = Hook<UpdateDelegate>.FromAddress(this.HookAddress, this.UpdateDetour);
this.updateHook = Service.Hook.HookFromAddress<UpdateDelegate>(this.HookAddress, this.UpdateDetour);
this.updateHook.Enable();
}

Expand Down
2 changes: 1 addition & 1 deletion YesAlready/Features/AddonInclusionShopFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal class AddonInclusionShopFeature : OnSetupFeature, IDisposable
public AddonInclusionShopFeature()
: base("85 D2 0F 8E ?? ?? ?? ?? 4C 8B DC 55 53 41 54")
{
SignatureHelper.Initialise(this);
Service.Hook.InitializeFromAttributes(this);

this.agentReceiveEventHook.Enable();
}
Expand Down
3 changes: 2 additions & 1 deletion YesAlready/Features/AddonSelectYesNoFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ private unsafe void AddonSelectYesNoExecute(IntPtr addon, bool yes)
if (yesButton != null && !yesButton->IsEnabled)
{
PluginLog.Debug("AddonSelectYesNo: Enabling yes button");
yesButton->AtkComponentBase.OwnerNode->AtkResNode.Flags ^= 1 << 5;
var flagsPtr = (ushort*)&yesButton->AtkComponentBase.OwnerNode->AtkResNode.NodeFlags;
*flagsPtr ^= 1 << 5;
}

PluginLog.Debug("AddonSelectYesNo: Selecting yes");
Expand Down
1 change: 1 addition & 0 deletions YesAlready/Interface/ConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using ClickLib.Exceptions;
using Dalamud.Game.ClientState.Keys;
using Dalamud.Interface;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Windowing;
using ImGuiNET;

Expand Down
21 changes: 12 additions & 9 deletions YesAlready/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Dalamud.Game.Gui;
using Dalamud.IoC;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;

namespace YesAlready;

Expand Down Expand Up @@ -35,53 +36,55 @@ internal class Service
/// Gets the Dalamud chat gui.
/// </summary>
[PluginService]
internal static ChatGui ChatGui { get; private set; } = null!;
internal static IChatGui ChatGui { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud client state.
/// </summary>
[PluginService]
internal static ClientState ClientState { get; private set; } = null!;
internal static IClientState ClientState { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud command manager.
/// </summary>
[PluginService]
internal static CommandManager CommandManager { get; private set; } = null!;
internal static ICommandManager CommandManager { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud data manager.
/// </summary>
[PluginService]
internal static DataManager DataManager { get; private set; } = null!;
internal static IDataManager DataManager { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud framework.
/// </summary>
[PluginService]
internal static Framework Framework { get; private set; } = null!;
internal static IFramework Framework { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud game gui.
/// </summary>
[PluginService]
internal static GameGui GameGui { get; private set; } = null!;
internal static IGameGui GameGui { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud signature scanner.
/// </summary>
[PluginService]
internal static SigScanner Scanner { get; private set; } = null!;
internal static ISigScanner Scanner { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud keystate manager.
/// </summary>
[PluginService]
internal static KeyState KeyState { get; private set; } = null!;
internal static IKeyState KeyState { get; private set; } = null!;

/// <summary>
/// Gets the Dalamud target manager.
/// </summary>
[PluginService]
internal static TargetManager TargetManager { get; private set; } = null!;
internal static ITargetManager TargetManager { get; private set; } = null!;
[PluginService]
internal static IGameInteropProvider Hook { get; private set; } = null!;
}
25 changes: 3 additions & 22 deletions YesAlready/YesAlready.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Authors>daemitus</Authors>
<Company>-</Company>
<Version>1.3.0.2</Version>
<Version>1.3.0.3</Version>
<Description></Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/daemitus/YesAlready</PackageProjectUrl>
Expand Down Expand Up @@ -47,36 +47,17 @@

<ItemGroup>
<!--<PackageReference Include="DalamudLinter" Version="1.0.3" />-->
<PackageReference Include="DalamudPackager" Version="2.1.10" />
<PackageReference Include="ILRepack" Version="2.0.18" GeneratePathProperty="true" />
<PackageReference Include="DalamudPackager" Version="2.1.12" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.333">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\lib\ClickLib\ClickLib\ClickLib.csproj" />
<ProjectReference Include="..\..\ClickLib\ClickLib\ClickLib.csproj" />
<Reference Include="Dalamud" Private="False" />
<Reference Include="FFXIVClientStructs" Private="False" />
<Reference Include="ImGui.NET" Private="False" />
<Reference Include="Lumina" Private="False" />
<Reference Include="Lumina.Excel" Private="False" />
<Reference Include="Newtonsoft.Json" Private="False" />
</ItemGroup>

<Target Name="ILRepack" AfterTargets="Build">
<ItemGroup>
<InputAssemblies Include="$(TargetPath)" />
<InputAssemblies Include="$(TargetDir)*.dll" Exclude="$(TargetPath)" />
</ItemGroup>
<Exec Command="$(PkgILRepack)\tools\ILRepack.exe /lib:$(DalamudLibPath) /out:$(TargetDir)$(TargetFileName) @(InputAssemblies, ' ')" />
</Target>

<Target Name="CleanOutDir" AfterTargets="ILRepack">
<ItemGroup>
<DeleteFiles Include="$(TargetDir)*.dll" Exclude="$(TargetDir)$(TargetName).dll" />
<DeleteFiles Include="$(TargetDir)*.pdb" Exclude="$(TargetDir)$(TargetName).pdb" />
<DeleteFiles Include="$(TargetDir)*.xml" />
</ItemGroup>
<Message Text="Deleting @(DeleteFiles)" Importance="high" />
<Delete Files="@(DeleteFiles)" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion YesAlready/YesAlreadyPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private void LoadTerritories()
}
}

private void FrameworkUpdate(Framework framework)
private void FrameworkUpdate(object framework)
{
if (Service.Configuration.DisableKey != VirtualKey.NO_KEY)
{
Expand Down

0 comments on commit 75799e5

Please sign in to comment.