public override bool TryInit() { bool success = false; bool m_accuracy_address_success = false; bool m_time_address_success = false; bool m_mods_address_success = false; SigScan.Reload(); { if (Setting.EnableModsChangedAtListening) { //Find mods address m_mods_address = SigScan.FindPattern(StringToByte(s_global_mods_pattern), s_global_mods_mask, 4); LogHelper.LogToFile($"Mods Base Address (0):0x{(int)m_mods_address:X8}"); m_mods_address_success = TryReadIntPtrFromMemory(m_mods_address, out m_mods_address); LogHelper.LogToFile($"Mods Base Address (1):0x{(int)m_mods_address:X8}"); } //Find acc Address m_acc_address = SigScan.FindPattern(StringToByte(s_acc_pattern), s_acc_mask, 1); LogHelper.LogToFile($"Playing Accuracy Base Address (0):0x{(int)m_acc_address:X8}"); m_accuracy_address_success = TryReadIntPtrFromMemory(m_acc_address, out m_acc_address); LogHelper.LogToFile($"Playing Accuracy Base Address (1):0x{(int)m_acc_address:X8}"); if (!m_accuracy_address_success)//use s_acc_pattern_fallback { LogHelper.LogToFile("Use Fallback Accuracy Pattern"); m_acc_address = SigScan.FindPattern(StringToByte(s_acc_pattern_fallback), s_acc_mask_fallback, 4); LogHelper.LogToFile($"Playing Accuracy Base Address (0):0x{(int)m_acc_address:X8}"); m_accuracy_address_success = TryReadIntPtrFromMemory(m_acc_address, out m_acc_address); LogHelper.LogToFile($"Playing Accuracy Base Address (1):0x{(int)m_acc_address:X8}"); } //Find Time Address m_time_address = SigScan.FindPattern(StringToByte(s_time_pattern), s_time_mask, 5); LogHelper.LogToFile($"Time Base Address (0):0x{(int)m_time_address:X8}"); m_time_address_success = TryReadIntPtrFromMemory(m_time_address, out m_time_address); LogHelper.LogToFile($"Time Base Address (1):0x{(int)m_time_address:X8}"); } SigScan.ResetRegion(); success = m_time_address_success && m_accuracy_address_success; if (Setting.EnableModsChangedAtListening) { success = success && m_mods_address_success; } if (m_acc_address == IntPtr.Zero || m_time_address == IntPtr.Zero) { success = false; } return(success); }
public override bool TryInit() { bool success = false; SigScan.Reload(); { m_mode_address = SigScan.FindPattern(StringToByte(s_mode_pattern), s_mode_mask, 6); LogHelper.LogToFile($"Mode Address (0):0x{(int)m_mode_address:X8}"); success = TryReadIntPtrFromMemory(m_mode_address, out m_mode_address); LogHelper.LogToFile($"Mode Address (1):0x{(int)m_mode_address:X8}"); } SigScan.ResetRegion(); if (m_mode_address == IntPtr.Zero) { success = false; } return(success); }
public override bool TryInit() { SigScan.Reload(); { //Find Game Modes m_game_modes_address = SigScan.FindPattern(StringToByte(s_game_modes_pattern), s_game_modes_mask, 10); LogHelper.LogToFile($"Game Status Address (0):0x{(int)m_game_modes_address:X8}"); success = TryReadIntPtrFromMemory(m_game_modes_address, out m_game_modes_address); LogHelper.LogToFile($"Game Status Address (1):0x{(int)m_game_modes_address:X8}"); } SigScan.ResetRegion(); if (m_game_modes_address == IntPtr.Zero) { success = false; } return(success); }