adjustement
This commit is contained in:
@@ -14,7 +14,6 @@ import (
|
||||
)
|
||||
|
||||
func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverData) data.Inventory {
|
||||
item.SetExpChar(gd.ExpChar)
|
||||
mainPlayer := rawPlayerUnits.GetMainPlayer()
|
||||
baseAddr := gd.Process.moduleBaseAddressPtr + gd.offset.UnitTable + (4 * 1024)
|
||||
unitTableBuffer := gd.Process.ReadBytesFromMemory(baseAddr, 128*8)
|
||||
@@ -132,7 +131,7 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
|
||||
itm := &data.Item{
|
||||
ID: int(txtFileNo),
|
||||
UnitID: data.UnitID(unitID),
|
||||
Name: item.GetNameByEnum(txtFileNo),
|
||||
Name: item.GetNameByEnumWithExpChar(gd.ExpChar, txtFileNo),
|
||||
Quality: item.Quality(itemQuality),
|
||||
Position: data.Position{
|
||||
X: int(itemX),
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/hectorgimenez/d2go/pkg/data"
|
||||
"github.com/hectorgimenez/d2go/pkg/data/area"
|
||||
"github.com/hectorgimenez/d2go/pkg/data/game"
|
||||
"github.com/hectorgimenez/d2go/pkg/data/skill"
|
||||
"github.com/hectorgimenez/d2go/pkg/data/state"
|
||||
)
|
||||
@@ -40,7 +41,7 @@ func (gd *GameReader) GetRawPlayerUnits() RawPlayerUnits {
|
||||
expChar := gd.Process.ReadUInt(expCharPtr+0x5C, Uint16)
|
||||
gd.ExpChar = uint16(expChar)
|
||||
isMainPlayer := gd.Process.ReadUInt(inventoryAddr+0x30, Uint16)
|
||||
if expChar >= 2 {
|
||||
if expChar >= uint(game.CharLoD) {
|
||||
isMainPlayer = gd.Process.ReadUInt(inventoryAddr+0x70, Uint16)
|
||||
}
|
||||
isCorpse := gd.Process.ReadUInt(playerUnit+0x1AE, Uint8)
|
||||
|
||||
Reference in New Issue
Block a user