Merge remote-tracking branch 'origin/main' into pr/CarlPoppa1/18

This commit is contained in:
guiyomu-dev
2025-10-19 14:55:25 +02:00
2 changed files with 8 additions and 1 deletions

View File

@@ -315,7 +315,7 @@ func (gd *GameReader) GetSelectedCharacterName() string {
}
func (gd *GameReader) LegacyGraphics() bool {
return gd.ReadUInt(gd.Process.moduleBaseAddressPtr+0x22D845F, Uint8) != 0
return gd.ReadUInt(gd.Process.moduleBaseAddressPtr+gd.offset.LegacyGraphics, Uint8) != 0
}
func (gd *GameReader) IsOnline() bool {

View File

@@ -20,6 +20,7 @@ type Offset struct {
TZ uintptr
Quests uintptr
Ping uintptr
LegacyGraphics uintptr
}
func calculateOffsets(process *Process) Offset {
@@ -106,6 +107,11 @@ func calculateOffsets(process *Process) Offset {
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,
@@ -122,5 +128,6 @@ func calculateOffsets(process *Process) Offset {
TZ: tzOffset,
Quests: questDataOffset,
Ping: pingOffset,
LegacyGraphics: legacyGfxOffset,
}
}