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); }
//-1 Base Backpack Bag //0 - 3 Extra Backpack Bags public void UpdateBagItems() { BagItems.Clear(); using (StyxWoW.Memory.AcquireFrame()) { foreach (var item in StyxWoW.Me.BagItems) { var newItem = new C_WoWItem(item); BagItems.Add(item.Guid, newItem); } } ShouldUpdateBagItems = false; }
public static int DisenchantRequiredEnchantingSkill(C_WoWItem item) { var ilevel = item.Level; if (ilevel < 61) { if (ilevel < 21) { return(1); } if (ilevel < 26) { return(25); } if (ilevel < 31) { return(50); } if (ilevel < 36) { return(75); } if (ilevel < 41) { return(100); } if (ilevel < 46) { return(125); } if (ilevel < 51) { return(150); } if (ilevel < 56) { return(175); } return(200); } var quality = item.Quality; if (quality == WoWItemQuality.Uncommon) { if (ilevel < 100) { return(225); } if (ilevel < 121) { return(275); } if (ilevel < 151) { return(325); } if (ilevel < 183) { return(350); } if (ilevel < 334) { return(425); } if (ilevel < 438) { return(475); } } else if (quality == WoWItemQuality.Rare) { if (ilevel < 100) { return(225); } if (ilevel < 121) { return(275); } if (ilevel < 201) { return(325); } if (ilevel < 378) { return(450); } if (ilevel < 477) { return(550); } } else if (quality == WoWItemQuality.Epic) { if (ilevel < 90) { return(225); } if (ilevel < 152) { return(300); } if (ilevel < 278) { return(375); } if (ilevel < 417) { return(475); } if (ilevel < 529) { return(575); } } return(1); }