mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[9919] Output player name in ObjectGuid player output string.
This commit is contained in:
parent
696a4b6db0
commit
bfffc715e5
2 changed files with 12 additions and 2 deletions
|
|
@ -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() << ")";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9918"
|
||||
#define REVISION_NR "9919"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue