From 027c42fdec66de82aac036d5071aacaf707d3312 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 28 May 2020 13:24:36 +0200 Subject: [PATCH] refactor(Core/Command): tele to teleport (#2956) --- .../updates/pending_db_world/rev_1588099547971545300.sql | 8 ++++++++ src/server/scripts/Commands/cs_lookup.cpp | 4 ++-- src/server/scripts/Commands/cs_tele.cpp | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1588099547971545300.sql diff --git a/data/sql/updates/pending_db_world/rev_1588099547971545300.sql b/data/sql/updates/pending_db_world/rev_1588099547971545300.sql new file mode 100644 index 000000000..53568d0d1 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1588099547971545300.sql @@ -0,0 +1,8 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1588099547971545300'); + +UPDATE `command` SET `name` = "lookup teleport", `help` = "Syntax: .lookup teleport $substring\r\nSearch and output all .teleport command locations with provide $substring in name." WHERE `name` = "lookup tele"; +UPDATE `command` SET `name` = "teleport", `help` = "Syntax: .teleport #location\r\nTeleport player to a given location." WHERE `name` = "tele"; +UPDATE `command` SET `name` = "teleport add", `help` = "Syntax: .teleport add $name\r\nAdd current your position to .teleport command target locations list with name $name." WHERE `name` = "tele add"; +UPDATE `command` SET `name` = "teleport del", `help` = "Syntax: .teleport del $name\r\nRemove location with name $name for .teleport command locations list." WHERE `name` = "tele del"; +UPDATE `command` SET `name` = "teleport group", `help` = "Syntax: .teleport group#location\r\nTeleport a selected player and his group members to a given location." WHERE `name` = "tele group"; +UPDATE `command` SET `name` = "teleport name", `help` = "Syntax: .teleport name [#playername] #location\r\nTeleport the given character to a given location. Character can be offline.\r\nTo teleport to homebind, set #location to \"$home\" (without quotes)." WHERE `name` = "tele name"; diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 15a50f9cb..e037ab6d7 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -54,7 +54,7 @@ public: { "quest", SEC_MODERATOR, true, &HandleLookupQuestCommand, "" }, { "skill", SEC_MODERATOR, true, &HandleLookupSkillCommand, "" }, { "taxinode", SEC_MODERATOR, true, &HandleLookupTaxiNodeCommand, "" }, - { "tele", SEC_MODERATOR, true, &HandleLookupTeleCommand, "" }, + { "teleport", SEC_MODERATOR, true, &HandleLookupTeleCommand, "" }, { "title", SEC_MODERATOR, true, &HandleLookupTitleCommand, "" }, { "map", SEC_MODERATOR, true, &HandleLookupMapCommand, "" }, { "player", SEC_GAMEMASTER, true, nullptr, "", lookupPlayerCommandTable }, @@ -1045,7 +1045,7 @@ public: return true; } - // Find tele in game_tele order by name + // Find teleport in game_tele order by name static bool HandleLookupTeleCommand(ChatHandler* handler, char const* args) { if (!*args) diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index e5084f7de..50301cacc 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -36,7 +36,7 @@ public: }; static std::vector commandTable = { - { "tele", SEC_MODERATOR, false, nullptr, "", teleCommandTable } + { "teleport", SEC_MODERATOR, false, nullptr, "", teleCommandTable } }; return commandTable; }