GameMemoryTable CreateGameMemoryTableForReader(ProcessMemoryReader reader) { try { return(memoryTableFactory.CreateForVersion(reader.FileVersion, reader.ModuleBaseAddresses)); } catch (GameVersionUnsupportedException) { // account for d2se and possibly other 'unsupported' versions string version = reader.ReadNullTerminatedString(new IntPtr(0x1A049), 5, Encoding.ASCII, AddressingMode.Relative); if (version == "1.13c") { return(memoryTableFactory.CreateForVersion(GameVersion.Version_1_13_C, reader.ModuleBaseAddresses)); } } return(null); }
GameMemoryTable CreateGameMemoryTableForReader(ProcessMemoryReader reader) { string fileVersion = reader.FileVersion; if (reader.ModuleName == D2SEModuleName) { string version = reader.ReadNullTerminatedString(new IntPtr(0x1A049), 5, Encoding.ASCII, AddressingMode.Relative); if (version == "1.13c") { fileVersion = GameVersion.Version_1_13_C; } } return(memoryTableFactory.CreateForVersion(fileVersion, reader.ModuleBaseAddresses)); }