Created
July 7, 2022 10:57
-
-
Save Schroedi/5260ff666d37df6e5d900bf6b8ab815d to your computer and use it in GitHub Desktop.
Fast move an item from the inventory holding shift to ignore tab affinity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static FastMoveResult FastMoveFromInvNoAffinity(int itemLocalId) | |
{ | |
if (!LokiPoe.ProcessHookManager.IsEnabled) | |
{ | |
return FastMoveResult.ProcessHookManagerNotEnabled; | |
} | |
LokiPoe.ProcessHookManager.ClearAllKeyStates(); | |
var inventorySlotUiElement = LokiPoe.InGameState.InventoryUi.InventoryControl_Main.InventorySlotUiElement; | |
var slot = inventorySlotUiElement.PlacementGraph.FirstOrDefault(s => s.Value.LocalId == itemLocalId); | |
var clickPos = inventorySlotUiElement.SlotClickLocation(slot.Key); | |
MouseManager.SetMousePosition(clickPos); | |
LokiPoe.ProcessHookManager.SetKeyState(Keys.ControlKey, short.MinValue); | |
LokiPoe.ProcessHookManager.SetKeyState(Keys.ShiftKey, short.MinValue); | |
Thread.Sleep(20); | |
MouseManager.ClickLMB(0, 0); | |
Thread.Sleep(5); | |
LokiPoe.ProcessHookManager.SetKeyState(Keys.ControlKey, 0); | |
LokiPoe.ProcessHookManager.SetKeyState(Keys.ShiftKey, 0); | |
return FastMoveResult.None; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment