Compare commits
2 Commits
121c668aae
...
76a297543b
Author | SHA1 | Date |
---|---|---|
Anna | 76a297543b | |
Anna | a40f03063b |
|
@ -8,6 +8,7 @@ using Dalamud.Game.Text;
|
|||
using Dalamud.Game.Text.SeStringHandling;
|
||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||
using Dalamud.Memory;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
|
@ -26,6 +27,8 @@ namespace Glamaholic {
|
|||
internal const string ExamineNamePointer = "48 8D 05 ?? ?? ?? ?? 48 89 85 ?? ?? ?? ?? 74 56 49 8B 4F";
|
||||
}
|
||||
|
||||
#region Delegates
|
||||
|
||||
private delegate void SetGlamourPlateSlotDelegate(IntPtr agent, MirageSource mirageSource, int glamId, uint itemId, byte stainId);
|
||||
|
||||
private delegate void ModifyGlamourPlateSlotDelegate(IntPtr agent, PlateSlot slot, byte stainId, IntPtr numbers, int stainItemId);
|
||||
|
@ -36,28 +39,41 @@ namespace Glamaholic {
|
|||
|
||||
private delegate byte TryOnDelegate(uint unknownCanEquip, uint itemBaseId, ulong stainColor, uint itemGlamourId, byte unknownByte);
|
||||
|
||||
#endregion
|
||||
|
||||
private Plugin Plugin { get; }
|
||||
|
||||
private readonly SetGlamourPlateSlotDelegate _setGlamourPlateSlot;
|
||||
private readonly ModifyGlamourPlateSlotDelegate _modifyGlamourPlateSlot;
|
||||
private readonly ClearGlamourPlateSlotDelegate _clearGlamourPlateSlot;
|
||||
private readonly IsInArmoireDelegate _isInArmoire;
|
||||
#region Functions
|
||||
|
||||
[Signature(Signatures.SetGlamourPlateSlot)]
|
||||
private readonly SetGlamourPlateSlotDelegate _setGlamourPlateSlot = null!;
|
||||
|
||||
[Signature(Signatures.ModifyGlamourPlateSlot)]
|
||||
private readonly ModifyGlamourPlateSlotDelegate _modifyGlamourPlateSlot = null!;
|
||||
|
||||
[Signature(Signatures.ClearGlamourPlateSlot)]
|
||||
private readonly ClearGlamourPlateSlotDelegate _clearGlamourPlateSlot = null!;
|
||||
|
||||
[Signature(Signatures.IsInArmoire)]
|
||||
private readonly IsInArmoireDelegate _isInArmoire = null!;
|
||||
|
||||
[Signature(Signatures.ArmoirePointer, ScanType = ScanType.StaticAddress)]
|
||||
private readonly IntPtr _armoirePtr;
|
||||
private readonly TryOnDelegate _tryOn;
|
||||
|
||||
[Signature(Signatures.TryOn)]
|
||||
private readonly TryOnDelegate _tryOn = null!;
|
||||
|
||||
[Signature(Signatures.ExamineNamePointer, ScanType = ScanType.StaticAddress)]
|
||||
private readonly IntPtr _examineNamePtr;
|
||||
|
||||
#endregion
|
||||
|
||||
private readonly List<uint> _filterIds = new();
|
||||
|
||||
internal GameFunctions(Plugin plugin) {
|
||||
this.Plugin = plugin;
|
||||
|
||||
this._setGlamourPlateSlot = Marshal.GetDelegateForFunctionPointer<SetGlamourPlateSlotDelegate>(this.Plugin.SigScanner.ScanText(Signatures.SetGlamourPlateSlot));
|
||||
this._modifyGlamourPlateSlot = Marshal.GetDelegateForFunctionPointer<ModifyGlamourPlateSlotDelegate>(this.Plugin.SigScanner.ScanText(Signatures.ModifyGlamourPlateSlot));
|
||||
this._clearGlamourPlateSlot = Marshal.GetDelegateForFunctionPointer<ClearGlamourPlateSlotDelegate>(this.Plugin.SigScanner.ScanText(Signatures.ClearGlamourPlateSlot));
|
||||
this._isInArmoire = Marshal.GetDelegateForFunctionPointer<IsInArmoireDelegate>(this.Plugin.SigScanner.ScanText(Signatures.IsInArmoire));
|
||||
this._armoirePtr = this.Plugin.SigScanner.GetStaticAddressFromSig(Signatures.ArmoirePointer);
|
||||
this._tryOn = Marshal.GetDelegateForFunctionPointer<TryOnDelegate>(this.Plugin.SigScanner.ScanText(Signatures.TryOn));
|
||||
this._examineNamePtr = this.Plugin.SigScanner.GetStaticAddressFromSig(Signatures.ExamineNamePointer);
|
||||
SignatureHelper.Initialise(this);
|
||||
|
||||
this.Plugin.ChatGui.ChatMessage += this.OnChat;
|
||||
this.Plugin.ClientState.Login += OnLogin;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<Version>1.9.3</Version>
|
||||
<Version>1.9.4</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Nullable>enable</Nullable>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
|
@ -53,7 +53,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DalamudLinter" Version="1.0.3"/>
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.5"/>
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.6"/>
|
||||
<PackageReference Include="Fody" Version="6.6.0" PrivateAssets="all"/>
|
||||
<PackageReference Include="Resourcer.Fody" Version="1.8.0" PrivateAssets="all"/>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -287,7 +287,7 @@ namespace Glamaholic.Ui {
|
|||
}
|
||||
|
||||
ImGui.SetNextItemWidth(-1);
|
||||
if (ImGui.InputText("##plate-filter", ref this._plateFilter, 512, ImGuiInputTextFlags.AutoSelectAll)) {
|
||||
if (ImGui.InputTextWithHint("##plate-filter", "Search...", ref this._plateFilter, 512, ImGuiInputTextFlags.AutoSelectAll)) {
|
||||
this.PlateFilter = this._plateFilter.Length == 0
|
||||
? null
|
||||
: new FilterInfo(this.Ui.Plugin.DataManager, this._plateFilter);
|
||||
|
@ -448,7 +448,7 @@ namespace Glamaholic.Ui {
|
|||
}
|
||||
|
||||
ImGui.SetNextItemWidth(-1);
|
||||
if (ImGui.InputText("##item-filter", ref this._itemFilter, 512, ImGuiInputTextFlags.AutoSelectAll)) {
|
||||
if (ImGui.InputTextWithHint("##item-filter", "Search...", ref this._itemFilter, 512, ImGuiInputTextFlags.AutoSelectAll)) {
|
||||
this.FilterItems(slot);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue