BF2Statistics.MedalData.AwardCache.GetDefaultAwardCondition C# (CSharp) Method

GetDefaultAwardCondition() public static method

Returns the original (vanilla) condition list to earn the specified award
public static GetDefaultAwardCondition ( string Id ) : Condition
Id string The award's ID
return Condition
        public static Condition GetDefaultAwardCondition(string Id)
        {
            if (OrigConditions.Count == 0)
                throw new Exception("Original Conditions have not been set yet!");

            return OrigConditions[Id].Clone() as Condition;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Restores the condition of this award to the default (vanilla) state
 /// </summary>
 public void RestoreDefaultConditions()
 {
     Conditions = AwardCache.GetDefaultAwardCondition(this.Id.ToString());
 }