Ejemplo n.º 1
0
        private bool HadNeededItems(Mobile owner, PaintingType paintingType)
        {
            Container pack        = owner.Backpack;
            int       canvasCount = pack.GetAmount(new Canvas().GetType(), true);
            int       bucketCount = pack.GetAmount(new PaintBucket().GetType(), true);

            PaintingConsumer paintingConsumer = PaintConsumers.FirstOrDefault(x => x.PaintType == paintingType);

            if (canvasCount >= paintingConsumer.CanvasCount && bucketCount >= paintingConsumer.PaintBrushCount)
            {
                return(true);
            }

            owner.SendMessage("You do not have enough resources.");
            return(false);
        }
Ejemplo n.º 2
0
 public PaintingConsumer(PaintingType type, int canvasCount, int paintBrushCount)
 {
     CanvasCount     = canvasCount;
     PaintBrushCount = paintBrushCount;
     PaintType       = type;
 }