Skip to content

Commit

Permalink
-Internal: Fix new basePath parameter for tbc loadMap.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r committed Sep 5, 2024
1 parent 7c0b1a4 commit 4c2435a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions playerbot/WorldPosition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ bool TerrainInfoAccess::Load(const uint32 x, const uint32 y, bool mapOnly /*= fa
if (!MMAP::MMapFactory::createOrGetMMapManager()->IsMMapIsLoaded(m_mapId, x, y))
{
// load navmesh
#ifdef MANGOSBOT_ZERO
if (!MMAP::MMapFactory::createOrGetMMapManager()->loadMap(m_mapId, x, y))
#else
if (!MMAP::MMapFactory::createOrGetMMapManager()->loadMap(sWorld.GetDataPath(), m_mapId, x, y))
#endif
return false;
}

Expand Down Expand Up @@ -143,7 +147,11 @@ GridMap* TerrainInfoAccess::LoadMapAndVMap(const uint32 x, const uint32 y, bool
if (!MMAP::MMapFactory::createOrGetMMapManager()->IsMMapIsLoaded(m_mapId, x, y))
{
// load navmesh
#ifdef MANGOSBOT_ZERO
if (!MMAP::MMapFactory::createOrGetMMapManager()->loadMap(m_mapId, x, y))
#else
if (!MMAP::MMapFactory::createOrGetMMapManager()->loadMap(sWorld.GetDataPath(), m_mapId, x, y))
#endif
return nullptr;
}

Expand Down
7 changes: 6 additions & 1 deletion playerbot/strategy/triggers/StuckTriggers.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ namespace ai
return true;
}
#else
if (cell.GridX() > 0 && cell.GridY() > 0 && !MMAP::MMapFactory::createOrGetMMapManager()->IsMMapIsLoaded(botPos.getMapId(), cell.GridX(), cell.GridY()) && !MMAP::MMapFactory::createOrGetMMapManager()->loadMap(botPos.getMapId(), cell.GridX(), cell.GridY()))
if (cell.GridX() > 0 && cell.GridY() > 0 && !MMAP::MMapFactory::createOrGetMMapManager()->IsMMapIsLoaded(botPos.getMapId(), cell.GridX(), cell.GridY())
#ifdef MANGOSBOT_ZERO
&& !MMAP::MMapFactory::createOrGetMMapManager()->loadMap(botPos.getMapId(), cell.GridX(), cell.GridY()))
#else
&& !MMAP::MMapFactory::createOrGetMMapManager()->loadMap(sWorld.GetDataPath(), botPos.getMapId(), cell.GridX(), cell.GridY()))
#endif
{
//sLog.outBasic("Bot #%d %s:%d <%s> was in unloaded grid %d,%d on map %d", bot->GetGUIDLow(), bot->GetTeam() == ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName(), grid.x_coord, grid.y_coord, botPos.getMapId());

Expand Down

0 comments on commit 4c2435a

Please sign in to comment.