[9919] Output player name in ObjectGuid player output string.

This commit is contained in:
VladimirMangos 2010-05-17 12:58:33 +04:00
parent 696a4b6db0
commit bfffc715e5
2 changed files with 12 additions and 2 deletions

View file

@ -19,6 +19,7 @@
#include "ObjectGuid.h"
#include "World.h"
#include "ObjectMgr.h"
#include <sstream>
@ -44,7 +45,16 @@ char const* ObjectGuid::GetTypeName(HighGuid high)
std::string ObjectGuid::GetString() const
{
std::ostringstream str;
str << GetTypeName() << " (";
str << GetTypeName();
if (IsPlayer())
{
std::string name;
if (sObjectMgr.GetPlayerNameByGUID(m_guid, name))
str << " " << name;
}
str << " (";
if (HasEntry())
str << "Entry: " << GetEntry() << " ";
str << "Guid: " << GetCounter() << ")";

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9918"
#define REVISION_NR "9919"
#endif // __REVISION_NR_H__