Beispiel #1
0
 public bool ContainsCondition(TrophyConditionTypes c)
 {
     if (this.Objectives == null)
     {
         return(false);
     }
     for (int index = 0; index < this.Objectives.Length; ++index)
     {
         if (this.Objectives[index].type == c)
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #2
0
 public bool Deserialize(JSON_TrophyObjective json)
 {
     if (json == null)
     {
         return(false);
     }
     if (string.IsNullOrEmpty(json.type))
     {
         return(false);
     }
     try
     {
         this.type = (TrophyConditionTypes)Enum.Parse(typeof(TrophyConditionTypes), json.type, true);
     }
     catch (Exception ex)
     {
         return(false);
     }
     this.sval = json.sval;
     this.ival = json.ival;
     return(true);
 }
        public static bool IsExtraClear(this TrophyConditionTypes type)
        {
            switch (type)
            {
            case TrophyConditionTypes.exclear_fire:
            case TrophyConditionTypes.exclear_water:
            case TrophyConditionTypes.exclear_wind:
            case TrophyConditionTypes.exclear_thunder:
            case TrophyConditionTypes.exclear_light:
            case TrophyConditionTypes.exclear_dark:
            case TrophyConditionTypes.exclear_fire_nocon:
            case TrophyConditionTypes.exclear_water_nocon:
            case TrophyConditionTypes.exclear_wind_nocon:
            case TrophyConditionTypes.exclear_thunder_nocon:
            case TrophyConditionTypes.exclear_light_nocon:
            case TrophyConditionTypes.exclear_dark_nocon:
                return(true);

            default:
                return(false);
            }
        }