private static IEnumerable<WoWItem> FindDisenchantable(WoWItemQuality wowItemQuality) { var disenchantableItems = from item in StyxWoW.Me.BagItems where item.IsValid && !item.IsOpenable && (item.Quality == wowItemQuality) && (!item.ItemInfo.IsWeapon || ItemSettings.Instance.DisenchantWeapon) && BlacklistDoesNotContain(item) select item; return disenchantableItems; }
public List <C_WoWItem> GetBagItemsByQuality(WoWItemQuality quality) { return(BagItems.Values.Where(i => i.Quality == quality).ToList()); }
public List <C_WoWItem> GetBagItemsBOEByQuality(WoWItemQuality quality) { List <C_WoWItem> retList = new List <C_WoWItem>(GetBagItemsBOE()); return(retList.Where(i => i.Quality == quality).ToList()); }
public static void DoDestroyJunk() { if (LastUpdate + 2000 < (uint)Environment.TickCount) { LastUpdate = (uint)Environment.TickCount; } else { return; } WoWSpell mount = null; uint FNBS = Me.FreeNormalBagSlots; // Logging.Write("SpellManager.HasSpell(61425):" + SpellManager.HasSpell(61425)); if (Mount.CanMount() && ((uint)Environment.TickCount - LastSellTry > 30000) && (FNBS <= 2)) { if (Me.Mounted) // optional { Mount.Dismount(); Thread.Sleep(4400); // Gnimo does not disappear instantly } // if () // Sell to mamoth { mount = WoWSpell.FromId(61425); mount.Cast(); Thread.Sleep(500); if (Me.IsCasting) { Thread.Sleep(2500); ObjectManager.Update(); } } LastSellTry = (uint)Environment.TickCount; if (Me.Mounted) { // todo: debug sell procedure IsDone = false; SellDone = false; while (!SellDone && ((uint)Environment.TickCount - LastSellTry < 8000)) { Logging.Write("attempting trade..." + (uint)Environment.TickCount); SellDone = InteractAndSell(32639, SellItemActionType.Whites, 0, 0); // SellItemActionType.Whites Thread.Sleep(1000); } } } else { List <WoWItem> targetItems = ObjectManager.Me.BagItems; uint TotalCount = 0; for (int a = targetItems.Count - 1; a >= 0; a--) { if (targetItems[a] != null && targetItems[a].IsValid) { ItemInfo info = ItemInfo.FromId(targetItems[a].Entry); WoWItemQuality quality = targetItems[a].Quality; if (!ProtectedItems.Contains(targetItems[a].Entry) && (quality == WoWItemQuality.Uncommon && (info.Level < 290) || quality == WoWItemQuality.Common || quality == WoWItemQuality.Poor)) { WoWMovement.MoveStop(); Logging.Write("[Allrounder] Destroying " + targetItems[a].Entry + " \"" + targetItems[a].Name + "\"..."); Lua.DoString("UseItemByName(\"" + targetItems[a].Name + "\")"); // Lua.DoString("UseContainerItem({0}, {1})", targetItems[a].BagIndex + 1, targetItems[a].BagSlot + 1); Lua.DoString("PickupContainerItem({0}, {1})", targetItems[a].BagIndex + 1, targetItems[a].BagSlot + 1); Thread.Sleep(900); Lua.DoString("DeleteCursorItem();"); } } } } }