Exemple #1
0
        public static void Load()
        {
            var reader = DatabaseManager.Provider.ExecuteReader("SELECT * FROM mountpark_data");

            while (reader.Read())
            {
                Map map = MapTable.Get(reader.GetInt16("mapid"));
                if (map == null)
                {
                    continue;
                }
                var area = new Models.MountPark(reader.GetInt64("owner"), map, reader.GetInt32("cellid"), reader.GetInt32("size"), reader.GetString("data"), reader.GetInt32("guild"), reader.GetInt32("price"));
                Cache.Add(area);
            }
            reader.Close();

            Logger.Info("Loaded @'" + Cache.Count + "'@ MountPark");
        }
        public static void Load()
        {
            int a      = 0;
            var reader = DatabaseManager.Provider.ExecuteReader("SELECT * FROM mobgroups_fix");

            while (reader.Read())
            {
                var map = MapTable.Get(reader.GetInt16("mapid"));
                if (map == null)
                {
                    continue;
                }
                var Group = new Couple <int, String>(reader.GetInt32("cellid"), reader.GetString("groupData"));
                map.StaticGroup.Add(Group);
                a++;
            }
            reader.Close();

            Logger.Info("Loaded @'" + a + "'@ MobGroupsFix");
        }