Merge remote-tracking branch 'origin/main' into pr/CarlPoppa1/9
This commit is contained in:
@@ -18,6 +18,10 @@ type Offset struct {
|
||||
KeyBindingsOffset uintptr
|
||||
KeyBindingsSkillsOffset uintptr
|
||||
QuestInfo uintptr
|
||||
TZ uintptr
|
||||
Quests uintptr
|
||||
Ping uintptr
|
||||
LegacyGraphics uintptr
|
||||
}
|
||||
|
||||
func calculateOffsets(process *Process) Offset {
|
||||
@@ -75,14 +79,16 @@ func calculateOffsets(process *Process) Offset {
|
||||
fpsOffset := pattern - process.moduleBaseAddressPtr + 6 + fpsOffsetPtr
|
||||
|
||||
// Keybindings
|
||||
pattern = process.FindPattern(memory, "\x00\xA8\x00\x00\x00\x00\x7F\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x0F\x00\x00\x00\x00\x00\x00\x80\x4C\x6F\x00\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52", "xx????x?xx????xxxxxxxxxxxxx??x?xxxxxxxxxxx")
|
||||
keyBindingsOffset := pattern + 0x65
|
||||
pattern = process.FindPattern(memory, "\x48\x8D\x05\xAF\xEE", "xxxxx")
|
||||
bytes = process.ReadBytesFromMemory(pattern+3, 4)
|
||||
relativeOffset := int32(binary.LittleEndian.Uint32(bytes))
|
||||
keyBindingsOffset := pattern - process.moduleBaseAddressPtr + 7 + uintptr(relativeOffset)
|
||||
|
||||
// KeyBindings Skills
|
||||
pattern = process.FindPattern(memory, "\x0F\x10\x04\x24\x48\x6B\xC8\x1C\x48\x8D\x05", "xxxxxxxxxxx")
|
||||
var keyBindingsSkillsOffset uintptr
|
||||
bytes = process.ReadBytesFromMemory(pattern+11, 4)
|
||||
relativeOffset := int32(binary.LittleEndian.Uint32(bytes))
|
||||
relativeOffset = int32(binary.LittleEndian.Uint32(bytes))
|
||||
keyBindingsSkillsOffset = uintptr(int64(pattern) + 15 + int64(relativeOffset))
|
||||
|
||||
// QuestInfo
|
||||
@@ -90,6 +96,28 @@ func calculateOffsets(process *Process) Offset {
|
||||
questInfoOffsetPtr := uintptr(process.ReadUInt(pattern+3, Uint32))
|
||||
questInfoOffset := pattern - process.moduleBaseAddressPtr + 7 + questInfoOffsetPtr
|
||||
|
||||
// Terror Zones
|
||||
pattern = process.FindPattern(memory, "\x48\x89\x05\xCC\xCC\xCC\xCC\x48\x8D\x05\xCC\xCC\xCC\xCC\x48\x89\x05\xCC\xCC\xCC\xCC\x48\x8D\x05\xCC\xCC\xCC\xCC\x48\x89\x15\xCC\xCC\xCC\xCC\x48\x89\x15", "xxx????xxx????xxx????xxx????xxx????xxx")
|
||||
tzPtr := process.ReadUInt(pattern+3, Uint32)
|
||||
tzOffset := pattern - process.moduleBaseAddressPtr + 7 + uintptr(tzPtr)
|
||||
|
||||
// Quest Bytes Data
|
||||
pattern = process.FindPattern(memory, "\x42\xc6\x84\x28\x00\x00\x00\x00\x00\x49\xff\xc5\x49\x83\xfd\x29", "xxxx?????xxxxxxx")
|
||||
bytes = process.ReadBytesFromMemory(pattern+4, 4)
|
||||
questOffset := uintptr(binary.LittleEndian.Uint32(bytes))
|
||||
questDataOffset := questOffset + 1
|
||||
|
||||
// Ping
|
||||
pattern = process.FindPattern(memory, "\x48\x8B\x0D\xCC\xCC\xCC\xCC\x49\x2B\xC7", "xxx????xxx")
|
||||
bytes = process.ReadBytesFromMemory(pattern+3, 4)
|
||||
relativeOffset = int32(binary.LittleEndian.Uint32(bytes))
|
||||
pingOffset := pattern - process.moduleBaseAddressPtr + 7 + uintptr(relativeOffset)
|
||||
|
||||
// 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{
|
||||
GameData: gameDataOffset,
|
||||
UnitTable: unitTableOffset,
|
||||
@@ -104,5 +132,9 @@ func calculateOffsets(process *Process) Offset {
|
||||
KeyBindingsOffset: keyBindingsOffset,
|
||||
KeyBindingsSkillsOffset: keyBindingsSkillsOffset,
|
||||
QuestInfo: questInfoOffset,
|
||||
TZ: tzOffset,
|
||||
Quests: questDataOffset,
|
||||
Ping: pingOffset,
|
||||
LegacyGraphics: legacyGfxOffset,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user