public static AddDefaultAwardCondition ( string Id, Condition C ) : void | ||
Id | string | The Award ID found in the Medal Data file |
C | Condition | The parsed condition to earn the award |
return | void |
/// <summary> /// Loads the default medal data into the Award Cache /// </summary> static MedalDataParser() { // Fill the award cache with the original award conditions MatchCollection MedalsMatches, RankMatches; ParseMedalData(Program.GetResourceAsString("BF2Statistics.MedalData.PyFiles.medal_data_xpack.py"), out MedalsMatches, out RankMatches); // Convert each medal match into an object, and add it to the award cache foreach (Match ArrayMatch in MedalsMatches) { AwardCache.AddDefaultAwardCondition( ArrayMatch.Groups["MedalIntId"].Value, ParseCondition(ArrayMatch.Groups["Conditions"].Value) ); } // Convert ranks into objects, and also add them to the award cache foreach (Match ArrayMatch in RankMatches) { AwardCache.AddDefaultAwardCondition( ArrayMatch.Groups["RankId"].Value, ParseCondition(ArrayMatch.Groups["Conditions"].Value) ); } }