feat: add search for item
This commit is contained in:
parent
402acfde06
commit
4fafbe7390
@ -65,6 +65,9 @@ internal unsafe class GameFunctions : IDisposable {
|
|||||||
[Signature("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 41 B4 01")]
|
[Signature("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 41 B4 01")]
|
||||||
private readonly delegate* unmanaged<IntPtr, uint, void> _searchForRecipesUsingItem;
|
private readonly delegate* unmanaged<IntPtr, uint, void> _searchForRecipesUsingItem;
|
||||||
|
|
||||||
|
[Signature("E8 ?? ?? ?? ?? EB 45 45 33 C9")]
|
||||||
|
private readonly delegate* unmanaged<void*, uint, byte, void> _searchForItem;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
internal const int HqItemOffset = 1_000_000;
|
internal const int HqItemOffset = 1_000_000;
|
||||||
@ -416,4 +419,13 @@ internal unsafe class GameFunctions : IDisposable {
|
|||||||
var a1 = vf35(uiModule);
|
var a1 = vf35(uiModule);
|
||||||
this._searchForRecipesUsingItem(a1, itemId);
|
this._searchForRecipesUsingItem(a1, itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void SearchForItem(uint itemId) {
|
||||||
|
if (this._searchForItem == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var itemFinder = Framework.Instance()->GetUiModule()->GetItemFinderModule();
|
||||||
|
this._searchForItem(itemFinder, itemId, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,6 +247,10 @@ internal sealed class PayloadHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui.Selectable("Search for Item")) {
|
||||||
|
this.Ui.Plugin.Functions.SearchForItem(realItemId);
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui.Selectable("Link")) {
|
if (ImGui.Selectable("Link")) {
|
||||||
this.Ui.Plugin.Functions.LinkItem(realItemId);
|
this.Ui.Plugin.Functions.LinkItem(realItemId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user