moved patterns to game data; using new methods to read stats

This commit is contained in:
Me_TheCat 2019-03-31 10:06:04 +03:00
parent 77a518da3b
commit 8a617e699a
2 changed files with 12 additions and 4 deletions

View file

@ -184,5 +184,13 @@ namespace SekiroFpsUnlockAndMore
internal const int PATTERN_TIMESCALE_POINTER3_OFFSET = 0x1FF8;
internal const int PATTERN_TIMESCALE_POINTER4_OFFSET = 0x28;
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;
}
}

View file

@ -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<Int64>(_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))
{