Detect minimap change. Debug log on minimap change and music change.
This commit is contained in:
parent
8318dd19e1
commit
cd0b45de22
@ -53,6 +53,7 @@ namespace rabi_splitter_WPF
|
||||
public readonly int nPackUps;
|
||||
public readonly int nRegenUps;
|
||||
|
||||
public readonly int minimapPosition;
|
||||
|
||||
public MemorySnapshot(Process process, int veridx)
|
||||
{
|
||||
@ -67,7 +68,9 @@ namespace rabi_splitter_WPF
|
||||
carrotXp = MemoryHelper.GetMemoryValue<int>(process, 0xD654BC);
|
||||
hammerXp = MemoryHelper.GetMemoryValue<int>(process, 0xD654B4);
|
||||
ribbonXp = MemoryHelper.GetMemoryValue<int>(process, 0xD654B8);
|
||||
itemPercent = MemoryHelper.GetMemoryValue<int>(process, 0xA730E8);
|
||||
itemPercent = MemoryHelper.GetMemoryValue<float>(process, 0xA730E8);
|
||||
|
||||
minimapPosition = MemoryHelper.GetMemoryValue<int>(process, 0xA72E08);
|
||||
|
||||
nAttackUps = countItems(process, 0xD6352C, 0xD63628);
|
||||
nHpUps = countItems(process, 0xD6342C, 0xD63528);
|
||||
|
@ -79,9 +79,27 @@ namespace rabi_splitter_WPF
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Detect Music change
|
||||
|
||||
if (MusicChanged())
|
||||
{
|
||||
DebugLog($"Music Change: {StaticData.GetMusicName(prevSnapshot.musicid)} -> {StaticData.GetMusicName(snapshot.musicid)}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Detect Minimap Change
|
||||
|
||||
if (prevSnapshot != null && (prevSnapshot.minimapPosition != snapshot.minimapPosition))
|
||||
{
|
||||
DebugLog($"Minimap Shift! {prevSnapshot.minimapPosition} -> {snapshot.minimapPosition}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Detect Reload
|
||||
|
||||
|
||||
bool reloaded = (prevSnapshot != null) && (snapshot.playtime < prevSnapshot.playtime);
|
||||
if (gameState.IsGameStarted() && snapshot.playtime > 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user