BF2Statistics.MedalData.Award.Award C# (CSharp) Method

Award() public method

Class Constructor. Constructs a new award
public Award ( string AwardId, string StrId, string Type, Condition Condition ) : System
AwardId string The award id as a string
StrId string The short name of the award
Type string The award earn type. 0 = Purple heart, 1 = Earned only once per player, 2 = Earnable multiple times
Condition Condition The condition to earn this award
return System
        public Award(string AwardId, string StrId, string Type, Condition Condition)
        {
            // Throw an exception if the award is non-existant
            if (!Exists(AwardId))
                throw new Exception("Award Doesnt Exist: " + AwardId);

            // Set award vars
            this.Id = AwardId;
            this.StrId = StrId;
            this.Name = GetName(AwardId);
            this.Type = Int32.Parse(Type);
            this.Conditions = Condition;
            this.OrigConditions = (Condition)Condition.Clone();
        }