static DataMgr() { _loaded = true; _loaded &= ServerDB.SelectAllMaps(out _maps); _loaded &= ServerDB.SelectAllNPCs(out _npcs); _loaded &= ServerDB.SelectAllItems(out _items); _loaded &= ServerDB.SelectAllLoots(out _loots); _loaded &= ServerDB.SelectAllSpells(out _spells); _loaded &= ServerDB.SelectAllDialogs(out _dialogs); _loaded &= ServerDB.SelectAllMessages(out _messages); _loaded &= ServerDB.SelectAllResources(out _resources); _loaded &= ServerDB.SelectAllCreatures(out _creatures); _loaded &= ServerDB.SelectAllMovements(out _movements); }
public static void LoadAll() { if (!ServerDB.SelectAllMaps(out m_maps)) { throw new Exception($"Failed to load: {nameof(m_maps)}"); } if (!ServerDB.SelectAllNPCs(out m_npcs)) { throw new Exception($"Failed to load: {nameof(m_npcs)}"); } if (!ServerDB.SelectAllItems(out m_items)) { throw new Exception($"Failed to load: {nameof(m_items)}"); } if (!ServerDB.SelectAllLoots(out m_loots)) { throw new Exception($"Failed to load: {nameof(m_loots)}"); } if (!ServerDB.SelectAllSpells(out m_spells)) { throw new Exception($"Failed to load: {nameof(m_spells)}"); } if (!ServerDB.SelectAllDialogs(out m_dialogs)) { throw new Exception($"Failed to load: {nameof(m_dialogs)}"); } if (!ServerDB.SelectAllMessages(out m_messages)) { throw new Exception($"Failed to load: {nameof(m_messages)}"); } if (!ServerDB.SelectAllResources(out m_resources)) { throw new Exception($"Failed to load: {nameof(m_resources)}"); } if (!ServerDB.SelectAllCreatures(out m_creatures)) { throw new Exception($"Failed to load: {nameof(m_creatures)}"); } if (!ServerDB.SelectAllMovements(out m_movements)) { throw new Exception($"Failed to load: {nameof(m_movements)}"); } }