Core/Objects: replaced another IsFlying check with CanFly to make sure that hovering creatures will get their ground height returned properly

*also fixed a small typo in path generator
This commit is contained in:
Ovahlord
2019-05-06 02:30:24 +02:00
parent 7847eb66e0
commit ab95871811
2 changed files with 2 additions and 2 deletions

View File

@@ -2620,7 +2620,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
if (Unit const* unit = ToUnit())
{
// flying, ignore.
if (unit->IsFlying())
if (unit->CanFly())
return;
// fall back to gridHeight if any

View File

@@ -41,7 +41,7 @@ PathGenerator::PathGenerator(const Unit* owner) :
TC_LOG_DEBUG("maps.mmaps", "++ PathGenerator::PathGenerator for %u", _sourceUnit->GetGUID().GetCounter());
uint32 mapId = PhasingHandler::GetTerrainMapId(_sourceUnit->GetPhaseShift(), _sourceUnit->GetMap(), _sourceUnit->GetPositionX(), _sourceUnit->GetPositionY());
if (DisableMgr::IsPathfindingEnabled(_sourceUnit->GetMapId()))
if (DisableMgr::IsPathfindingEnabled(mapId))
{
MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager();
_navMesh = mmap->GetNavMesh(mapId);