コード例 #1
0
        public static SummaryDatabase GenerateSummaryDatabase(Old_RaidCollection _RaidCollection, Func <string, Old_FightDataCollection> _CachedGetFightDataCollectionFunc, Func <WowRealm, VF_RaidDamageDatabase.RealmDB> _GetRealmDB)
        {
            SummaryDatabase newDatabase = new SummaryDatabase();

            newDatabase.UpdateDatabase(_RaidCollection, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            return(newDatabase);
        }
コード例 #2
0
 public VF_RaidDamageDatabase.RaidCollection GetRaidCollection()
 {
     return(DynamicReloader.GetData <VF_RaidDamageDatabase.RaidCollection>(() =>
     {
         VF_RaidDamageDatabase.RaidCollection raidCollection = null;
         VF.Utility.LoadSerialize <VF_RaidDamageDatabase.RaidCollection>(g_RDDBDir + "RaidCollection.dat", out raidCollection);
         return raidCollection;
     }, (_RaidCollection, _LastLoadTime) => { return (DateTime.UtcNow - _LastLoadTime).TotalMinutes > 5; }));
 }
コード例 #3
0
        public static void FixBuggedSummaryDatabase_New(string _SummaryDatabaseFile, Old_RaidCollection _FullRaidCollection, List <Old_RaidCollection_Raid> _BuggedRaids, Func <string, Old_FightDataCollection> _CachedGetFightDataCollectionFunc, Func <WowRealm, VF_RaidDamageDatabase.RealmDB> _GetRealmDB)
        {
            SummaryDatabase database = null;

            if (System.IO.File.Exists(_SummaryDatabaseFile) == true)
            {
                if (VF.Utility.LoadSerialize(_SummaryDatabaseFile, out database, 10000, true) == false)
                {
                    database = null;
                }
            }
            if (database == null)
            {
                database = GenerateSummaryDatabase(_FullRaidCollection, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            }
            else
            {
                database.UpdateDatabaseReplace(_BuggedRaids, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            }
            VF.Utility.SaveSerialize(_SummaryDatabaseFile, database);
        }
コード例 #4
0
        public static SummaryDatabase UpdateSummaryDatabase(string _RootDirectory, Old_RaidCollection _FullRaidCollection, List <Old_RaidCollection_Raid> _RecentChangedRaids, Func <string, Old_FightDataCollection> _CachedGetFightDataCollectionFunc, Func <WowRealm, VF_RaidDamageDatabase.RealmDB> _GetRealmDB)
        {
            SummaryDatabase database     = null;
            string          databaseFile = _RootDirectory + "\\SummaryDatabase\\FullSummaryDatabase.dat";

            if (System.IO.File.Exists(databaseFile) == true)
            {
                if (VF.Utility.LoadSerialize(databaseFile, out database) == false)
                {
                    database = null;
                }
            }
            if (database == null)
            {
                database = GenerateSummaryDatabase(_FullRaidCollection, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            }
            else
            {
                database.UpdateDatabase(_RecentChangedRaids, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            }
            VF.Utility.SaveSerialize(databaseFile, database);
            return(database);
        }
コード例 #5
0
 public void UpdateDatabase(Old_RaidCollection _RaidCollection, Func <string, Old_FightDataCollection> _CachedGetFightDataCollectionFunc, Func <WowRealm, VF_RaidDamageDatabase.RealmDB> _GetRealmDB)
 {
     UpdateDatabase(_RaidCollection.m_Raids.Values.ToList(), _CachedGetFightDataCollectionFunc, _GetRealmDB);
 }