Example #1
0
        public void DeleteIteamFromInventory(long personId, long itemId)
        {
            Person    person = crudPerson.Read(personId);
            Item      item   = crudIteam.Read(itemId);
            Inventory inv    = crudInventory.Read(personId, itemId);

            inv = GetObject(inv.id);
            if (inv.count <= 1)
            {
                crudInventory.Delet(inv);
            }
            else
            {
                inv.count -= 1;
                crudInventory.Update(inv);
            }
        }
Example #2
0
 internal Item GetObject(long v)
 {
     return(cRUDItem.Read(v));
 }