public void Initialize(AsyncRPGDataContext db_context) { m_mobTypesById = MobQueries.LoadMobTypes(db_context); // Build the name -> type table foreach (MobType mob_type in m_mobTypesById.Values) { m_mobTypesByName.Add(mob_type.Name, mob_type); } }
public bool Initialize(string connectionString, out string result) { bool success = MobQueries.LoadMobTypes(connectionString, out m_mobTypesById, out result); if (success) { // Build the name -> type table foreach (MobType mob_type in m_mobTypesById.Values) { m_mobTypesByName.Add(mob_type.Name, mob_type); } } return(success); }