I'm back, been away for a while (sorry for the delayed response NoCopyPaste). I've ported Enigma's code to C++ so you'll have to think back in C#:
So for some more info on the NavCell topic:
- Player position is given by Actor.x0A4_WorldPosX / Y / Z
- For each Scene in ObjectManager().x798_Storage().x1BC_Scenes().x11C_Items() find the corresponding GlobalDefinitionContainer().SnoDefinition.x10_SnoItemAs<Autogenerated::Scene>() by matching Scene.x0E8_SceneSnoId() == Autogenerated::Scene.x00_SceneSnoId()
- GlobalDefinitionContainer is currently at 0x01CF596C in 2.0.6
- Get NavCells from Autogenerated::Scene with Autogenerated::Scene.x180_NavZoneDefinition().GetNavCells() (NavZoneDefinition as described by Enigma). My C++ looks like this
Code:
std::vector<NavCell> GetNavCells()
{
return Dereference<NavCell>(0x08, x10().x04_Size() / NavCell::SizeOf);
}
- Use corresponding Scene.x0FC_MeshMinX and Scene.x100_MeshMinY to offset the NavCell AABB coordinates NavCell.x00_Min.X / Y. This should transform the NavCell coordinates into world space (same as player position).
- If you would be painting these you'll have to negate X and rotate all by 45° to match the minimap.
- As mentioned use NavCell.x18_Flags() & 1 for walkable cells.
BR
AxlRose