mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
feat(Scripts/Commands): Item restoration command (#9538)
* Implement item restore command & move itemmove to new item cmd * Implement LANG_COMMAND_DISABLED * Prevent command usage if no config is set * WIP: `.item restore list` * Fix restore list & create base for restore item * Send item to player via mail * Put player as last argument * Use Postmaster & fix restore list * Show item name in restore list * Update HandleItemMoveCommand to be using the api Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com> * Send item instantly if online
This commit is contained in:
30
data/sql/updates/pending_db_world/rev_1638818214.sql
Normal file
30
data/sql/updates/pending_db_world/rev_1638818214.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1638818214');
|
||||
|
||||
-- Command: Move ".itemmove" to ".item move"
|
||||
UPDATE `command` SET `name`='item move' WHERE `name`='itemmove';
|
||||
|
||||
-- Add new command: ".item restore"
|
||||
DELETE FROM `command` WHERE `name` = 'item restore';
|
||||
INSERT INTO `command` (`name`, `security`, `help`)
|
||||
VALUES ('item restore', '2', 'Syntax: .item restore [#recoveryItemId] [#playername]\r\n\r\nRestore an disposed item for the specified player. Get recoveryId from ".item restore list" command.');
|
||||
|
||||
-- Add new command: ".item restore list"
|
||||
DELETE FROM `command` WHERE `name` = 'item restore list';
|
||||
INSERT INTO `command` (`name`, `security`, `help`)
|
||||
VALUES ('item restore list', '2', 'Syntax: .item restore list [#playername]\r\n\r\nSee restorable items for the specified player.');
|
||||
|
||||
-- Add new string: "LANG_COMMAND_DISABLED"
|
||||
DELETE FROM `acore_string` WHERE `entry` = 5070;
|
||||
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES (5070, 'The command is disabled by config');
|
||||
|
||||
-- Add new string: "LANG_ITEM_RESTORE_LIST"
|
||||
DELETE FROM `acore_string` WHERE `entry` = 197;
|
||||
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES (197, 'Recover id: %u | Item: %s (%u) | Count: %u');
|
||||
|
||||
-- Add new string: "LANG_ITEM_RESTORE_LIST_EMPTY"
|
||||
DELETE FROM `acore_string` WHERE `entry` = 198;
|
||||
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES (198, 'Player has no recoverable items');
|
||||
|
||||
-- Add new string: "LANG_ITEM_RESTORE_MISSING"
|
||||
DELETE FROM `acore_string` WHERE `entry` = 199;
|
||||
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES (199, 'Player has no recoverable item with id %u');
|
||||
Reference in New Issue
Block a user