public D2DataReader(MainWindow main, D2MemoryTable memory) { this.main = main; this.memory = memory; characters = new Dictionary <string, Character>(); }
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 } } }
public void SetNextMemoryTable(D2MemoryTable table) { nextMemoryTable = table; }