diff options
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 20c50949dcc..c6d80cea3a5 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -35,6 +35,7 @@ #include "Pet.h" #include "LFG.h" #include "GroupMgr.h" +#include "MMapFactory.h" class misc_commandscript : public CommandScript { @@ -191,8 +192,9 @@ public: uint32 zoneId, areaId; object->GetZoneAndAreaId(zoneId, areaId); + uint32 mapId = object->GetMapId(); - MapEntry const* mapEntry = sMapStore.LookupEntry(object->GetMapId()); + MapEntry const* mapEntry = sMapStore.LookupEntry(mapId); AreaTableEntry const* zoneEntry = GetAreaEntryByAreaID(zoneId); AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId); @@ -211,8 +213,9 @@ public: int gridX = 63 - gridCoord.x_coord; int gridY = 63 - gridCoord.y_coord; - uint32 haveMap = Map::ExistMap(object->GetMapId(), gridX, gridY) ? 1 : 0; - uint32 haveVMap = Map::ExistVMap(object->GetMapId(), gridX, gridY) ? 1 : 0; + uint32 haveMap = Map::ExistMap(mapId, gridX, gridY) ? 1 : 0; + uint32 haveVMap = Map::ExistVMap(mapId, gridX, gridY) ? 1 : 0; + uint32 haveMMap = (MMAP::MMapFactory::IsPathfindingEnabled(mapId) && MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId())) ? 1 : 0; if (haveVMap) { @@ -225,13 +228,13 @@ public: handler->PSendSysMessage("no VMAP available for area info"); handler->PSendSysMessage(LANG_MAP_POSITION, - object->GetMapId(), (mapEntry ? mapEntry->name[handler->GetSessionDbcLocale()] : "<unknown>"), + mapId, (mapEntry ? mapEntry->name[handler->GetSessionDbcLocale()] : "<unknown>"), zoneId, (zoneEntry ? zoneEntry->area_name[handler->GetSessionDbcLocale()] : "<unknown>"), areaId, (areaEntry ? areaEntry->area_name[handler->GetSessionDbcLocale()] : "<unknown>"), object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation(), cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), object->GetInstanceId(), - zoneX, zoneY, groundZ, floorZ, haveMap, haveVMap); + zoneX, zoneY, groundZ, floorZ, haveMap, haveVMap, haveMMap); LiquidData liquidStatus; ZLiquidStatus status = map->getLiquidStatus(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), MAP_ALL_LIQUIDS, &liquidStatus); |
