예제 #1
0
        public static void LoadLootTemplates_Fishing()
        {
            Log.outInfo(LogFilter.ServerLoading, "Loading fishing loot templates...");

            uint oldMSTime = Time.GetMSTime();

            List <uint> lootIdSet;
            uint        count = Fishing.LoadAndCollectLootIds(out lootIdSet);

            // remove real entries and check existence loot
            foreach (var areaEntry in CliDB.AreaTableStorage.Values)
            {
                if (lootIdSet.Contains(areaEntry.Id))
                {
                    lootIdSet.Remove(areaEntry.Id);
                }
            }

            // output error for any still listed (not referenced from appropriate table) ids
            Fishing.ReportUnusedIds(lootIdSet);

            if (count != 0)
            {
                Log.outInfo(LogFilter.ServerLoading, "Loaded {0} fishing loot templates in {1} ms", count, Time.GetMSTimeDiffToNow(oldMSTime));
            }
            else
            {
                Log.outInfo(LogFilter.ServerLoading, "Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty");
            }
        }