public static void BuildAwardCache(MatchCollection MedalsMatches, MatchCollection RanksMatches)
{
// Clear out the award cache!
AwardCache.Clear();
// Convert each medal match into an object, and add it to the award cache
foreach (Match ArrayMatch in MedalsMatches)
{
AwardCache.AddAward(
new Award(
ArrayMatch.Groups["MedalIntId"].Value,
ArrayMatch.Groups["MedalStrId"].Value,
ArrayMatch.Groups["RewardType"].Value,
ParseCondition(ArrayMatch.Groups["Conditions"].Value)
)
);
}
// Convert ranks into objects, and also add them to the award cache
foreach (Match ArrayMatch in RanksMatches)
{
AwardCache.AddRank(
new Rank(
Int32.Parse(ArrayMatch.Groups["RankId"].Value),
ParseCondition(ArrayMatch.Groups["Conditions"].Value)
)
);
}
}