Example #1
0
        private bool IsModZeroeGatesOk(int parametervalue, QuestValuesList modZeroesGate)
        {
            if (modZeroesGate.Count == 0)
            {
                return(true);
            }

            if (!modZeroesGate.Negation)
            {
                for (var i = 0; i < modZeroesGate.Count; ++i)
                {
                    if ((parametervalue % modZeroesGate.Values[i]) == 0)
                    {
                        return(false);
                    }
                }

                return(true);
            }

            for (var i = 0; i < modZeroesGate.Count; ++i)
            {
                if ((parametervalue % modZeroesGate.Values[i]) == 0)
                {
                    return(true);
                }
            }

            return(false);
        }
Example #2
0
        private bool IsValueGatesOk(int parametervalue, QuestValuesList valuesGate)
        {
            if (valuesGate.Count == 0)
            {
                return(true);
            }

            if (!valuesGate.Negation)
            {
                for (var i = 0; i < valuesGate.Count; ++i)
                {
                    if (valuesGate.Values[i] == parametervalue)
                    {
                        return(false);
                    }
                }

                return(true);
            }

            for (var i = 0; i < valuesGate.Count; ++i)
            {
                if (valuesGate.Values[i] == parametervalue)
                {
                    return(true);
                }
            }

            return(false);
        }
Example #3
0
 public void CopyDataFrom(QuestValuesList altStartValues)
 {
     count = altStartValues.Count;
     low   = new long[count];
     hi    = new long[count];
     for (var i = 0; i < count; ++i)
     {
         hi[i] = low[i] = altStartValues.Values[i];
     }
 }
Example #4
0
        public void Clear()
        {
            bitmask                = 0;
            min                    = 0;
            max                    = 1;
            delta                  = 0;
            ParameterViewAction    = StayAsIs;
            CriticalMessage        = ""; //;'Сообщение достижения критического значения параметром ';
            CriticalMessageVisible = false;
            DeltaPercentFlag       = false;
            DeltaApprFlag          = false;
            DeltaExprFlag          = false;

            ValuesGate    = new QuestValuesList();
            ModZeroesGate = new QuestValuesList();

            ValuesGate.Clear();
            ModZeroesGate.Clear();

            Expression = "";
        }