public override void Parse(AchievementObjectiveRecord objective) { base.m_defaultObjective = objective; var criterions = objective.Criterion.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); foreach (var item in criterions) { var match = Regex.Match(item, "(?<name>[a-zA-Z]{2})(?<operator>[<=>]{1})(?<content>.*)"); if (match.Success) { this.m_criterions.Add(this.Parse( AbstractCriterion.GetOperator(match.Groups["operator"].Value[0]), match.Groups["content"].Value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))); } else { throw new Exception(); } } }
// CONSTRUCTORS public AchievementPointsCriterion(AchievementObjectiveRecord objective) : base(objective) { }
// CONSTRUCTORS public KillMonsterWithChallengeCriterion(AchievementObjectiveRecord objective) : base(objective) { this.m_monster = Singleton <MonsterManager> .Instance.GetTemplate(this.MonsterId); }
// CONSTRUCTORS public ChallengesCriterion(AchievementObjectiveRecord objective) : base(objective) { }
// CONSTRUCTORS public LevelCriterion(AchievementObjectiveRecord objective) : base(objective) { }
// CONSTRUCTORS public AbstractCriterion(AchievementObjectiveRecord objective) { this.m_criterions = new List <Data>(); this.Parse(objective); }