fix qty and charges

This commit is contained in:
guiyomu-dev
2026-02-17 00:32:29 +01:00
parent 0d6fc4a8f8
commit efddf658de
2 changed files with 8 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ type Skill struct {
type Points struct { type Points struct {
Level uint Level uint
Quantity uint
Charges uint Charges uint
} }

View File

@@ -185,7 +185,8 @@ func (gd *GameReader) getSkills(skillListPtr uintptr) map[skill.ID]skill.Points
skillTxtPtr := uintptr(gd.Process.ReadUInt(skillPtr, Uint64)) skillTxtPtr := uintptr(gd.Process.ReadUInt(skillPtr, Uint64))
skillTxt := uintptr(gd.Process.ReadUInt(skillTxtPtr, Uint16)) skillTxt := uintptr(gd.Process.ReadUInt(skillTxtPtr, Uint16))
lvl := gd.Process.ReadUInt(skillPtr+0x40, Uint16) lvl := gd.Process.ReadUInt(skillPtr+0x40, Uint16)
charges := gd.Process.ReadUInt(skillPtr+0x48, Uint16) qty := gd.Process.ReadUInt(skillPtr+0x48, Uint16)
charges := gd.Process.ReadUInt(skillPtr+0x50, Uint16)
shouldSetSkill := true shouldSetSkill := true
existingSkill, exists := skills[skill.ID(skillTxt)] existingSkill, exists := skills[skill.ID(skillTxt)]
@@ -198,6 +199,7 @@ func (gd *GameReader) getSkills(skillListPtr uintptr) map[skill.ID]skill.Points
if shouldSetSkill { if shouldSetSkill {
skills[skill.ID(skillTxt)] = skill.Points{ skills[skill.ID(skillTxt)] = skill.Points{
Level: lvl, Level: lvl,
Quantity: qty,
Charges: charges, Charges: charges,
} }
} }