diff --git a/SekiroFpsUnlockAndMore/GameData.cs b/SekiroFpsUnlockAndMore/GameData.cs index d08115c..c15a383 100644 --- a/SekiroFpsUnlockAndMore/GameData.cs +++ b/SekiroFpsUnlockAndMore/GameData.cs @@ -183,6 +183,14 @@ namespace SekiroFpsUnlockAndMore internal const int PATTERN_TIMESCALE_POINTER2_OFFSET = 0x88; internal const int PATTERN_TIMESCALE_POINTER3_OFFSET = 0x1FF8; internal const int PATTERN_TIMESCALE_POINTER4_OFFSET = 0x28; - internal const int PATTERN_TIMESCALE_POINTER5_OFFSET = 0xD00; - } + internal const int PATTERN_TIMESCALE_POINTER5_OFFSET = 0xD00; + + // game stat values by Me_TheCat + internal const string PATTERN_PLAYER_DEATHS = "8B 88 90 00 00 00 89 8B FC 00 00 00 48 8B"; + internal const string PATTERN_PLAYER_DEATHS_MASK = "xxxxxxxxx???xx"; + + internal const string PATTERN_TOTAL_KILLS = "48 8D 0D 00 00 00 00 89 14 81 C3"; + internal const string PATTERN_TOTAL_KILLS_MASK = "xxx????xxxx"; + internal const int PATTERN_TOTAL_KILLS_OFFSET = 7; + } } diff --git a/SekiroFpsUnlockAndMore/MainWindow.xaml.cs b/SekiroFpsUnlockAndMore/MainWindow.xaml.cs index 6fa0570..3e8805f 100644 --- a/SekiroFpsUnlockAndMore/MainWindow.xaml.cs +++ b/SekiroFpsUnlockAndMore/MainWindow.xaml.cs @@ -310,7 +310,7 @@ namespace SekiroFpsUnlockAndMore } //Game stats - _offset_player_deaths = patternScan.FindPatternInternal(_gameAccessHwndStatic, procList[gameIndex].MainModule, GameData.PATTERN_PLAYER_DEATHS, GameData.PATTERN_PLAYER_DEATHS_MASK, ' '); + _offset_player_deaths = patternScan.FindPatternInternal(GameData.PATTERN_PLAYER_DEATHS, GameData.PATTERN_PLAYER_DEATHS_MASK, ' '); Debug.WriteLine("Player Deaths found at: 0x" + _offset_player_deaths.ToString("X")); if (!IsValidAddress(_offset_player_deaths)) { @@ -321,7 +321,7 @@ namespace SekiroFpsUnlockAndMore _pointer_player_deaths = Read(_gameAccessHwndStatic, DereferenceStaticX64Pointer(_gameAccessHwndStatic, _offset_player_deaths, 0)) + 0x90; } - _offset_total_kills = patternScan.FindPatternInternal(_gameProc, procList[gameIndex].MainModule, GameData.PATTERN_TOTAL_KILLS, GameData.PATTERN_TOTAL_KILLS_MASK, ' ') + GameData.PATTERN_TOTAL_KILLS_OFFSET; + _offset_total_kills = patternScan.FindPatternInternal(GameData.PATTERN_TOTAL_KILLS, GameData.PATTERN_TOTAL_KILLS_MASK, ' ') + GameData.PATTERN_TOTAL_KILLS_OFFSET; Debug.WriteLine("Total kills found at: 0x" + _offset_total_kills.ToString("X")); if (!IsValidAddress(_offset_total_kills)) {