Beispiel #1
0
		public ChallengeRecordEntry(ChallengeDataHolder.GradeType enGradeType, ChallengeDataHolder.Grade enGradeValue, string sValue)
		{
			this.enGradeType = enGradeType;
			this.enGradeValue = enGradeValue;
			this.sValue = sValue;
		}
Beispiel #2
0
		public ChallengeRecordEntry(ChallengeDataHolder.GradeType enGradeType, ChallengeDataHolder.Grade enGradeValue, int iValue)
		{
			this.enGradeType = enGradeType;
			this.enGradeValue = enGradeValue;
			this.iValue = iValue;
		}
Beispiel #3
0
		public ChallengeRecordEntry(ChallengeDataHolder.GradeType enGradeType, ChallengeDataHolder.Grade enGradeValue, float fValue)
		{
			this.enGradeType = enGradeType;
			this.enGradeValue = enGradeValue;
			this.fValue = fValue;
		}
Beispiel #4
0
 public void CompareResults()
 {
     this.bActive = false;
     this.lxChallengeRecords.Clear();
     this.lbBrokeRecord.Clear();
     PlayerView xLocalPlayer = Program.GetTheGame().xLocalPlayer;
     if (this.enChallengeType == ChallengeDataHolder.ChallangeType.Challenge01_SuperTrials)
     {
         ChallengeDataHolder.Grade enTimeGrade = ChallengeDataHolder.Grade.C;
         if (this.iTime < 10800)
         {
             enTimeGrade = ChallengeDataHolder.Grade.S;
         }
         else if (this.iTime < 18000)
         {
             enTimeGrade = ChallengeDataHolder.Grade.A;
         }
         else if (this.iTime < 25200)
         {
             enTimeGrade = ChallengeDataHolder.Grade.B;
         }
         ChallengeDataHolder.Grade enDamageGrade = ChallengeDataHolder.Grade.C;
         if (this.iDamageReceived <= 0)
         {
             enDamageGrade = ChallengeDataHolder.Grade.S;
         }
         else if (this.iDamageReceived <= 200)
         {
             enDamageGrade = ChallengeDataHolder.Grade.A;
         }
         else if (this.iDamageReceived <= 500)
         {
             enDamageGrade = ChallengeDataHolder.Grade.B;
         }
         this.lxChallengeRecords.Add(new ChallengeRecordEntry(ChallengeDataHolder.GradeType.Time_LowerIsBetter, enTimeGrade, this.iTime));
         this.lxChallengeRecords.Add(new ChallengeRecordEntry(ChallengeDataHolder.GradeType.DamageTaken, enDamageGrade, this.iDamageReceived));
         if (!xLocalPlayer.xJournalInfo.denxChallengeRecords.ContainsKey(this.enChallengeType) || xLocalPlayer.xJournalInfo.denxChallengeRecords[this.enChallengeType].lxSubGrades[0].iValue > this.iTime)
         {
             this.lbBrokeRecord.Add(true);
         }
         else
         {
             this.lbBrokeRecord.Add(false);
         }
         if (!xLocalPlayer.xJournalInfo.denxChallengeRecords.ContainsKey(this.enChallengeType) || xLocalPlayer.xJournalInfo.denxChallengeRecords[this.enChallengeType].lxSubGrades[1].iValue > this.iDamageReceived)
         {
             this.lbBrokeRecord.Add(true);
         }
         else
         {
             this.lbBrokeRecord.Add(false);
         }
     }
     else if (this.enChallengeType == ChallengeDataHolder.ChallangeType.Challenge03_KingSlime)
     {
         ChallengeDataHolder.Grade enTimeGrade2 = ChallengeDataHolder.Grade.C;
         if (this.iTime < 5400)
         {
             enTimeGrade2 = ChallengeDataHolder.Grade.S;
         }
         else if (this.iTime < 9000)
         {
             enTimeGrade2 = ChallengeDataHolder.Grade.A;
         }
         else if (this.iTime < 12600)
         {
             enTimeGrade2 = ChallengeDataHolder.Grade.B;
         }
         ChallengeDataHolder.Grade enDamageGrade2 = ChallengeDataHolder.Grade.C;
         if (this.iDamageReceived <= 0)
         {
             enDamageGrade2 = ChallengeDataHolder.Grade.S;
         }
         else if (this.iDamageReceived <= 150)
         {
             enDamageGrade2 = ChallengeDataHolder.Grade.A;
         }
         else if (this.iDamageReceived <= 350)
         {
             enDamageGrade2 = ChallengeDataHolder.Grade.B;
         }
         this.lxChallengeRecords.Add(new ChallengeRecordEntry(ChallengeDataHolder.GradeType.Time_LowerIsBetter, enTimeGrade2, this.iTime));
         this.lxChallengeRecords.Add(new ChallengeRecordEntry(ChallengeDataHolder.GradeType.DamageTaken, enDamageGrade2, this.iDamageReceived));
         if (!xLocalPlayer.xJournalInfo.denxChallengeRecords.ContainsKey(this.enChallengeType) || xLocalPlayer.xJournalInfo.denxChallengeRecords[this.enChallengeType].lxSubGrades[0].iValue > this.iTime)
         {
             this.lbBrokeRecord.Add(true);
         }
         else
         {
             this.lbBrokeRecord.Add(false);
         }
         if (!xLocalPlayer.xJournalInfo.denxChallengeRecords.ContainsKey(this.enChallengeType) || xLocalPlayer.xJournalInfo.denxChallengeRecords[this.enChallengeType].lxSubGrades[1].iValue > this.iDamageReceived)
         {
             this.lbBrokeRecord.Add(true);
         }
         else
         {
             this.lbBrokeRecord.Add(false);
         }
     }
     int iTempGrade = 0;
     foreach (ChallengeRecordEntry grade in this.lxChallengeRecords)
     {
         iTempGrade = (int)((byte)iTempGrade + grade.enGradeValue);
     }
     iTempGrade /= this.lxChallengeRecords.Count;
     this.enTotalGrade = (ChallengeDataHolder.Grade)iTempGrade;
     if (!xLocalPlayer.xJournalInfo.denxChallengeRecords.ContainsKey(this.enChallengeType) || xLocalPlayer.xJournalInfo.denxChallengeRecords[this.enChallengeType].enTotalGrade < this.enTotalGrade)
     {
         this.bBrokeTotalRecord = true;
     }
     if (xLocalPlayer.xJournalInfo.denxChallengeRecords.ContainsKey(this.enChallengeType))
     {
         this.enPreviousBest = xLocalPlayer.xJournalInfo.denxChallengeRecords[this.enChallengeType].enTotalGrade;
     }
     this.xChallangeRecord = new ChallengeRecord(this.enTotalGrade, this.lxChallengeRecords.ToArray());
     this.bVictoryToAward = true;
 }