fixed following patch (#50)
This commit is contained in:
@@ -57,7 +57,7 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
|
|||||||
itemLoc := ReadUIntFromBuffer(itemDataBuffer, 0x0C, Uint32)
|
itemLoc := ReadUIntFromBuffer(itemDataBuffer, 0x0C, Uint32)
|
||||||
|
|
||||||
if itemType != 4 {
|
if itemType != 4 {
|
||||||
itemUnitPtr = uintptr(gd.Process.ReadUInt(itemUnitPtr+0x150, Uint64))
|
itemUnitPtr = uintptr(gd.Process.ReadUInt(itemUnitPtr+0x158, Uint64))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
itemUnitPtr = uintptr(gd.Process.ReadUInt(itemUnitPtr+0x150, Uint64))
|
itemUnitPtr = uintptr(gd.Process.ReadUInt(itemUnitPtr+0x158, Uint64))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
|
|||||||
|
|
||||||
func (gd *GameReader) getItemStats(statsListExPtr uintptr) (stat.Stats, stat.Stats) {
|
func (gd *GameReader) getItemStats(statsListExPtr uintptr) (stat.Stats, stat.Stats) {
|
||||||
// Initial full and base stats extraction
|
// Initial full and base stats extraction
|
||||||
fullStats := gd.getStatsList(statsListExPtr + 0x88)
|
fullStats := gd.getStatsList(statsListExPtr + 0xA8)
|
||||||
baseStats := gd.getStatsList(statsListExPtr + 0x30)
|
baseStats := gd.getStatsList(statsListExPtr + 0x30)
|
||||||
|
|
||||||
// Flags and last stat list pointers
|
// Flags and last stat list pointers
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ func (gd *GameReader) Monsters(playerPosition data.Position, hover data.HoverDat
|
|||||||
// Quick corpse check first
|
// Quick corpse check first
|
||||||
isCorpse := gd.Process.ReadUInt(monsterUnitPtr+0x1A6, Uint8)
|
isCorpse := gd.Process.ReadUInt(monsterUnitPtr+0x1A6, Uint8)
|
||||||
if isCorpse != 0 {
|
if isCorpse != 0 {
|
||||||
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x150, Uint64))
|
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x158, Uint64))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ func (gd *GameReader) Monsters(playerPosition data.Position, hover data.HoverDat
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x150, Uint64))
|
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x158, Uint64))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ func (gd *GameReader) Corpses(playerPosition data.Position, hover data.HoverData
|
|||||||
for monsterUnitPtr > 0 {
|
for monsterUnitPtr > 0 {
|
||||||
isCorpse := gd.Process.ReadUInt(monsterUnitPtr+0x1A6, Uint8)
|
isCorpse := gd.Process.ReadUInt(monsterUnitPtr+0x1A6, Uint8)
|
||||||
if isCorpse == 0 {
|
if isCorpse == 0 {
|
||||||
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x150, Uint64))
|
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x158, Uint64))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ func (gd *GameReader) Corpses(playerPosition data.Position, hover data.HoverData
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x150, Uint64))
|
monsterUnitPtr = uintptr(gd.Process.ReadUInt(monsterUnitPtr+0x158, Uint64))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ func (gd *GameReader) Objects(playerPosition data.Position, hover data.HoverData
|
|||||||
PortalData: portalData,
|
PortalData: portalData,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
objectUnitPtr = uintptr(gd.Process.ReadUInt(objectUnitPtr+0x150, Uint64))
|
objectUnitPtr = uintptr(gd.Process.ReadUInt(objectUnitPtr+0x158, Uint64))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func (gd *GameReader) GetRawPlayerUnits() RawPlayerUnits {
|
|||||||
|
|
||||||
statsListExPtr := uintptr(gd.Process.ReadUInt(playerUnit+0x88, Uint64))
|
statsListExPtr := uintptr(gd.Process.ReadUInt(playerUnit+0x88, Uint64))
|
||||||
baseStats := gd.getStatsList(statsListExPtr + 0x30)
|
baseStats := gd.getStatsList(statsListExPtr + 0x30)
|
||||||
stats := gd.getStatsList(statsListExPtr + 0x88)
|
stats := gd.getStatsList(statsListExPtr + 0xA8)
|
||||||
states := gd.GetStates(statsListExPtr)
|
states := gd.GetStates(statsListExPtr)
|
||||||
playerMode := mode.PlayerMode(gd.Process.ReadUInt(playerUnit+0x0c, Uint32))
|
playerMode := mode.PlayerMode(gd.Process.ReadUInt(playerUnit+0x0c, Uint32))
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ func (gd *GameReader) GetRawPlayerUnits() RawPlayerUnits {
|
|||||||
BaseStats: baseStats,
|
BaseStats: baseStats,
|
||||||
Mode: playerMode,
|
Mode: playerMode,
|
||||||
})
|
})
|
||||||
playerUnit = uintptr(gd.Process.ReadUInt(playerUnit+0x150, Uint64))
|
playerUnit = uintptr(gd.Process.ReadUInt(playerUnit+0x158, Uint64))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ func (gd *GameReader) GetStates(statsListExPtr uintptr) state.States {
|
|||||||
var states state.States
|
var states state.States
|
||||||
for i := 0; i < 6; i++ {
|
for i := 0; i < 6; i++ {
|
||||||
offset := i * 4
|
offset := i * 4
|
||||||
stateByte := gd.Process.ReadUInt(statsListExPtr+0xAD0+uintptr(offset), Uint32)
|
stateByte := gd.Process.ReadUInt(statsListExPtr+0xAF0+uintptr(offset), Uint32)
|
||||||
|
|
||||||
offset = (32 * i) - 1
|
offset = (32 * i) - 1
|
||||||
states = append(states, calculateStates(stateByte, uint(offset))...)
|
states = append(states, calculateStates(stateByte, uint(offset))...)
|
||||||
|
|||||||
Reference in New Issue
Block a user