internal WarsData() { DatabaseClient adapter; DataTable table; this.Wars = new Dictionary <int, SnowStorm>(); this.LastWarId = 0; this.GetLevelScore(); this.RoomModel = new Dictionary <int, SnowModel>(); this.RoomItems = new Dictionary <int, List <SnowItems> >(); using (adapter = Essential.GetDatabase().GetClient()) { table = adapter.ReadDataTable("SELECT * FROM storm_levels"); foreach (DataRow row in table.Rows) { List <SnowItems> list = new List <SnowItems>(); this.RoomItems.Add((int)row["level"], new SnowItems().GetSnowItems((int)row["level"], adapter)); } } using (adapter = Essential.GetDatabase().GetClient()) { table = adapter.ReadDataTable("SELECT * FROM storm_models"); foreach (DataRow row in table.Rows) { SnowModel model = new SnowModel(row) { SnowItems = this.RoomItems[(int)row["id"]] }; this.RoomModel.Add((int)row["id"], model); } } }
internal WarsData() { DatabaseClient adapter; DataTable table; this.Wars = new Dictionary<int, SnowStorm>(); this.LastWarId = 0; this.GetLevelScore(); this.RoomModel = new Dictionary<int, SnowModel>(); this.RoomItems = new Dictionary<int, List<SnowItems>>(); using (adapter = Essential.GetDatabase().GetClient()) { table = adapter.ReadDataTable("SELECT * FROM storm_levels"); foreach (DataRow row in table.Rows) { List<SnowItems> list = new List<SnowItems>(); this.RoomItems.Add((int)row["level"], new SnowItems().GetSnowItems((int)row["level"], adapter)); } } using (adapter = Essential.GetDatabase().GetClient()) { table = adapter.ReadDataTable("SELECT * FROM storm_models"); foreach (DataRow row in table.Rows) { SnowModel model = new SnowModel(row) { SnowItems = this.RoomItems[(int)row["id"]] }; this.RoomModel.Add((int)row["id"], model); } } }
internal SnowStorm(Habbo warowner) { WarsData stormWars = Essential.GetGame().GetStormWars(); stormWars.LastWarId++; this.WarId = Essential.GetGame().GetStormWars().LastWarId; this.WarLevel = 9; this.WarOwner = warowner; this.WarUsers = new List<Habbo>(); this.WarStarted = 0; this.MaxUsers = 10; this.Model = Essential.GetGame().GetStormWars().RoomModel[this.WarLevel]; this.Kvalue = 0; Essential.GetGame().GetStormWars().Wars.Add(this.WarId, this); this.Countdown = 3; RoomData class2 = new RoomData(); class2.FillNull((uint)WarId); class2.Owner = "Rootkit"; class2.Name = "SnowStorm Level " + WarLevel; this.SnowRoom = new Room(class2.Id, class2.Name, class2.Description, class2.Type, class2.Owner, class2.Category, class2.State, class2.UsersMax,"model_a", class2.CCTs, class2.Score, class2.Tags, class2.AllowPet, class2.AllowPetsEating, class2.AllowWalkthrough, class2.Hidewall, class2.Icon, class2.Password, class2.Wallpaper, class2.Floor, class2.Landscape, class2, class2.bool_3, class2.Wallthick, class2.Floorthick, class2.Achievement, this.Model.HeightMap, class2.HideOwner,false); }
internal SnowStorm(Habbo warowner) { WarsData stormWars = Essential.GetGame().GetStormWars(); stormWars.LastWarId++; this.WarId = Essential.GetGame().GetStormWars().LastWarId; this.WarLevel = 9; this.WarOwner = warowner; this.WarUsers = new List <Habbo>(); this.WarStarted = 0; this.MaxUsers = 10; this.Model = Essential.GetGame().GetStormWars().RoomModel[this.WarLevel]; this.Kvalue = 0; Essential.GetGame().GetStormWars().Wars.Add(this.WarId, this); this.Countdown = 3; RoomData class2 = new RoomData(); class2.FillNull((uint)WarId); class2.Owner = "Rootkit"; class2.Name = "SnowStorm Level " + WarLevel; this.SnowRoom = new Room(class2.Id, class2.Name, class2.Description, class2.Type, class2.Owner, class2.Category, class2.State, class2.UsersMax, "model_a", class2.CCTs, class2.Score, class2.Tags, class2.AllowPet, class2.AllowPetsEating, class2.AllowWalkthrough, class2.Hidewall, class2.Icon, class2.Password, class2.Wallpaper, class2.Floor, class2.Landscape, class2, class2.bool_3, class2.Wallthick, class2.Floorthick, class2.Achievement, this.Model.HeightMap, class2.HideOwner, false); }