From def86cc74ec36dadf8af6b58d305a066ae5d01c7 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 24 Sep 2023 10:19:00 -0300 Subject: [PATCH] =?UTF-8?q?feat(Scripts/Commands):=20Display=20creature=20?= =?UTF-8?q?entry=20when=20using=20the=20npc=20nea=E2=80=A6=20(#17331)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(Scripts/Commands): Display creature entry when using the npc near command --- .../updates/pending_db_world/rev_1695556771332912400.sql | 4 ++++ src/server/scripts/Commands/cs_npc.cpp | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1695556771332912400.sql diff --git a/data/sql/updates/pending_db_world/rev_1695556771332912400.sql b/data/sql/updates/pending_db_world/rev_1695556771332912400.sql new file mode 100644 index 000000000..741ff1f66 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1695556771332912400.sql @@ -0,0 +1,4 @@ +-- +UPDATE `acore_string` SET `content_default` = '%d - (entry: %d) |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r', +`locale_deDE` = '%d - (entry: %d) |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r', +`locale_zhCN` = '%d%s - (entry: %d) |cffffffff|H生物:%d|h[%s X:%f Y:%f Z:%f 地图号:%d]|h|r' WHERE `entry` = 515; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 7813f5e42..3db1a22fe 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -15,13 +15,6 @@ * with this program. If not, see . */ -/* ScriptData -Name: npc_commandscript -%Complete: 100 -Comment: All npc related commands -Category: commandscripts -EndScriptData */ - #include "Chat.h" #include "CreatureAI.h" #include "CreatureGroups.h" @@ -719,7 +712,7 @@ public: if (!creatureTemplate) continue; - handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, guid, creatureTemplate->Name.c_str(), x, y, z, mapId, "", ""); + handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, entry, guid, creatureTemplate->Name.c_str(), x, y, z, mapId, "", ""); ++count; } while (result->NextRow());