public static void LoadLootTemplates_Reference() { Log.outInfo(LogFilter.ServerLoading, "Loading reference loot templates..."); uint oldMSTime = Time.GetMSTime(); List<uint> lootIdSet; Reference.LoadAndCollectLootIds(out lootIdSet); // check references and remove used Creature.CheckLootRefs(lootIdSet); Fishing.CheckLootRefs(lootIdSet); Gameobject.CheckLootRefs(lootIdSet); Items.CheckLootRefs(lootIdSet); Milling.CheckLootRefs(lootIdSet); Pickpocketing.CheckLootRefs(lootIdSet); Skinning.CheckLootRefs(lootIdSet); Disenchant.CheckLootRefs(lootIdSet); Prospecting.CheckLootRefs(lootIdSet); Mail.CheckLootRefs(lootIdSet); Reference.CheckLootRefs(lootIdSet); // output error for any still listed ids (not referenced from any loot table) Reference.ReportUnusedIds(lootIdSet); Log.outInfo(LogFilter.ServerLoading, "Loaded refence loot templates in {0} ms", Time.GetMSTimeDiffToNow(oldMSTime)); }
public static void LoadLootTemplates_Disenchant() { Log.outInfo(LogFilter.ServerLoading, "Loading disenchanting loot templates..."); uint oldMSTime = Time.GetMSTime(); List<uint> lootIdSet, lootIdSetUsed = new List<uint>(); uint count = Disenchant.LoadAndCollectLootIds(out lootIdSet); foreach (var disenchant in CliDB.ItemDisenchantLootStorage.Values) { uint lootid = disenchant.Id; if (!lootIdSet.Contains(lootid)) Disenchant.ReportNonExistingId(lootid, disenchant.Id); else lootIdSetUsed.Add(lootid); } foreach (var id in lootIdSetUsed) lootIdSet.Remove(id); // output error for any still listed (not referenced from appropriate table) ids Disenchant.ReportUnusedIds(lootIdSet); if (count != 0) Log.outInfo(LogFilter.ServerLoading, "Loaded {0} disenchanting loot templates in {1} ms", count, Time.GetMSTimeDiffToNow(oldMSTime)); else Log.outError(LogFilter.ServerLoading, "Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty"); }