Ejemplo n.º 1
0
 public bool IsValid(PlayerStats playerStats)
 {
     if (this._conditions.Count > 0)
     {
         foreach (PlayerStatCondition playerStatCondition in this._conditions)
         {
             bool flag = playerStatCondition.IsValid(playerStats);
             PlayerStatConditionList.ValidationTypes validationType = this._validationType;
             if (validationType != PlayerStatConditionList.ValidationTypes.AnyTrue)
             {
                 if (validationType == PlayerStatConditionList.ValidationTypes.AllTrue)
                 {
                     if (!flag)
                     {
                         return(false);
                     }
                 }
             }
             else if (flag)
             {
                 return(true);
             }
         }
         return(this._validationType == PlayerStatConditionList.ValidationTypes.AllTrue);
     }
     return(true);
 }
Ejemplo n.º 2
0
 public bool IsValid(PlayerStats playerStats)
 {
     if (this._conditions.Count > 0)
     {
         foreach (PlayerStatCondition current in this._conditions)
         {
             bool flag = current.IsValid(playerStats);
             PlayerStatConditionList.ValidationTypes validationType = this._validationType;
             if (validationType != PlayerStatConditionList.ValidationTypes.AnyTrue)
             {
                 if (validationType == PlayerStatConditionList.ValidationTypes.AllTrue)
                 {
                     if (!flag)
                     {
                         bool result = false;
                         return(result);
                     }
                 }
             }
             else if (flag)
             {
                 bool result = true;
                 return(result);
             }
         }
         return(this._validationType == PlayerStatConditionList.ValidationTypes.AllTrue);
     }
     return(true);
 }