update some memory addresses
This commit is contained in:
6
pkg/memory/addresses.go
Normal file
6
pkg/memory/addresses.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package memory
|
||||
|
||||
const (
|
||||
tzOffline = 0x22D6D44
|
||||
tzOnline = 0x29D1578
|
||||
)
|
||||
@@ -34,7 +34,7 @@ func (gd *GameReader) GetData() data.Data {
|
||||
hover := gd.hoveredData()
|
||||
|
||||
// Quests
|
||||
q1 := uintptr(gd.Process.ReadUInt(gd.moduleBaseAddressPtr+0x230E9A8, Uint64))
|
||||
q1 := uintptr(gd.Process.ReadUInt(gd.moduleBaseAddressPtr+0x220C2D0, Uint64))
|
||||
q2 := uintptr(gd.Process.ReadUInt(q1, Uint64))
|
||||
gameQuestsBytes := gd.Process.ReadBytesFromMemory(q2, 85)
|
||||
|
||||
@@ -183,9 +183,9 @@ func (gd *GameReader) getStatsList(statListPtr uintptr) stat.Stats {
|
||||
func (gd *GameReader) InCharacterSelectionScreen() bool {
|
||||
uiBase := gd.Process.moduleBaseAddressPtr + gd.offset.UI - 0xA
|
||||
|
||||
return gd.Process.ReadUInt(uiBase, Uint8) != 1 && gd.Process.ReadUInt(gd.moduleBaseAddressPtr+0x1EC5AA8, Uint64) == 0
|
||||
return gd.Process.ReadUInt(uiBase, Uint8) != 1 && gd.Process.ReadUInt(gd.moduleBaseAddressPtr+0x214A5A6, Uint64) == 0
|
||||
}
|
||||
|
||||
func (gd *GameReader) GetSelectedCharacterName() string {
|
||||
return gd.Process.ReadStringFromMemory(gd.Process.moduleBaseAddressPtr+0x21A2374, 0)
|
||||
return gd.Process.ReadStringFromMemory(gd.Process.moduleBaseAddressPtr+0x2149FF4, 0)
|
||||
}
|
||||
|
||||
@@ -2,13 +2,14 @@ package memory
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/hectorgimenez/d2go/pkg/data"
|
||||
"github.com/hectorgimenez/d2go/pkg/data/skill"
|
||||
)
|
||||
|
||||
func (gd *GameReader) GetKeyBindings() data.KeyBindings {
|
||||
blob := gd.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x1e26934, 0x500)
|
||||
blobSkills := gd.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x224edc0, 0x500)
|
||||
blob := gd.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x1e0e934, 0x500)
|
||||
blobSkills := gd.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x21f6a30, 0x500)
|
||||
|
||||
skillsKB := [16]data.SkillBinding{}
|
||||
for i := 0; i < 7; i++ {
|
||||
|
||||
@@ -88,7 +88,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+0x21AD220, 0x48)
|
||||
wpList := gd.Process.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x2154EA0, 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])
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
)
|
||||
|
||||
func (gd *GameReader) TerrorZones() (areas []area.ID) {
|
||||
tz := gd.moduleBaseAddressPtr + 0x29E9558
|
||||
tz := gd.moduleBaseAddressPtr + tzOnline
|
||||
|
||||
for i := 0; i < 7; i++ {
|
||||
for i := 0; i < 8; i++ {
|
||||
tzArea := gd.ReadUInt(tz+uintptr(i*Uint32), Uint32)
|
||||
if tzArea != 0 {
|
||||
areas = append(areas, area.ID(tzArea))
|
||||
|
||||
Reference in New Issue
Block a user