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 {
|
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 {
|
func (gd *GameReader) IsOnline() bool {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ type Offset struct {
|
|||||||
TZ uintptr
|
TZ uintptr
|
||||||
Quests uintptr
|
Quests uintptr
|
||||||
Ping uintptr
|
Ping uintptr
|
||||||
|
LegacyGraphics uintptr
|
||||||
}
|
}
|
||||||
|
|
||||||
func calculateOffsets(process *Process) Offset {
|
func calculateOffsets(process *Process) Offset {
|
||||||
@@ -106,6 +107,11 @@ func calculateOffsets(process *Process) Offset {
|
|||||||
relativeOffset = int32(binary.LittleEndian.Uint32(bytes))
|
relativeOffset = int32(binary.LittleEndian.Uint32(bytes))
|
||||||
pingOffset := pattern - process.moduleBaseAddressPtr + 7 + uintptr(relativeOffset)
|
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{
|
return Offset{
|
||||||
GameData: gameDataOffset,
|
GameData: gameDataOffset,
|
||||||
UnitTable: unitTableOffset,
|
UnitTable: unitTableOffset,
|
||||||
@@ -122,5 +128,6 @@ func calculateOffsets(process *Process) Offset {
|
|||||||
TZ: tzOffset,
|
TZ: tzOffset,
|
||||||
Quests: questDataOffset,
|
Quests: questDataOffset,
|
||||||
Ping: pingOffset,
|
Ping: pingOffset,
|
||||||
|
LegacyGraphics: legacyGfxOffset,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user