Exemple #1
0
        /// <summary>
        ///     Cancels the quest.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <param name="message">The message.</param>
        internal void CancelQuest(GameClient session, ClientMessage message)
        {
            var quest = GetQuest(session.GetHabbo().CurrentQuestId);

            if (quest == null)
            {
                return;
            }
            using (var queryReactor = Yupi.GetDatabaseManager().GetQueryReactor())
                queryReactor.RunFastQuery(string.Concat("DELETE FROM users_quests_data WHERE user_id = ",
                                                        session.GetHabbo().Id, " AND quest_id = ", quest.Id, ";UPDATE users_stats SET quest_id=0 WHERE id=",
                                                        session.GetHabbo().Id));
            session.GetHabbo().CurrentQuestId = 0;
            session.SendMessage(QuestAbortedComposer.Compose());
            GetList(session, null);
        }
Exemple #2
0
        internal void CancelQuest(GameClient Session, ClientMessage Message)
        {
            Quest Quest = GetQuest(Session.GetHabbo().CurrentQuestId);

            if (Quest == null)
            {
                return;
            }

            using (IQueryAdapter dbClient = FirewindEnvironment.GetDatabaseManager().getQueryreactor())
            {
                dbClient.runFastQuery("DELETE FROM user_quests WHERE user_id = " + Session.GetHabbo().Id + " AND quest_id = " + Quest.Id);
            }

            Session.SendMessage(QuestAbortedComposer.Compose());
            GetList(Session, null);
        }
Exemple #3
0
        private static void CancelQuest(Session Session, ClientMessage Message)
        {
            Quest Quest = GetQuest(Session.QuestCache.CurrentQuestId);

            if (Quest == null)
            {
                return;
            }

            using (SqlDatabaseClient MySqlClient = SqlDatabaseManager.GetClient())
            {
                Session.QuestCache.AddOrUpdateData(MySqlClient, Quest.Id, 0, false);
            }

            Session.SendData(QuestAbortedComposer.Compose());
            GetList(Session, null);
        }
Exemple #4
0
        public void CancelQuest(GameClient Session, ClientPacket Message)
        {
            Quest quest = this.GetQuest(Session.GetHabbo().CurrentQuestId);

            if (quest == null)
            {
                return;
            }
            Session.GetHabbo().CurrentQuestId = 0;
            using (IQueryAdapter queryreactor = ButterflyEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                queryreactor.RunQuery(string.Concat(new object[4]
                {
                    "DELETE FROM user_quests WHERE user_id = ",
                    Session.GetHabbo().Id,
                    " AND quest_id = ",
                    quest.Id
                }));
            }
            Session.SendPacket(QuestAbortedComposer.Compose());
            this.GetList(Session, (ClientPacket)null);
        }
Exemple #5
0
        internal void CancelQuest(GameClient Session, ClientMessage Message)
        {
            Quest quest = this.GetQuest(Session.GetHabbo().CurrentQuestId);

            if (quest == null)
            {
                return;
            }
            using (IQueryAdapter queryreactor = CyberEnvironment.GetDatabaseManager().getQueryReactor())
            {
                queryreactor.runFastQuery(string.Concat(new object[]
                {
                    "DELETE FROM user_quests WHERE user_id = ",
                    Session.GetHabbo().Id,
                    " AND quest_id = ",
                    quest.Id,
                    ";UPDATE user_stats SET quest_id=0 WHERE id=",
                    Session.GetHabbo().Id
                }));
            }
            Session.GetHabbo().CurrentQuestId = 0u;
            Session.SendMessage(QuestAbortedComposer.Compose());
            this.GetList(Session, null);
        }