Exemple #1
0
        //Remove things from the inventory (when sold or potion consumed)
        public string RemoveFromInventory(IInventoryable item)
        {
            Item   it;
            Weapon we;
            Potion po;


            switch (item.TheOriginalType())
            {
            case "Weapon":
                we = (Weapon)item;
                RemoveThisItem(item);
                break;

            case "Item":
                it = (Item)item;
                RemoveThisItem(item);
                break;

            case "Potion":
                po = (Potion)item;
                RemoveThisItem(item);
                break;

            default:
                break;
            }
            return("");
        }