Added waypoint pattern scan (#80)

Co-authored-by: Arto Simonyan <artosimonyan@protonmail.com>
This commit is contained in:
joffreybesos
2025-02-24 05:01:16 +10:00
committed by GitHub
parent fd7f7ba8a4
commit 7d37526163
2 changed files with 9 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ func (gd *GameReader) GetPlayerUnit(mainPlayerUnit RawPlayerUnit) data.PlayerUni
availableWPs := make([]area.ID, 0)
// Probably there is a better place to pick up those values, since this seems to be very tied to the UI
wpList := gd.Process.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x2186420, 0x48)
wpList := gd.Process.ReadBytesFromMemory(gd.moduleBaseAddressPtr+gd.offset.WaypointsOffset, 0x48)
for i := 0; i < 0x48; i = i + 8 {
a := binary.LittleEndian.Uint32(wpList[i : i+4])
available := binary.LittleEndian.Uint32(wpList[i+4 : i+8])