Пример #1
0
 public Trophy(int trophyId, int grade = 1, int counter = 0, List <long> timestamps = null, bool isDone = false)
 {
     Id         = trophyId;
     NextGrade  = grade;
     Counter    = counter;
     Timestamps = timestamps ?? new List <long>();
     MaxGrade   = TrophyMetadataStorage.GetNumGrades(Id);
     Condition  = TrophyMetadataStorage.GetGrade(Id, NextGrade).Condition;
     IsDone     = isDone;
 }
Пример #2
0
 public Trophy(Player player, int trophyId, int grade = 1, int counter = 0, List <long> timestamps = null, bool isDone = false)
 {
     Id         = trophyId;
     NextGrade  = grade;
     Counter    = counter;
     Timestamps = timestamps ?? new List <long>();
     MaxGrade   = TrophyMetadataStorage.GetNumGrades(Id);
     Condition  = TrophyMetadataStorage.GetGrade(Id, NextGrade).Condition;
     Type       = TrophyMetadataStorage.GetMetadata(Id).Categories[0];
     IsDone     = isDone;
     Player     = player;
     Uid        = DatabaseManager.AddTrophy(this);
 }