public void PickTicket(int moderatorId, bool updateDatabase) { _ticketStatus = SupportTicketStatus.Picked; _moderatorId = moderatorId; PlayerData moderatorPlayerData; if (PlayerLoader.TryGetDataById(moderatorId, out moderatorPlayerData)) { _moderatorUsername = moderatorPlayerData.Username; } if (updateDatabase) { using (var mysqlConnection = Sahara.GetServer().GetMySql().GetConnection()) { mysqlConnection.OpenConnection(); mysqlConnection.RunQuery("UPDATE `moderation_tickets` SET `status` = 'picked', moderator_id = " + _moderatorId + ", timestamp = '" + UnixTimestampGenerator.GetNow() + "' WHERE id = " + _ticketId + ""); mysqlConnection.CloseConnection(); } } moderatorPlayerData = null; }