Merge remote-tracking branch 'origin/main' into pr/CarlPoppa1/18
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user