/// <summary> /// Returns a item WoWItem from PList /// </summary> /// <param name="PList"></param> /// <returns></returns> public static WoWItem GetPoison(ePoison Poison) { switch (Poison) { case ePoison.Instant: return StyxWoW.Me.CarriedItems.Where(i => InstantID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault(); case ePoison.Crippling: return StyxWoW.Me.CarriedItems.Where(i => CripplingID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault(); case ePoison.MindNumbing: return StyxWoW.Me.CarriedItems.Where(i => MindNumbingID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault(); case ePoison.Deadly: return StyxWoW.Me.CarriedItems.Where(i => DeadlyID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault(); case ePoison.Wound: return StyxWoW.Me.CarriedItems.Where(i => WoundID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault(); } return null; }
/// <summary> /// Returns a item WoWItem from PList /// </summary> /// <param name="PList"></param> /// <returns></returns> public static WoWItem GetPoison(ePoison Poison) { switch (Poison) { case ePoison.Instant: return(StyxWoW.Me.CarriedItems.Where(i => InstantID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault()); case ePoison.Crippling: return(StyxWoW.Me.CarriedItems.Where(i => CripplingID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault()); case ePoison.MindNumbing: return(StyxWoW.Me.CarriedItems.Where(i => MindNumbingID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault()); case ePoison.Deadly: return(StyxWoW.Me.CarriedItems.Where(i => DeadlyID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault()); case ePoison.Wound: return(StyxWoW.Me.CarriedItems.Where(i => WoundID.Contains(i.Entry)).OrderByDescending(i => i.Entry).FirstOrDefault()); } return(null); }