Core/Commands: Output phase list in gps command

Closes #18227
This commit is contained in:
Shauren
2016-12-07 23:24:32 +01:00
parent 6ce35f3772
commit eba8ed329f
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1 @@
UPDATE `trinity_string` SET `content_default`='Map: %u (%s) Zone: %u (%s) Area: %u (%s) PhaseMask (legacy): %u\nPhases: %s\nX: %f Y: %f Z: %f Orientation: %f' WHERE `entry`=101;

View File

@@ -235,11 +235,15 @@ public:
char const* unknown = handler->GetTrinityString(LANG_UNKNOWN);
std::ostringstream phases;
for (uint32 phaseId : object->GetPhases())
phases << phaseId << ", ";
handler->PSendSysMessage(LANG_MAP_POSITION,
mapId, (mapEntry ? mapEntry->MapName->Str[handler->GetSessionDbcLocale()] : unknown),
zoneId, (zoneEntry ? zoneEntry->AreaName->Str[handler->GetSessionDbcLocale()] : unknown),
areaId, (areaEntry ? areaEntry->AreaName->Str[handler->GetSessionDbcLocale()] : unknown),
object->GetPhaseMask(),
object->GetPhaseMask(), phases.str().c_str(),
object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation());
if (Transport* transport = object->GetTransport())
handler->PSendSysMessage(LANG_TRANSPORT_POSITION,