wpList, LoadingScreen, GetSelectedCharacterName

Credits to gogigogi1
This commit is contained in:
elb
2024-12-06 21:25:46 -05:00
committed by Héctor Giménez
parent bd7e8656b8
commit 1cf22f10cd
2 changed files with 5 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package memory
import (
"encoding/binary"
"github.com/hectorgimenez/d2go/pkg/data/mode"
"github.com/hectorgimenez/d2go/pkg/data"
@@ -91,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+0x2140E20, 0x48)
wpList := gd.Process.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x2186420, 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])