Exemple #1
0
        public void UpdateQuality(ItemProxy item)
        {
            switch (item.Name)
            {
            case "Aged Brie":
                item.IncrementQuality();

                if (item.SellIn <= 0)
                {
                    item.IncrementQuality();
                }
                item.DecreaseSellIn();
                break;

            case "Sulfuras, Hand of Ragnaros":
                break;

            case "Backstage passes to a TAFKAL80ETC concert":
                item.IncrementQuality();

                if (item.SellIn <= 10)
                {
                    item.IncrementQuality();
                }
                if (item.SellIn <= 5)
                {
                    item.IncrementQuality();
                }
                if (item.SellIn <= 0)
                {
                    item.ResetQuality();
                }

                item.DecreaseSellIn();
                break;

            case "Conjured hat":
                item.DecreaseQuality();
                item.DecreaseQuality();

                if (item.SellIn <= 0)
                {
                    item.DecreaseQuality();
                    item.DecreaseQuality();
                }

                item.DecreaseSellIn();
                break;

            default:
                item.DecreaseQuality();

                if (item.SellIn <= 0)
                {
                    item.DecreaseQuality();
                }

                item.DecreaseSellIn();
                break;
            }
        }
Exemple #2
0
 protected virtual void AdjustSellIn(ItemProxy item)
 {
     item.DecreaseSellIn();
 }