fetch static data from txt files and properly get all the item stats... maybe?

This commit is contained in:
Héctor Giménez
2024-05-08 21:31:40 +09:00
parent c03c40d385
commit aa2a1aaeb3
34 changed files with 3539 additions and 96663 deletions

View File

@@ -107,13 +107,15 @@ func (gd *GameReader) hoveredData() data.HoverData {
return data.HoverData{}
}
func (gd *GameReader) getStatsData(statCount uint, statPtr uintptr) []stat.Data {
func (gd *GameReader) getStatsList(statListPtr uintptr) stat.Stats {
statList := gd.Process.ReadUInt(statListPtr, Uint64)
statCount := gd.Process.ReadUInt(statListPtr+0x8, Uint64)
if statCount == 0 {
return []stat.Data{}
}
var stats = make([]stat.Data, 0)
statBuffer := gd.Process.ReadBytesFromMemory(statPtr, statCount*10)
statBuffer := gd.Process.ReadBytesFromMemory(uintptr(statList), statCount*10)
for i := 0; i < int(statCount); i++ {
offset := uint(i * 8)
statLayer := ReadUIntFromBuffer(statBuffer, offset, Uint16)