aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/Utilities/Util.h4
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp12
2 files changed, 6 insertions, 10 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index 86d94f90cd5..c7a8289cb74 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -327,7 +327,7 @@ TC_COMMON_API void HexStrToByteArray(std::string const& str, uint8* out, bool re
TC_COMMON_API bool StringToBool(std::string const& str);
template<class Container>
-TC_COMMON_API std::string StringJoin(Container const& c, std::string delinimiter)
+std::string StringJoin(Container const& c, std::string delimiter)
{
if (c.empty())
return "";
@@ -337,7 +337,7 @@ TC_COMMON_API std::string StringJoin(Container const& c, std::string delinimiter
os << *itr++;
for (; itr != c.end(); ++itr)
- os << delinimiter << *itr;
+ os << delimiter << *itr;
return os.str();
}
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index cd21c5335bb..a846e0056af 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -235,15 +235,11 @@ 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(), phases.str().c_str(),
+ object->GetPhaseMask(), StringJoin(object->GetPhases(), ", ").c_str(),
object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation());
if (Transport* transport = object->GetTransport())
handler->PSendSysMessage(LANG_TRANSPORT_POSITION,
@@ -1840,9 +1836,9 @@ public:
// Output XII. LANG_PINFO_CHR_ALIVE
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive.c_str());
- // Output XIII. LANG_PINFO_CHR_PHASES if player is not in GM mode (GM is in every phase)
- if (target && !target->IsGameMaster() && !phases.empty())
- handler->PSendSysMessage(LANG_PINFO_CHR_PHASES, StringJoin(phases, "|").c_str());
+ // Output XIII. LANG_PINFO_CHR_PHASES
+ if (target && !phases.empty())
+ handler->PSendSysMessage(LANG_PINFO_CHR_PHASES, StringJoin(phases, ", ").c_str());
// Output XIV. LANG_PINFO_CHR_MONEY
uint32 gold = money / GOLD;