internal Room method_15(uint uint_0) { Room @class = null; Room result; try { lock (this.MAX_PETS_PER_ROOM) { if (this.method_13(uint_0)) { result = this.GetRoom(uint_0); return result; } RoomData class2 = this.method_12(uint_0); if (class2 == null) { result = null; return result; } @class = new Room(class2.Id, class2.Name, class2.Description, class2.Type, class2.Owner, class2.Category, class2.State, class2.UsersMax, class2.ModelName, 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.class25_0.Add(@class.Id, @class); } } catch (Exception ex) { Logging.WriteLine("Error while loading room " + uint_0 + ", we crashed out.."); Logging.LogRoomError(ex.ToString()); result = null; return result; } @class.method_0(); @class.method_1(); result = @class; return result; }
internal void method_16(Room class14_0) { if (class14_0 != null) { this.class25_0.Remove(class14_0.Id); this.method_18(class14_0.Id); class14_0.method_62(); if (GoldTree.GetConfig().data["emu.messages.roommgr"] == "1") { Logging.WriteLine("[RoomMgr] Unloaded room [ID: " + class14_0.Id + "]"); } } }
internal Room method_8() { if (this.class14_0 == null) { this.class14_0 = GoldTree.GetGame().GetRoomManager().GetRoom(this.uint_1); } return this.class14_0; }
public RoomItem(uint uint_5, uint uint_6, uint uint_7, string string_8, int int_5, int int_6, double double_1, int int_7, string string_9, Room class14_1) { this.uint_0 = uint_5; this.uint_1 = uint_6; this.uint_2 = uint_7; this.ExtraData = string_8; this.int_1 = int_5; this.int_2 = int_6; this.double_0 = double_1; this.int_3 = int_7; this.string_7 = string_9; this.bool_1 = false; this.int_4 = 0; this.uint_3 = 0u; this.uint_4 = 0u; this.bool_0 = false; this.string_1 = "none"; this.enum5_0 = RoomItem.Enum5.const_0; this.string_2 = ""; this.string_3 = ""; this.string_4 = ""; this.string_5 = ""; this.string_6 = ""; this.int_0 = 0; this.FireWorkCount = 0; this.dictionary_1 = new Dictionary<RoomUser, int>(); this.Item = GoldTree.GetGame().GetItemManager().method_2(uint_7); this.class14_0 = class14_1; if (this.GetBaseItem() == null) { Logging.LogException("Unknown baseID: " + uint_7); } string text = this.GetBaseItem().InteractionType.ToLower(); if (text != null) { if (!(text == "teleport")) { if (!(text == "hopper")) { if (!(text == "roller")) { if (!(text == "blue_score")) { if (!(text == "green_score")) { if (!(text == "red_score")) { if (text == "yellow_score") { this.string_1 = "yellow"; } } else { this.string_1 = "red"; } } else { this.string_1 = "green"; } } else { this.string_1 = "blue"; } } else { this.bool_4 = true; class14_1.Boolean_1 = true; } } else { this.ReqUpdate(0); } } else { this.ReqUpdate(0); } } if (text != null) { switch (text) { case "freeze_blue_gate": case "freeze_blue_score": case "bb_blue_gate": this.team = Team.Blue; break; case "freeze_red_gate": case "freeze_red_score": case "bb_red_gate": this.team = Team.Red; break; case "freeze_green_gate": case "freeze_green_score": case "bb_green_gate": this.team = Team.Green; break; case "freeze_yellow_gate": case "freeze_yellow_score": case "bb_yellow_gate": this.team = Team.Yellow; break; case "jukebox": RoomMusicController roomMusicController = this.method_8().GetRoomMusicController(); roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(this); break; } } this.bool_2 = (this.GetBaseItem().Type == 'i'); this.bool_3 = (this.GetBaseItem().Type == 's'); this.dictionary_0 = this.method_8().method_94(this.GetBaseItem().Length, this.GetBaseItem().Width, this.int_1, this.int_2, int_7); }
internal void BroadcastCurrentSongData(Room Instance) { if (this.mSong != null) { Instance.SendMessage(JukeboxDiscksComposer.ComposePlayingComposer(this.mSong.SongData.Id, this.mSongQueuePosition, 0), null); } else { Instance.SendMessage(JukeboxDiscksComposer.ComposePlayingComposer(0, 0, 0), null); } }
public void Update(Room Instance) { if (this.mIsPlaying && ((this.mSong == null) || (this.TimePlaying >= this.mSongLength))) { if (this.mPlaylist.Count == 0) { this.Stop(); this.mRoomOutputItem.ExtraData = "0"; this.mRoomOutputItem.UpdateState(true, true); } else { this.SetNextSong(); } mBroadcastNeeded = true; } if (mBroadcastNeeded) { this.BroadcastCurrentSongData(Instance); mBroadcastNeeded = false; } }
public static void ShowResults(Room Room, int QuestionId, GameClient Session) { Thread.Sleep(30000); string Question; DataTable Data = null; using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { Question = dbClient.ReadString("SELECT question FROM infobus_questions WHERE id = '" + QuestionId + "' LIMIT 1"); } using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { Data = dbClient.ReadDataTable("SELECT * FROM infobus_answers WHERE question_id = '" + QuestionId + "'"); } ServerMessage InfobusQuestion = new ServerMessage(80); InfobusQuestion.AppendStringWithBreak(Question); InfobusQuestion.AppendInt32(Data.Rows.Count); if (Data != null) { foreach (DataRow Row in Data.Rows) { int ResultCount; InfobusQuestion.AppendInt32((int)Row["id"]); InfobusQuestion.AppendStringWithBreak((string)Row["answer_text"]); using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { ResultCount = dbClient.ReadInt32("SELECT COUNT(*) FROM infobus_results WHERE answer_id = '" + (int)Row["id"] + "' AND question_id = '" + QuestionId + "'"); } InfobusQuestion.AppendInt32(ResultCount); } } int AnswerUserCount; using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { AnswerUserCount = dbClient.ReadInt32("SELECT COUNT(*) FROM infobus_results WHERE question_id = '" + QuestionId + "'"); } InfobusQuestion.AppendInt32(AnswerUserCount); Room.SendMessage(InfobusQuestion, null); using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { dbClient.ExecuteQuery("DELETE FROM infobus_results WHERE question_id = '" + QuestionId + "'"); } }
private static int smethod_0(Room class14_0) { return class14_0.Int32_0; }
public bool method_1(Room class14_0) { return class14_0.Category == this.int_0; }