private static async Task <bool> SplitItem(C_WoWItem item, int Count, int BagIndex, int BagSlot) { if (!LuaCommands.CursorHasItem()) { //Split Item.. bool pickup = await CommonCoroutines.WaitForLuaEvent("CURSOR_UPDATE", 2500, null, () => LuaCommands.SplitContainerItem(item.BagIndex + 1, item.BagSlot + 1, Count)); await CommonCoroutines.SleepForRandomUiInteractionTime(); if (pickup) { //Select Empty Bag Slot await CommonCoroutines.WaitForLuaEvent( "CURSOR_UPDATE", 2500, null, () => LuaCommands.PickupContainerItem(BagIndex, BagSlot + 1)); await CommonCoroutines.SleepForRandomUiInteractionTime(); return(true); } } return(false); }