Example #1
0
        /// <summary>
        /// Отметить вязку самки
        /// </summary>
        /// <param name="maleId">ID самца</param>
        /// <param name="when">Дата вязки</param>
        /// <param name="syntetic">Искусственное осеменение</param>
        public void FuckIt(int maleId, int daysPast, bool syntetic)
        {
            if (Sex != Rabbit.SexType.FEMALE)
            {
                throw new ExNotFemale(this);
            }
            if (Age < _eng.brideAge())
            {
                throw new ExNotFucker(this);
            }
            if (EventDate != DateTime.MinValue)
            {
                throw new ExAlreadyFucked(this);
            }
            if (_nameID == 0)
            {
                throw new ExNoName();
            }
            if (Group > 1)
            {
                throw new ExNotOne("случить");
            }
            RabNetEngRabbit f = _eng.getRabbit(maleId);

            if (f.Sex != Rabbit.SexType.MALE)
            {
                throw new ExNotMale(f);
            }
            if (f.Status < 1)
            {
                throw new ExNotFucker(f);
            }
            //if (daysPast <0)
            //throw new ExBadDate(daysPast.ToString());
            _eng.logs().log(LogType.F**K, ID, maleId, AddressSmall, f.AddressSmall,
                            (syntetic ? "ИО" : "стд.") + (daysPast != 0 ? String.Format(" {0:d} дней назад", daysPast) : ""));
            _eng.db().MakeFuck(this._id, f.ID, daysPast, _eng.UserID, syntetic);
        }
Example #2
0
 /// <summary>
 /// Добавляет к работам Случки или Вязки
 /// </summary>
 /// <param name="jh">Список работ</param>
 /// <param name="type">0- Случка, 1-Вязка</param>
 private void getFucks(JobHolder jh, int type)
 {
     f[Filters.MAKE_BRIDE] = eng.brideAge().ToString();
     f[Filters.TYPE]       = type.ToString();
     jh.AddRange(eng.db2().GetZooTechJobs(f, JobType.F**k));//ztGetZooFuck(f));
 }