Exemple #1
0
        public D2DataReader(MainWindow main, D2MemoryTable memory)
        {
            this.main   = main;
            this.memory = memory;

            characters = new Dictionary <string, Character>();
        }
Exemple #2
0
        public void readDataThreadFunc()
        {
            while (!disposed)
            {
                Thread.Sleep(500);

                // Block here until we have a valid reader.
                if (!checkIfD2Running())
                {
                    continue;
                }

                // Memory table change.
                if (nextMemoryTable != null)
                {
                    memory          = nextMemoryTable;
                    nextMemoryTable = null;
                }

                try
                {
                    ProcessGameData();
                }
                catch (ThreadAbortException)
                {
                    throw;
                }
                catch (Exception e)
                {
#if DEBUG
                    // Print errors to console in debug builds.
                    Console.WriteLine("Exception: {0}", e);
#endif
                }
            }
        }
Exemple #3
0
 public void SetNextMemoryTable(D2MemoryTable table)
 {
     nextMemoryTable = table;
 }