Add legacy graphics AOB scan
This commit is contained in:
@@ -19,6 +19,7 @@ type Offset struct {
|
|||||||
KeyBindingsSkillsOffset uintptr
|
KeyBindingsSkillsOffset uintptr
|
||||||
TZ uintptr
|
TZ uintptr
|
||||||
Quests uintptr
|
Quests uintptr
|
||||||
|
LegacyGraphics uintptr
|
||||||
}
|
}
|
||||||
|
|
||||||
func calculateOffsets(process *Process) Offset {
|
func calculateOffsets(process *Process) Offset {
|
||||||
@@ -99,6 +100,11 @@ func calculateOffsets(process *Process) Offset {
|
|||||||
questOffset := uintptr(binary.LittleEndian.Uint32(bytes))
|
questOffset := uintptr(binary.LittleEndian.Uint32(bytes))
|
||||||
questDataOffset := questOffset + 1
|
questDataOffset := questOffset + 1
|
||||||
|
|
||||||
|
// LegacyGraphics
|
||||||
|
pattern = process.FindPattern(memory, "\x80\x3D\x00\x00\x00\x00\x00\x48\x8D\x54\x24\x30", "xx?????xxxxx")
|
||||||
|
legacyGfxPtr := uintptr(process.ReadUInt(pattern+2, Uint32))
|
||||||
|
legacyGfxOffset := pattern - process.moduleBaseAddressPtr + 7 + legacyGfxPtr
|
||||||
|
|
||||||
return Offset{
|
return Offset{
|
||||||
GameData: gameDataOffset,
|
GameData: gameDataOffset,
|
||||||
UnitTable: unitTableOffset,
|
UnitTable: unitTableOffset,
|
||||||
@@ -114,5 +120,6 @@ func calculateOffsets(process *Process) Offset {
|
|||||||
KeyBindingsSkillsOffset: keyBindingsSkillsOffset,
|
KeyBindingsSkillsOffset: keyBindingsSkillsOffset,
|
||||||
TZ: tzOffset,
|
TZ: tzOffset,
|
||||||
Quests: questDataOffset,
|
Quests: questDataOffset,
|
||||||
|
LegacyGraphics: legacyGfxOffset,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user