aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/4363_world_trinity_string.sql1
-rw-r--r--sql/world.sql2
-rw-r--r--src/game/Level2.cpp13
3 files changed, 11 insertions, 5 deletions
diff --git a/sql/updates/4363_world_trinity_string.sql b/sql/updates/4363_world_trinity_string.sql
new file mode 100644
index 00000000000..949b337f589
--- /dev/null
+++ b/sql/updates/4363_world_trinity_string.sql
@@ -0,0 +1 @@
+UPDATE `trinity_string` SET `content_default` = 'Player%s %s (guid: %u) Account: %s (id: %u) Email: %s GMLevel: %u Last IP: %s Last login: %s Latency: %ums' WHERE `entry` = 548;
diff --git a/sql/world.sql b/sql/world.sql
index 8f45d916ec1..a1863baad78 100644
--- a/sql/world.sql
+++ b/sql/world.sql
@@ -15112,7 +15112,7 @@ INSERT INTO `trinity_string` VALUES
(545,'*** Is a vendor!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(546,'*** Is a trainer!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(547,'InstanceID: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
-(548,'Player%s %s (guid: %u) Account: %s (id: %u) GMLevel: %u Last IP: %s Last login: %s Latency: %ums',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(548,'Player%s %s (guid: %u) Account: %s (id: %u) Email: %s GMLevel: %u Last IP: %s Last login: %s Latency: %ums',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(549,'Played time: %s Level: %u Money: %ug%us%uc',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(550,'Command .pinfo doesn\'t support \'rep\' option for offline players.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(551,'%s has explored all zones now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index 75bd8357200..73bfb7bd96b 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -2282,21 +2282,26 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
}
std::string username = GetTrinityString(LANG_ERROR);
+ std::string email = GetTrinityString(LANG_ERROR);
std::string last_ip = GetTrinityString(LANG_ERROR);
uint32 security = 0;
std::string last_login = GetTrinityString(LANG_ERROR);
- QueryResult* result = LoginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login FROM account WHERE id = '%u'",accId);
+ QueryResult* result = LoginDatabase.PQuery("SELECT username,gmlevel,email,last_ip,last_login FROM account WHERE id = '%u'",accId);
if(result)
{
Field* fields = result->Fetch();
username = fields[0].GetCppString();
security = fields[1].GetUInt32();
+ email = fields[2].GetCppString();
+
+ if(email.empty())
+ email = "-";
if(!m_session || m_session->GetSecurity() >= security)
{
- last_ip = fields[2].GetCppString();
- last_login = fields[3].GetCppString();
+ last_ip = fields[3].GetCppString();
+ last_login = fields[4].GetCppString();
}
else
{
@@ -2309,7 +2314,7 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
std::string nameLink = playerLink(target_name);
- PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetMangosString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, security, last_ip.c_str(), last_login.c_str(), latency);
+ PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetTrinityString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, email.c_str(), security, last_ip.c_str(), last_login.c_str(), latency);
std::string timeStr = secsToTimeString(total_player_time,true,true);
uint32 gold = money /GOLD;