Example #1
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID == 1) //correct answer
            {
                m_Objective.Update(null);

                if (m_Quest.Completed)
                {
                    m_From.PlaySound(0x5B5);
                    m_From.PlaySound(m_From.Female ? 0x30B : 0x41A);
                    m_Quest.OnCompleted();
                    m_From.SendGump(new MondainQuestGump(m_Quest, MondainQuestGump.Section.Complete, false, true));
                }
                else
                {
                    m_From.SendGump(new QAndAGump(m_From, m_Quest));
                }
            }
            else
            {
                m_From.PlaySound(0x5B3);
                m_From.PlaySound(m_From.Female ? 0x310 : 0x41F);
                m_From.SendGump(new MondainQuestGump(m_Quest, MondainQuestGump.Section.Failed, false, true));
                m_Quest.OnResign(false);
            }
        }
Example #2
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID == 1)             //correct answer
            {
                m_Objective.Update(null);

                if (m_Quest.Completed)
                {
                    m_Quest.OnCompleted();
                    m_From.SendGump(new NewQuestGump(m_Quest, NewQuestGump.Section.Complete, false, true));
                }
                else
                {
                    m_From.SendGump(new QAndAGump(m_From, m_Quest));
                }
            }
            else
            {
                m_From.SendGump(new NewQuestGump(m_Quest, NewQuestGump.Section.Failed, false, true));
                m_Quest.OnResign(false);
            }
        }
Example #3
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID > 0 && info.IsSwitched(m_Index + 1)) //correct answer
            {
                m_Objective.Update(null);

                if (m_Quest.Completed)
                {
                    m_Quest.OnCompleted();
                    m_From.SendGump(new MondainQuestGump(m_Quest, MondainQuestGump.Section.Complete, false, true));
                }
                else
                {
                    m_From.SendMessage("Correct!");
                    m_From.SendGump(new QAndAGump(m_From, m_Quest));
                }
            }
            else if (info.ButtonID != 0 && (info.IsSwitched(1) || info.IsSwitched(2) || info.IsSwitched(3) || info.IsSwitched(4)))
            {
                m_From.SendGump(new MondainQuestGump(m_Quest, MondainQuestGump.Section.Failed, false, true));
                m_Quest.OnResign(false);
            }
        }