mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Commands: Added transport position for command .gps
(cherry picked from commit 9c99a1d0c7)
This commit is contained in:
committed by
Aokromes
parent
63b5366347
commit
f42e6647e4
3
sql/updates/world/2016_03_12_2015_11_14_00_world.sql
Normal file
3
sql/updates/world/2016_03_12_2015_11_14_00_world.sql
Normal file
@@ -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)');
|
||||
@@ -208,7 +208,9 @@ enum TrinityStrings
|
||||
LANG_INVALID_GAMEOBJECT_TYPE = 176,
|
||||
LANG_GAMEOBJECT_DAMAGED = 177,
|
||||
LANG_GRID_POSITION = 178,
|
||||
// Room for more level 1 179-199 not used
|
||||
// 179-185 used in 6.x branch
|
||||
LANG_TRANSPORT_POSITION = 186,
|
||||
// Room for more level 1 187-199 not used
|
||||
|
||||
// level 2 chat
|
||||
LANG_NO_SELECTION = 200,
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "MMapFactory.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "Transport.h"
|
||||
|
||||
class misc_commandscript : public CommandScript
|
||||
{
|
||||
@@ -236,6 +237,10 @@ public:
|
||||
areaId, (areaEntry ? areaEntry->area_name : 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);
|
||||
|
||||
Reference in New Issue
Block a user