Merge pull request #20 from CarlPoppa1/CharFlags

Add character flags
This commit is contained in:
guiyomu-dev
2025-10-27 20:25:52 +01:00
committed by GitHub
2 changed files with 73 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ type Offset struct {
Quests uintptr
Ping uintptr
LegacyGraphics uintptr
CharData uintptr
}
func calculateOffsets(process *Process) Offset {
@@ -118,6 +119,12 @@ func calculateOffsets(process *Process) Offset {
legacyGfxPtr := uintptr(process.ReadUInt(pattern+2, Uint32))
legacyGfxOffset := pattern - process.moduleBaseAddressPtr + 7 + legacyGfxPtr
// CharData
pattern = process.FindPattern(memory, "\x48\x8D\x05\x00\x00\x00\x00\x89\x93\xF4\x0C\x00\x00", "xxx????xxxxxx")
bytes = process.ReadBytesFromMemory(pattern+3, 4)
relativeOffset = int32(binary.LittleEndian.Uint32(bytes))
charDataOffset := pattern - process.moduleBaseAddressPtr + 7 + uintptr(relativeOffset)
return Offset{
GameData: gameDataOffset,
UnitTable: unitTableOffset,
@@ -136,5 +143,6 @@ func calculateOffsets(process *Process) Offset {
Quests: questDataOffset,
Ping: pingOffset,
LegacyGraphics: legacyGfxOffset,
CharData: charDataOffset,
}
}