From ba72792783245b8da4d4d827334467a6c301bb51 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 23 Nov 2021 22:39:20 -0500 Subject: [PATCH] Commands: lookup player shows which character is online Port From (https://github.com/TrinityCore/TrinityCore/commit/) --- Source/Game/Chat/Commands/LookupCommands.cs | 3 ++- .../world/master/2021_11_23_17_world_2019_02_15_00_world.sql | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/master/2021_11_23_17_world_2019_02_15_00_world.sql diff --git a/Source/Game/Chat/Commands/LookupCommands.cs b/Source/Game/Chat/Commands/LookupCommands.cs index b79ed6fe6..a939af50f 100644 --- a/Source/Game/Chat/Commands/LookupCommands.cs +++ b/Source/Game/Chat/Commands/LookupCommands.cs @@ -1049,8 +1049,9 @@ namespace Game.Chat { ObjectGuid guid = ObjectGuid.Create(HighGuid.Player, result2.Read(0)); string name = result2.Read(1); + bool online = result2.Read(2); - handler.SendSysMessage(CypherStrings.LookupPlayerCharacter, name, guid.ToString()); + handler.SendSysMessage(CypherStrings.LookupPlayerCharacter, name, guid.ToString(), online ? handler.GetCypherString(CypherStrings.Online) : ""); ++counter; } while (result2.NextRow() && (limit == -1 || counter < limit)); diff --git a/sql/updates/world/master/2021_11_23_17_world_2019_02_15_00_world.sql b/sql/updates/world/master/2021_11_23_17_world_2019_02_15_00_world.sql new file mode 100644 index 000000000..24808a664 --- /dev/null +++ b/sql/updates/world/master/2021_11_23_17_world_2019_02_15_00_world.sql @@ -0,0 +1,4 @@ +-- Show if player is online in lookup player commands +DELETE FROM `trinity_string` WHERE `entry` = '48'; +INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES ('48', '(online)'); +UPDATE `trinity_string` SET `content_default` = ' %s (%s) %s' WHERE (`entry` = '329');