Fixed corpse detection

This commit is contained in:
Héctor Giménez
2023-05-18 21:43:35 +09:00
parent de57c70f25
commit 080f09c9f5

View File

@@ -31,9 +31,7 @@ func (gd *GameReader) GetPlayerUnitPtr(roster data.Roster) (playerUnitPtr uintpt
baseCheck = gd.Process.ReadUInt(inventoryAddr+0x70, Uint16)
}
if baseCheck > 0 {
isCorpse := gd.Process.ReadUInt(playerUnit+0x1A6, Uint8)
if isCorpse == 1 {
unitID := gd.Process.ReadUInt(playerUnit+0x08, Uint32)
hoveredUnitID, hoveredType, isHovered := gd.hoveredData()
@@ -46,8 +44,8 @@ func (gd *GameReader) GetPlayerUnitPtr(roster data.Roster) (playerUnitPtr uintpt
},
}
} else {
if baseCheck > 0 {
playerUnitPtr = playerUnit
}
} else {
pUnitData := playerUnit + 0x10
playerNameAddr := uintptr(gd.Process.ReadUInt(pUnitData, Uint64))
@@ -68,6 +66,7 @@ func (gd *GameReader) GetPlayerUnitPtr(roster data.Roster) (playerUnitPtr uintpt
}
}
}
}
playerUnit = uintptr(gd.Process.ReadUInt(playerUnit+0x150, Uint64))
}