Exemplo n.º 1
0
        /// <summary>
        /// Adds a crop if there is sufficient time to grow it before the
        /// season ends.
        /// </summary>
        /// <param name="key"></param>
        protected void ManuallyAddCrop(int key)
        {
            CropConversion cropConverter = new CropConversion();

            if (Utilities.IsThereEnoughTimeToGrowSeeds(cropConverter.CropToSeedIndex(key)))
            {
                AddOneCommonObject(key);
            }
        }
        public static bool CheckMerchantForItemAndSeed(int item)
        {
            CropConversion cropConverter = new CropConversion();
            int            seedIndex     = cropConverter.CropToSeedIndex(item);

            if (IsMerchantAvailiableAndHasItem(item) || (IsMerchantAvailiableAndHasItem(seedIndex) && IsThereEnoughTimeToGrowSeeds(seedIndex)))
            {
                return(true);
            }
            return(false);
        }