Example #1
0
        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);
        }
Example #2
0
        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);
        }