Skip to content

Commit

Permalink
Core/Commands: Added transport position for command .gps
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent-Michael committed Nov 14, 2015
1 parent 9fe29de commit 9c99a1d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions sql/updates/world/2015_11_14_00_world.sql
@@ -0,0 +1,3 @@
DELETE FROM `trinity_string` WHERE `entry`=186;
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
(186, 'TransMapID: %u TransOffsetX: %f TransOffsetY: %f TransOffsetZ: %f TransOffsetO: %f (Transport ID: %u %s)');
3 changes: 2 additions & 1 deletion src/server/game/Miscellaneous/Language.h
Expand Up @@ -217,7 +217,8 @@ enum TrinityStrings
LANG_PHASING_NO_DEFINITIONS = 184, // Phasing

LANG_GRID_POSITION = 185,
// Room for more level 1 186-199 not used
LANG_TRANSPORT_POSITION = 186,
// Room for more level 1 187-199 not used

// level 2 chat
LANG_NO_SELECTION = 200,
Expand Down
5 changes: 5 additions & 0 deletions src/server/scripts/Commands/cs_misc.cpp
Expand Up @@ -38,6 +38,7 @@
#include "DisableMgr.h"
#include "SpellHistory.h"
#include "MiscPackets.h"
#include "Transport.h"

class misc_commandscript : public CommandScript
{
Expand Down Expand Up @@ -240,6 +241,10 @@ class misc_commandscript : public CommandScript
areaId, (areaEntry ? areaEntry->AreaName_lang : unknown),
object->GetPhaseMask(),
object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation());
if (Transport* transport = object->GetTransport())
handler->PSendSysMessage(LANG_TRANSPORT_POSITION,
transport->GetGOInfo()->moTransport.mapID, object->GetTransOffsetX(), object->GetTransOffsetY(), object->GetTransOffsetZ(), object->GetTransOffsetO(),
transport->GetEntry(), transport->GetName().c_str());
handler->PSendSysMessage(LANG_GRID_POSITION,
cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), object->GetInstanceId(),
zoneX, zoneY, groundZ, floorZ, haveMap, haveVMap, haveMMap);
Expand Down

0 comments on commit 9c99a1d

Please sign in to comment.