コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
        }