From 461daadcaf0cafa410c740e6376090c27a1df8ff Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 19 Mar 2015 06:08:27 -0300 Subject: [PATCH] Split up LANG_MAP_POSITION to fix a crash when issuing .gps command --- sql/updates/world/2015_MM_DD_NN_world.sql | 4 ++++ src/server/game/Miscellaneous/Language.h | 3 ++- src/server/scripts/Commands/cs_misc.cpp | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/2015_MM_DD_NN_world.sql diff --git a/sql/updates/world/2015_MM_DD_NN_world.sql b/sql/updates/world/2015_MM_DD_NN_world.sql new file mode 100644 index 0000000000..1d87dafb9f --- /dev/null +++ b/sql/updates/world/2015_MM_DD_NN_world.sql @@ -0,0 +1,4 @@ +UPDATE `trinity_string` SET `content_default` = 'Map: %u (%s) Zone: %u (%s) Area: %u (%s) Phase: %u\nX: %f Y: %f Z: %f Orientation: %f' WHERE `entry` = 101; +DELETE FROM `trinity_string` WHERE `entry` = 178; +INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES +(178, 'grid[%u,%u]cell[%u,%u] InstanceID: %u\n ZoneX: %f ZoneY: %f\nGroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u MMap: %u)'); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 8131984224..9bae8fbdfa 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -207,7 +207,8 @@ enum TrinityStrings LANG_LIQUID_STATUS = 175, LANG_INVALID_GAMEOBJECT_TYPE = 176, LANG_GAMEOBJECT_DAMAGED = 177, - // Room for more level 1 178-199 not used + LANG_GRID_POSITION = 178, + // Room for more level 1 179-199 not used // level 2 chat LANG_NO_SELECTION = 200, diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 0e86823aa7..dea2a5216e 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -237,7 +237,8 @@ public: 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(), + object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation()); + handler->PSendSysMessage(LANG_GRID_POSITION, cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), object->GetInstanceId(), zoneX, zoneY, groundZ, floorZ, haveMap, haveVMap, haveMMap);