Beispiel #1
0
        public void UpdateQuestData(ushort[] questBuffer, int difficulty)
        {
            QuestDebugRow[,] questRows;
            ushort questBits;

            switch (difficulty)
            {
            case 2: questRows = QuestRowsHell; break;

            case 1: questRows = QuestRowsNightmare; break;

            case 0:
            default: questRows = QuestRowsNormal; break;
            }

            for (int i = 0; i < questBuffer.Length; i++)
            {
                questBits = questBuffer[i];

                D2QuestHelper.D2Quest q = D2QuestHelper.GetByQuestBufferIndex(i);
                if (q != null)
                {
                    try
                    {
                        questRows[q.Act - 1, q.Quest - 1].Update(questBits);
                    }
                    catch (System.NullReferenceException ex)
                    {
                        // System.NullReferenceException
                    }
                }
            }
        }
Beispiel #2
0
        public QuestDebugRow(D2QuestHelper.D2Quest quest)
        {
            InitializeComponent();

            lblText.Text = quest.CommonName;

            labels[0]  = label0;
            labels[1]  = label1;
            labels[2]  = label2;
            labels[3]  = label3;
            labels[4]  = label4;
            labels[5]  = label5;
            labels[6]  = label6;
            labels[7]  = label7;
            labels[8]  = label8;
            labels[9]  = label9;
            labels[10] = label10;
            labels[11] = label11;
            labels[12] = label12;
            labels[13] = label13;
            labels[14] = label14;
            labels[15] = label15;
        }