aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_03_09_03_world_trinity_string.sql5
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp13
2 files changed, 13 insertions, 5 deletions
diff --git a/sql/updates/world/2013_03_09_03_world_trinity_string.sql b/sql/updates/world/2013_03_09_03_world_trinity_string.sql
new file mode 100644
index 00000000000..3e93289711a
--- /dev/null
+++ b/sql/updates/world/2013_03_09_03_world_trinity_string.sql
@@ -0,0 +1,5 @@
+UPDATE `trinity_string` SET `content_default`='Map: %u (%s) Zone: %u (%s) Area: %u (%s) Phase: %u
+X: %f Y: %f Z: %f Orientation: %f
+grid[%u,%u]cell[%u,%u] InstanceID: %u
+ ZoneX: %f ZoneY: %f
+GroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u MMap: %u)' WHERE `entry`=101;
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);