public static InvItem GetPlayersInvItem(int Id, int Key) { InvItem Curr = null; foreach (InvItem I in GameLevel.GetPlayer(Id).Inventory) { if (I.ActivationKey == Key) { Curr = I; } } return(Curr); }
public static InvItem FindInvItem(List <InvItem> Inventory, string Name) { InvItem FoundItem = new InvItem(); foreach (InvItem I in Inventory) { if (I.ToString().Equals(Name)) { FoundItem = I; break; } } return(FoundItem); }